Incorrect 5.1 Speaker assignment

I have a 5.1 speaker system running from the motherboard audio (analog, not digital). The problem i have is when I use the “Test” function on the Audio System Settings, only 2 are mapped correctly. The Front Left and Front Right. The other 4 are not. Testing Front Center produces audio in the Rear Left, Rear Left produces audio in the Front Center, Subwoofer produces audio in the Rear Right, and the Rear Right produces audio in the Subwoofer.

I tested 11 different live distros (and Windows 11) to see if this was just an overall hardware issue with my motherboard but I ended up with a 50/50 split with the Linux distros.

Correctly working 5.1 Audio (all speaker location tests matched correctly)
Mint
Debian
Solus
Ubuntu
Zorin
Windows 11

Incorrectly working 5.1 Audio
Manjaro - speaker location did match correctly
PopOs - speaker location did match correctly
Nitrux - Could not test… black screen with mouse cursor only
Mx - Only showed stereo output with no way to change
KaOs - speaker location did not match correctly
ArcoLinux - Could not test… no utility for testing individual speakers

I searched and tried various remedies - using alsamixer, pavucontrol, swapping out pipewire and pulse, attempted to set a custom profile (wasn’t allowed), hdajackretask… but to no avail.

It’s not a showstopper… but it is annoying when playing games that depend on sound location for survival… :slight_smile:

Any help, ideas, suggestions… would be appreciated. It works on some but not others but I don’t know why. If you need further info I would be happy to provide it. I am not a terminal command line expert, I prefer a gui… but I can follow instructions… :slight_smile:

Thanks in advance…

hdajackretask of package alsa-tools is your friend. just google around to see how it works. if that fails to deliver what you need, refer;
https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture/Troubleshooting#Fix_wrong_audio_pin_mapping

Thanks for the tip… I will take a look at it to see it can help. As far as hdajackretask is concerned, I had already tried that but it was totally unhelpful. It only shows that audio for the nvidia graphics card and not my usb audio from the motherboard. And under “Select a codec” I have no other options.

Thanks again… I am still wondering why some of the other distros do not have this issue… they all seem to use Alsa, pulse, and/or pipewire…

usb-audio

can you product output of following commands;

$ inxi -Aazy
$ pactl list sinks
    ~  inxi -Aazy                                                                  ✔ 
Audio:
  Device-1: Intel Alder Lake-S HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel alternate: snd_sof_pci_intel_tgl
    bus-ID: 00:1f.3 chip-ID: 8086:7ad0 class-ID: 0403
  Device-2: NVIDIA GA102 High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s bus-ID: 01:00.1 chip-ID: 10de:1aef class-ID: 0403
  Device-3: Micro Star USB Audio driver: hid-generic,snd-usb-audio,usbhid
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-11:6
    chip-ID: 0db0:1feb class-ID: 0300
  API: ALSA v: k6.3.0-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: JACK v: 1.9.22 status: off tools: N/A
  Server-3: PipeWire v: 0.3.70 status: active with: 1: pipewire-pulse
    status: active 2: pipewire-media-session status: active 3: pipewire-alsa
    type: plugin tools: pactl,pw-cat,pw-cli
  ~  pactl list sinks                                                            ✔ 
Sink #43
        State: SUSPENDED
        Name: alsa_output.pci-0000_01_00.1.hdmi-stereo
        Description: GA102 High Definition Audio Controller Digital Stereo (HDMI)
        Driver: PipeWire
        Sample Specification: s32le 2ch 48000Hz
        Channel Map: front-left,front-right
        Owner Module: 4294967295
        Mute: no
        Volume: front-left: 48287 /  74% / -7.96 dB,   front-right: 48287 /  74% / -7.96 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor Source: alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
        Latency: 0 usec, configured 0 usec
        Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS 
        Properties:
                object.path = "alsa:pcm:1:hdmi:1:playback"
                api.alsa.path = "hdmi:1"
                api.alsa.pcm.card = "1"
                api.alsa.pcm.stream = "playback"
                audio.channels = "2"
                audio.position = "FL,FR"
                device.routes = "1"
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "Beyond TV"
                alsa.id = "HDMI 0"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "3"
                alsa.card = "1"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0x82080000 irq 17"
                alsa.driver_name = "snd_hda_intel"
                device.profile.name = "hdmi-stereo"
                device.profile.description = "Digital Stereo (HDMI)"
                card.profile.device = "4"
                device.id = "39"
                factory.name = "api.alsa.pcm.sink"
                priority.driver = "632"
                priority.session = "632"
                media.class = "Audio/Sink"
                node.nick = "HDA NVidia"
                node.name = "alsa_output.pci-0000_01_00.1.hdmi-stereo"
                device.description = "GA102 High Definition Audio Controller"
                device.icon_name = "audio-card-hdmi"
                device.bus = "pci"
                device.bus_path = "pci-0000:01:00.1"
                node.pause-on-idle = "false"
                factory.id = "18"
                clock.quantum-limit = "8192"
                client.id = "33"
                node.driver = "true"
                factory.mode = "merge"
                audio.adapt.follower = ""
                library.name = "audioconvert/libspa-audioconvert"
                object.id = "43"
                object.serial = "43"
                device.enum.api = "udev"
                api.alsa.card = "1"
                api.alsa.card.name = "HDA NVidia"
                api.alsa.card.longname = "HDA NVidia at 0x82080000 irq 17"
                device.plugged.usec = "3018849"
                sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1"
                device.subsystem = "sound"
                device.vendor.id = "0x10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.id = "0x1aef"
                device.product.name = "GA102 High Definition Audio Controller"
                device.name = "alsa_card.pci-0000_01_00.1"
                device.nick = "HDA NVidia"
                api.alsa.use-acp = "true"
                api.acp.auto-profile = "false"
                api.acp.auto-port = "false"
                api.dbus.ReserveDevice1 = "Audio1"
                device.string = "1"
        Ports:
                hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, availability group: Legacy 1, available)
        Active Port: hdmi-output-0
        Formats:
                pcm

Sink #44
        State: SUSPENDED
        Name: alsa_output.usb-Generic_USB_Audio-00.HiFi_5_1__hw_Audio_2__sink
        Description: USB Audio S/PDIF Output
        Driver: PipeWire
        Sample Specification: s24le 2ch 48000Hz
        Channel Map: front-left,front-right
        Owner Module: 4294967295
        Mute: no
        Volume: front-left: 48287 /  74% / -7.96 dB,   front-right: 48287 /  74% / -7.96 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor Source: alsa_output.usb-Generic_USB_Audio-00.HiFi_5_1__hw_Audio_2__sink.monitor
        Latency: 0 usec, configured 0 usec
        Flags: HARDWARE DECIBEL_VOLUME LATENCY 
        Properties:
                object.path = "alsa:pcm:2:hw:Audio,2:playback"
                api.alsa.path = "hw:Audio,2"
                api.alsa.open.ucm = "true"
                api.alsa.pcm.card = "2"
                api.alsa.pcm.stream = "playback"
                audio.channels = "2"
                audio.position = "FL,FR"
                device.routes = "1"
                alsa.mixer_device = "_ucm0003.hw:Audio"
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "USB Audio #2"
                alsa.id = "USB Audio"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "2"
                alsa.card = "2"
                alsa.card_name = "USB Audio"
                alsa.long_card_name = "Generic USB Audio at usb-0000:00:14.0-11, high speed"
                alsa.driver_name = "snd_usb_audio"
                device.profile.name = "HiFi 5+1: hw:Audio,2: sink"
                device.profile.description = "S/PDIF Output"
                card.profile.device = "5"
                device.id = "42"
                factory.name = "api.alsa.pcm.sink"
                priority.driver = "584"
                priority.session = "584"
                media.class = "Audio/Sink"
                node.nick = "USB Audio"
                node.name = "alsa_output.usb-Generic_USB_Audio-00.HiFi_5_1__hw_Audio_2__sink"
                device.description = "USB Audio"
                device.icon_name = "audio-card"
                device.bus = "usb"
                device.bus_path = "pci-0000:00:14.0-usb-0:11:1.0"
                node.pause-on-idle = "false"
                factory.id = "18"
                clock.quantum-limit = "8192"
                client.id = "33"
                node.driver = "true"
                factory.mode = "merge"
                audio.adapt.follower = ""
                library.name = "audioconvert/libspa-audioconvert"
                object.id = "41"
                object.serial = "44"
                device.enum.api = "udev"
                api.alsa.card = "2"
                api.alsa.card.name = "USB Audio"
                api.alsa.card.longname = "Generic USB Audio at usb-0000:00:14.0-11, high speed"
                device.plugged.usec = "9390605"
                sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11:1.0/sound/card2"
                device.bus-id = "usb-Generic_USB_Audio-00"
                device.subsystem = "sound"
                device.vendor.id = "0x0db0"
                device.vendor.name = "Micro Star International"
                device.product.id = "0x1feb"
                device.product.name = "USB Audio"
                device.serial = "Generic_USB_Audio"
                device.name = "alsa_card.usb-Generic_USB_Audio-00"
                device.nick = "USB Audio"
                api.alsa.use-acp = "true"
                api.acp.auto-profile = "false"
                api.acp.auto-port = "false"
                api.dbus.ReserveDevice1 = "Audio2"
                device.string = "2"
        Ports:
                [Out] SPDIF: S/PDIF Output (type: SPDIF, priority: 100, availability unknown)
        Active Port: [Out] SPDIF
        Formats:
                pcm

Sink #45
        State: SUSPENDED
        Name: alsa_output.usb-Generic_USB_Audio-00.HiFi_5_1__hw_Audio_1__sink
        Description: USB Audio Front Headphones
        Driver: PipeWire
        Sample Specification: s32le 2ch 48000Hz
        Channel Map: front-left,front-right
        Owner Module: 4294967295
        Mute: no
        Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor Source: alsa_output.usb-Generic_USB_Audio-00.HiFi_5_1__hw_Audio_1__sink.monitor
        Latency: 0 usec, configured 0 usec
        Flags: HARDWARE DECIBEL_VOLUME LATENCY 
        Properties:
                object.path = "alsa:pcm:2:hw:Audio,1:playback"
                api.alsa.path = "hw:Audio,1"
                api.alsa.open.ucm = "true"
                api.alsa.pcm.card = "2"
                api.alsa.pcm.stream = "playback"
                audio.channels = "2"
                audio.position = "FL,FR"
                device.routes = "1"
                alsa.mixer_device = "_ucm0003.hw:Audio"
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "USB Audio #1"
                alsa.id = "USB Audio"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "1"
                alsa.card = "2"
                alsa.card_name = "USB Audio"
                alsa.long_card_name = "Generic USB Audio at usb-0000:00:14.0-11, high speed"
                alsa.driver_name = "snd_usb_audio"
                device.profile.name = "HiFi 5+1: hw:Audio,1: sink"
                device.profile.description = "Front Headphones"
                card.profile.device = "6"
                device.id = "42"
                factory.name = "api.alsa.pcm.sink"
                priority.driver = "600"
                priority.session = "600"
                media.class = "Audio/Sink"
                node.nick = "USB Audio"
                node.name = "alsa_output.usb-Generic_USB_Audio-00.HiFi_5_1__hw_Audio_1__sink"
                device.description = "USB Audio"
                device.icon_name = "audio-card"
                device.bus = "usb"
                device.bus_path = "pci-0000:00:14.0-usb-0:11:1.0"
                node.pause-on-idle = "false"
                factory.id = "18"
                clock.quantum-limit = "8192"
                client.id = "33"
                node.driver = "true"
                factory.mode = "merge"
                audio.adapt.follower = ""
                library.name = "audioconvert/libspa-audioconvert"
                object.id = "44"
                object.serial = "45"
                device.enum.api = "udev"
                api.alsa.card = "2"
                api.alsa.card.name = "USB Audio"
                api.alsa.card.longname = "Generic USB Audio at usb-0000:00:14.0-11, high speed"
                device.plugged.usec = "9390605"
                sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11:1.0/sound/card2"
                device.bus-id = "usb-Generic_USB_Audio-00"
                device.subsystem = "sound"
                device.vendor.id = "0x0db0"
                device.vendor.name = "Micro Star International"
                device.product.id = "0x1feb"
                device.product.name = "USB Audio"
                device.serial = "Generic_USB_Audio"
                device.name = "alsa_card.usb-Generic_USB_Audio-00"
                device.nick = "USB Audio"
                api.alsa.use-acp = "true"
                api.acp.auto-profile = "false"
                api.acp.auto-port = "false"
                api.dbus.ReserveDevice1 = "Audio2"
                device.string = "2"
        Ports:
                [Out] Headphones: Front Headphones (type: Headphones, priority: 300, availability group: Headphone - Output, not available)
        Active Port: [Out] Headphones
        Formats:
                pcm

Sink #46
        State: SUSPENDED
        Name: alsa_output.usb-Generic_USB_Audio-00.HiFi_5_1__hw_Audio__sink
        Description: USB Audio Speakers
        Driver: PipeWire
        Sample Specification: s32le 6ch 48000Hz
        Channel Map: front-left,front-right,rear-left,rear-right,front-center,lfe
        Owner Module: 4294967295
        Mute: no
        Volume: front-left: 52429 /  80% / -5.81 dB,   front-right: 52429 /  80% / -5.81 dB,   rear-left: 52429 /  80% / -5.81 dB,   rear-right: 52429 /  80% / -5.81 dB,   front-center: 52429 /  80% / -5.81 dB,   lfe: 52429 /  80% / -5.81 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor Source: alsa_output.usb-Generic_USB_Audio-00.HiFi_5_1__hw_Audio__sink.monitor
        Latency: 0 usec, configured 0 usec
        Flags: HARDWARE DECIBEL_VOLUME LATENCY 
        Properties:
                object.path = "alsa:pcm:2:hw:Audio:playback"
                api.alsa.path = "hw:Audio"
                api.alsa.open.ucm = "true"
                api.alsa.pcm.card = "2"
                api.alsa.pcm.stream = "playback"
                audio.channels = "6"
                audio.position = "FL,FR,RL,RR,FC,LFE"
                device.routes = "1"
                alsa.mixer_device = "_ucm0003.hw:Audio"
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "USB Audio"
                alsa.id = "USB Audio"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "2"
                alsa.card_name = "USB Audio"
                alsa.long_card_name = "Generic USB Audio at usb-0000:00:14.0-11, high speed"
                alsa.driver_name = "snd_usb_audio"
                device.profile.name = "HiFi 5+1: hw:Audio: sink"
                device.profile.description = "Speakers"
                card.profile.device = "7"
                device.id = "42"
                factory.name = "api.alsa.pcm.sink"
                priority.driver = "616"
                priority.session = "616"
                media.class = "Audio/Sink"
                node.nick = "USB Audio"
                node.name = "alsa_output.usb-Generic_USB_Audio-00.HiFi_5_1__hw_Audio__sink"
                device.description = "USB Audio"
                device.icon_name = "audio-card"
                device.bus = "usb"
                device.bus_path = "pci-0000:00:14.0-usb-0:11:1.0"
                node.pause-on-idle = "false"
                factory.id = "18"
                clock.quantum-limit = "8192"
                client.id = "33"
                node.driver = "true"
                factory.mode = "merge"
                audio.adapt.follower = ""
                library.name = "audioconvert/libspa-audioconvert"
                object.id = "45"
                object.serial = "46"
                node.max-latency = "16384/48000"
                api.alsa.period-size = "512"
                api.alsa.period-num = "64"
                api.alsa.headroom = "512"
                device.enum.api = "udev"
                api.alsa.card = "2"
                api.alsa.card.name = "USB Audio"
                api.alsa.card.longname = "Generic USB Audio at usb-0000:00:14.0-11, high speed"
                device.plugged.usec = "9390605"
                sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11:1.0/sound/card2"
                device.bus-id = "usb-Generic_USB_Audio-00"
                device.subsystem = "sound"
                device.vendor.id = "0x0db0"
                device.vendor.name = "Micro Star International"
                device.product.id = "0x1feb"
                device.product.name = "USB Audio"
                device.serial = "Generic_USB_Audio"
                device.name = "alsa_card.usb-Generic_USB_Audio-00"
                device.nick = "USB Audio"
                api.alsa.use-acp = "true"
                api.acp.auto-profile = "false"
                api.acp.auto-port = "false"
                api.dbus.ReserveDevice1 = "Audio2"
                device.string = "2"
        Ports:
                [Out] Speaker: Speakers (type: Speaker, priority: 200, availability group: Speaker - Output, available)
        Active Port: [Out] Speaker
        Formats:
                pcm

Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

I fixed my 4.0 channel speaker mapping by editing the following from terminal with sudo:

/usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf

I scrolled down to find [Mapping analog-surround-40] (I guess [Mapping analog-surround-51] in this case
Then re-ordered the speakers after: channel-map =

I only had to swap the position of 2 in my case so that made deciding the order easy.

Then reboot or ‘pulseaudio -k’

Welcome to Manjaro forum @roberies

On Manjaro, PulseAudio is controlled by systemd units pulseaudio.socket and pulseaudio.service
So it is recommended to restart the systemd units instead of killing pulseaudio daemon

systemctl --user restart pulseaudio

For systems similar to original post where pulseaudio has been replaced with pipewire-pulse
the default ALSA mixer paths and profile-sets are located in /usr/share/alsa-card-profile/mixer/paths/ and /usr/share/alsa-card-profile/mixer/profile-sets/

Alsa Card Profiles · Wiki · PipeWire · GitLab

You should however consider making a new profile set for your device and adding UDEV detection rules for it in 90-pipewire-alsa.rules, and contributing it to Pipewire & Pulseaudio, so that it benefits also other users.