Bug 453502

Summary: Pulseaudio does not work with 2 sound cards
Product: [Fedora] Fedora Reporter: Tom Kocourek <n4fwd>
Component: pulseaudioAssignee: Lennart Poettering <lpoetter>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: lkundrak, pierre-bugzilla, stsp2
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-06 13:55:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom Kocourek 2008-07-01 03:15:15 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9) Gecko/2008061712 Fedora/3.0-1.fc9 Firefox/3.0

Description of problem:
Pulseaudio appears to lack the ability to direct an audio output to a particular sound card. I run 2 sound cards in my system. This problem has been around since the first offerings of pulseaudio. I usually "erase" Pulseaudio and use ALSA in it's place. In conjunction with removing Pulseaudio, I usually have to ignore the default mixer program as it also seems to have issues with 2 sound cards. I install "kmix" in it's place because "kmix" is well behaved.

Version-Release number of selected component (if applicable):
pulseaudio-0.9.10-1.fc9

How reproducible:
Always


Steps to Reproduce:
1.Install 2 sound cards in the computer
2.Install Fedora
3.Try and get sound out of either card. Try what few configuration are available.
4. "erase" pulse audio and install Kmix (kdemultimedia package)
5. System -> Preferences -> Hardware -> Sound  and set all sections to ALSA
6. Plugin the speakers to which ever sound card is the "default" mixer
7. Play music or movie and adjust volume with Kmix

Actual Results:
Sound is fixed.

Expected Results:
I should be able to plug into the default sound card and play music and be able to hear the music. (assuming the volumes are set using the default supplied programs, unmuted, etc. - minimal adjustments)

Additional info:
Got tired of the pulseaudio server not working as expected, so I am reporting the problem.

Comment 1 Stas Sergeev 2008-07-27 09:55:39 UTC
I have the same problem. Details follows:
---
$ cat /proc/asound/cards
 0 [CK804          ]: NFORCE - NVidia CK804
                      NVidia CK804 with ALC850 at irq 22
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xf1010000 irq 19
---

All the alsa-based programs are using
the card 0 and work fine. For some strange
reasons, pulseaudio chooses card 1, so no
sound is ever played. I tried but failed
to find any way to tell pulseaudio to use
the device I want it to use. The only way
I can get the sound from pulseaudio, is
in the paman's "Sample Cache" tab. There
I can choose the right device and play.

Maybe this is not a bug at all, but just a
configuration issue. In that case, where and
how to set the default device? paman seems
to be out of any help for that, as well as
the Fedora's gnome-sound-properties. Also,
why it happens that pulseaudio takes the
device 1 and not 0? I explicitly arranged
my modprobe.conf for that device order, yet
it doesn't work for pulseaudio.

Comment 2 Lennart Poettering 2008-08-06 13:55:56 UTC
ALSA device indexes are not stable. Which card become 0 and which card becomes 1 is mostly luck. 

With PulseAudio sound cards are identified by their HAL UDIs. Which device PA picks as default when no prior configuration is found is not defined. If PA chose the wrong device for you, please run "pavucontrol" and mark the device your want to make the default as default by using the right-click menu. Please note that PA also remembers the device last used for a specific program. Thus you might need to move all streams to the new device manually to make PA remember that. Moving a stream to a different device is also possible by right clicking on it.

Comment 3 Stas Sergeev 2008-08-06 16:30:26 UTC
> ALSA device indexes are not stable. Which card become 0 and which card becomes
> 1 is mostly luck.
Not so, because of:
---
options snd slots=snd-intel8x0,snd-hda-intel
---
in /etc/modprobe.conf. They are stable that way.

> With PulseAudio sound cards are identified by their HAL UDIs. Which device PA
> picks as default when no prior configuration is found is not defined.
Maybe defaulting it to card 0 in this case
would be reasonable? At least for those who
define the card order explicitly, this will
help. For others - it won't matter I think.

> If PA
> chose the wrong device for you, please run "pavucontrol" and mark the device
> your want to make the default as default by using the right-click menu.
Thanks, that helps, a kind of.
Sorry for the completely dumb question, but
how to make that change persistent? After
restarting the session, it gets back to the
wrong device.