• Re: speaker-test: no correct sound output on LFE and others speakers

    From Alexandre Rossi@21:1/5 to All on Tue Apr 30 14:10:01 2024
    Hi,

    Basically I've the same issue described here: https://askubuntu.com/questions/1180389/speaker-test-returns-all-6-channels-to-front-speakers

    The speaker-test program is provided by the alsa-utils package. I'm using Debian 12 Bookworm, I've no ~/.asoundrc file. My /proc/asound/cards returns:

    ~$ cat /proc/asound/cards
    0 [SB ]: HDA-Intel - HDA ATI SB
    HDA ATI SB at 0xfe400000 irq 16
    1 [NVidia ]: HDA-Intel - HDA NVidia
    HDA NVidia at 0xfe080000 irq 57

    I've 5.1 speakers the LOGITECH Z906 audio system plugged to the PC via 3 jacks (left/right), (Center/Subwoofer), (Rear left/ Rear right).

    I assume your cabling is right and your SB soundcard has surround out
    (3 jacks as you describe it, and not mic and line out for instance). The labels on the jacks would confirm that, so would the user manual of your motherboard or
    sound card.

    The issue is that speaker-test doesn't play sound to the correct speaker. If I run:

    ~$ speaker-test -Dplug:surround51 -c6 -s3 -f75

    The sound comes from (Center), (Front right), (Rear left) and (Rear right) speakers instead (Front right) only.

    What's bothering me is that you get sound from multiple speakers while instructing out on only one.

    The usual issues of these setups with surround analog out are:
    - channel mapping issues (driver/hardware mismatch)
    - software downmixing to stereo

    There are other usual issues with surrount digital out but this is not
    your setup.

    You can have a look at [1] for software fixes on this.

    [1] https://alsa.opensrc.org/SurroundSound

    Thanks,

    Alex

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandre Rossi@21:1/5 to All on Thu May 2 09:20:01 2024
    Hi,

    The issue is that speaker-test doesn't play sound to the correct speaker. If
    I run:

    ~$ speaker-test -Dplug:surround51 -c6 -s3 -f75

    The sound comes from (Center), (Front right), (Rear left) and (Rear right)
    speakers instead (Front right) only.

    What's bothering me is that you get sound from multiple speakers while instructing out on only one.

    The usual issues of these setups with surround analog out are:
    - channel mapping issues (driver/hardware mismatch)
    - software downmixing to stereo

    There are other usual issues with surrount digital out but this is not
    your setup.

    You can have a look at [1] for software fixes on this.

    [1] https://alsa.opensrc.org/SurroundSound

    The link you posted it shows rather outdated fixes, it talked about Jackd daemon and surround, but I have pulseaudio daemon, maybe I've pulseaudio daemon misconfiguration

    My understanding is that pulseaudio uses alsa for kernel interface and
    that speaker-test uses alsa directly. So if one cannot get speaker-test
    to sound right, it cannot work with pulseaudio. That why I suggest workarounds in alsa conf (asoundrc).

    Alex

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandre Rossi@21:1/5 to All on Tue May 7 12:00:01 2024
    Hi,

    My understanding is that pulseaudio uses alsa for kernel interface and
    that speaker-test uses alsa directly. So if one cannot get speaker-test
    to sound right, it cannot work with pulseaudio. That why I suggest workarounds
    in alsa conf (asoundrc).

    I tried several configurations of ~/.asoundrc in these days but nothing
    works with "speaker-test". Well some configurations let "aplay" to use rear-left, rear-right, front-center speakers but "speaker-test" never sends sound to front-center, rear-left, rear-right and LFE with this command:
    [...]
    Just now, checking the ALSA configuration in /etc/alsa/conf.d/ I found the 99-pulse.conf file:

    ~# cat /etc/alsa/conf.d/99-pulse.conf
    # PulseAudio alsa plugin configuration file to set the pulseaudio plugin as
    # default output for applications using alsa when pulseaudio is running. [...]

    Does Debian use Pulseaudio daemon as default output for ALSA applications? Could it be a Pulseaudio misconfiguration? Should I try to uninstall it or how can I stop Pulseaudio? If I do "killall pulseaudio" it re-spawns immediately and "systemctl" doesn't work:

    My hypothesis: speaker-test outputs directly to ALSA (kernel) but ALSA redirects
    to pulseaudio (the 99-pulse.conf file) and pulseaudio Output profile is stereo. Therefore, pulseaudio downmixes 5.1 to stereo. That would explain why only front-left and front-right output sound.

    To confirm, you can either:
    - move away that 99-pulse.conf file so that speaker-test use directly and only
    ALSA
    - configure pulseaudio output profile for surround5.1 (you can use command line
    $ pacmd set-card-profile 0 output:output:analog-surround-51 or
    pavucontrol (graphical)

    ~# systemctl stop pulseaudio
    Failed to stop pulseaudio.service: Unit pulseaudio.service not loaded.

    pulseaudio is usually a *user* service and socket activated (starts automatically
    if some app wants to use it). To stop it, the following should work:
    $ systemctl --user stop pulseaudio.socket # stop the socket to prevent auto start
    $ systemctl --user stop pulseaudio.service # stop the daemon

    Cheers,

    Alex

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)