[pulseaudio-discuss] Cannot have iec958:0 and a52:0 simultaneously?

Tanu Kaskinen tanuk at iki.fi
Thu Jul 15 00:22:45 PDT 2010


On Wed, 2010-07-14 at 19:10 +0000, Michael Rans wrote:
> I have a theory that the $CARD doesn't work for me and may not for
> others because of the way in which the %f in a52:%f is generated.
> 
> Would I be right in saying that %f is incremented for each source or
> sink ie. you cannot have both iec958:0 and a52:0?

No, you wouldn't. %f is the index that alsa assigns to cards. You can
see it for example in /proc/asound/cards. So you can have both iec958:0
and a52:0. Not simultaneously, though, because a52 uses the same device
as iec958:0, but you can switch between them using pulseaudio's card
profiles.

> I see in my logs:
> I: alsa-source.c: Successfully opened device hw:2.
> I: alsa-mixer.c: Successfully attached to mixer 'hw:2'
> ...
> I: alsa-sink.c: Successfully opened device iec958:0.
> I: (alsa-lib)control.c: Invalid CTL iec958:0
> I: alsa-mixer.c: Unable to attach to mixer iec958:0: No such file or
> directory
> I: alsa-mixer.c: Successfully attached to mixer 'hw:0'
> ...
> I: alsa-sink.c: Successfully opened device hdmi:1.
> I: (alsa-lib)control.c: Invalid CTL hdmi:1
> I: alsa-mixer.c: Unable to attach to mixer hdmi:1: No such file or
> directory
> I: alsa-mixer.c: Successfully attached to mixer 'hw:1'
> 
> I also see:
> D: alsa-mixer.c: Checking for playback on Digital Surround 5.1
> (IEC958/AC3) (iec958-ac3-surround-51)
> D: alsa-util.c: Trying a52:0 with SND_PCM_NO_AUTO_FORMAT ...
> D: alsa-util.c: Managed to open a52:0
> D: alsa-util.c: Maximum hw buffer size is 21824 ms
> D: alsa-util.c: Set buffer size first (to 3840 samples), period size
> second (to 480 samples).
> D: alsa-mixer.c: Profile output:iec958-ac3-surround-51 supported.
> 
> But no "Successfully opened a52:0". My theory is that because :0 is
> already taken by iec958:0, Pulseaudio doesn't accept the a52:0 sink.

My theory is that the three first snippets are printed when sink and
source objects are actually created in pulseaudio, while the last
snippet is from the profile scanning phase. The reason why you don't see
"Successfully opened a52:0" is that the a52 sink is not created
automatically - you'll have to select the right card profile first to
get "Successfully opened a52:0" in the log.

> If I replace $CARD with 0, my log says:
> I: alsa-sink.c: Successfully opened device a52:1.

If you replace $CARD with 0, then the a52 device will always use card 0.
Pulseaudio still thinks that it has opened the a52 on card 1, which
happens to be your usb mic (or webcam)...

-- 
Tanu Kaskinen





More information about the pulseaudio-discuss mailing list