Bug 92973

Summary: Pulseaudio not recognizing device 1 of multi-device USB soundcard
Product: PulseAudio Reporter: Christian Leibig <christian.leibig>
Component: alsaAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Pulseaudio verbose log
output of aplay -lL
output of "pacmd list"
output of "pactl list"
udevd verbose log (sorted)
contents of /dev/snd, /proc/asound/cards and /proc/asound/devices

Description Christian Leibig 2015-11-16 22:49:53 UTC
Created attachment 119719 [details]
Pulseaudio verbose log

Hi,

I'm using a gaming USB DAC/Soundcard in Linux, the device is called "Astro Mixamp Pro TR". It has a PC mode where it works as a soundcard, providing multiple audio devices under a single system device. In my system it's assigned the card id 2 and the name "Pro". Device 0 supports 2.0 Stereo, device 1 supports 5.1 surround.

There is no official Linux support for this card, however it works fine in Alsa, so it should be able to work with PulseAudio.

Both devices work fine in Alsa:
$ aplay -l
[...]
card 2: Pro [Astro MixAmp Pro], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 2: Pro [Astro MixAmp Pro], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ pasuspender -- speaker-test -D plughw:Pro,0 -c2
$ speaker-test -D plughw:Pro,1 -c6

You can already see that for device 0 I need to use pasuspender because it is claimed by pulseaudio. Device 1 however is not in use and can be accessed directly by alsa.

My problem now is that all functionality of device 1 is not recognized in pulseaudio, I can only choose stereo profiles in pavucontrol. From the pulseaudio log it seems that device 1 is never really configured, although I'm not sure what that would even look like. I have attached the very verbose pulseaudio log when connecting the device.


From the pulseaudio -vvvvv logfile, though this all seems to be trying to configure only card 2 device 0:
[...]
D: [pulseaudio] alsa-mixer.c: Looking at profile output:analog-surround-51
D: [pulseaudio] alsa-mixer.c: Checking for playback on Analog Surround 5.1 (analog-surround-51)
D: [pulseaudio] alsa-util.c: Trying surround51:2 with SND_PCM_NO_AUTO_FORMAT ...
D: [pulseaudio] alsa-util.c: Managed to open surround51:2
D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_any() failed: Invalid argument
D: [pulseaudio] alsa-util.c: Trying surround51:2 without SND_PCM_NO_AUTO_FORMAT ...
D: [pulseaudio] alsa-util.c: Managed to open surround51:2
D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_any() failed: Invalid argument
D: [pulseaudio] alsa-util.c: Trying plug:surround51:2 with SND_PCM_NO_AUTO_FORMAT ...
D: [pulseaudio] alsa-util.c: Managed to open plug:surround51:2
I: [pulseaudio] pcm_params.c: Slave PCM not usable
D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_any() failed: Invalid argument
D: [pulseaudio] alsa-util.c: Trying plug:surround51:2 without SND_PCM_NO_AUTO_FORMAT ...
D: [pulseaudio] alsa-util.c: Managed to open plug:surround51:2
I: [pulseaudio] pcm_params.c: Slave PCM not usable
D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_any() failed: Invalid argument
I: [pulseaudio] alsa-util.c: Failed to set hardware parameters on plug:surround51:2: Invalid argument
D: [pulseaudio] alsa-mixer.c: Caching failure to open output:analog-surround-51
D: [pulseaudio] alsa-mixer.c: Skipping profile output:analog-surround-51+input:analog-mono - will not be able to open output:analog-surround-51
D: [pulseaudio] alsa-mixer.c: Skipping profile output:analog-surround-51+input:analog-stereo - will not be able to open output:analog-surround-51
D: [pulseaudio] alsa-mixer.c: Skipping profile output:analog-surround-51+input:iec958-stereo - will not be able to open output:analog-surround-51


One thing I found is that aplay -L lists the following:
sysdefault:CARD=Pro
    Astro MixAmp Pro, USB Audio
    Default Audio Device
front:CARD=Pro,DEV=0
    Astro MixAmp Pro, USB Audio
    Front speakers
surround21:CARD=Pro,DEV=0
    Astro MixAmp Pro, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Pro,DEV=0
    Astro MixAmp Pro, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Pro,DEV=0
    Astro MixAmp Pro, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Pro,DEV=0
    Astro MixAmp Pro, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Pro,DEV=0
    Astro MixAmp Pro, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Pro,DEV=0
    Astro MixAmp Pro, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Pro,DEV=0
    Astro MixAmp Pro, USB Audio
    IEC958 (S/PDIF) Digital Audio Output

Notice that all entries are for CARD=Pro and DEV=0, even the surround modes which should belong to DEV=1. But trying to debug this further has not lead anywhere, Alsa just doesn't give me enough information. If you have any tips on that I'd be happy, too.

If you need more information just ask, and I'm happy for any help with this. Been spending a couple of hours on this problem already and I'm not getting further without some experts.

System is Gentoo Linux 64-bit, Pulseaudio version is 7.1.
Comment 1 Christian Leibig 2015-11-16 22:50:46 UTC
Created attachment 119720 [details]
output of aplay -lL
Comment 2 Christian Leibig 2015-11-16 22:52:11 UTC
Created attachment 119721 [details]
output of "pacmd list"
Comment 3 Christian Leibig 2015-11-16 22:52:25 UTC
Created attachment 119722 [details]
output of "pactl list"
Comment 4 Christian Leibig 2015-11-16 22:53:15 UTC
Created attachment 119723 [details]
udevd verbose log (sorted)
Comment 5 Christian Leibig 2015-11-16 22:55:46 UTC
Created attachment 119724 [details]
contents of /dev/snd, /proc/asound/cards and /proc/asound/devices
Comment 6 Raymond 2015-11-17 06:54:06 UTC
you need to ask aksa devel how to modify USB-Audio.conf so that suuround50 use device 1 instead of device 0

http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/USB-Audio.conf;hb=HEAD
Comment 7 Raymond 2015-11-17 08:41:30 UTC
If a device requires non-standard definitions for front, surround40,
 # surround51, surround71 or iec958, they can be defined here.
Comment 8 GitLab Migration User 2018-07-30 09:54:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/109.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.