Bug 251943

Summary: Please set pulse module to "default" if it is installed.
Product: [Fedora] Fedora Reporter: Lennart Poettering <lpoetter>
Component: alsa-pluginsAssignee: Eric Moret <eric.moret>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: adam, drago01, mishu, rdieter, wwoods
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.0.14-2.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-17 23:11:18 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:
Bug Depends On:    
Bug Blocks: 235704    

Description Lennart Poettering 2007-08-13 16:08:54 UTC
We would like to activate PulseAudio by default in Rawhide now. For this it
would be very useful if the "pulse" ALSA plugin would be mapped to ALSA's
"default" when the alsa-plugins-pulseaudio package is installed.

Basically I think that this:

pcm.!default {
    type pulse
}

ctl.!default {
    type pulse
}

should be added to /etc/alsa/pcm/pulseaudio.conf. (that is what works for me,
but my understanding of the ALSA config file format very limited)

Comment 1 Fedora Update System 2007-08-15 19:42:35 UTC
alsa-plugins-1.0.14-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 2 drago01 2007-08-16 11:38:09 UTC
this bug was filled against devel but only fixed in f7?

Comment 3 Eric Moret 2007-08-17 03:15:28 UTC
It was fixed both in devel and F7. Comment #1 is an automatic message sent by 
Bodhi the staging rpm server which is used only for released Fedora versions.

Comment 4 Fedora Update System 2007-08-24 05:38:23 UTC
alsa-plugins-1.0.14-2.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Adam Goode 2007-10-13 03:48:58 UTC
I don't think this works. I'm not getting any alsa->pulseaudio just by
installing the package in f8. It only works with settings in /etc/asound.conf or
~/.asoundrc.

Just adding /etc/alsa/pcm/pulseaudio.conf does not work for setting default. In
fact, there seems to be no reason for adding anything to /etc/alsa/pcm, in any
of the plugin packages. Having the readme files as documentation is sufficient.

I believe that either /etc/alsa/alsa.conf needs to be patched in the alsa-lib
package to load a pulseaudio.conf file, or something needs to set up
/etc/asound.conf. (But will this conflict with a user's setting?) This is the
only way to get alsa pulseaudio working by default in Fedora.

Comment 6 Rex Dieter 2007-10-17 13:19:30 UTC
Would be nice of this could be addressed soon, would enable KDE to use
pulseaudio by default.

Comment 7 Will Woods 2007-10-17 17:48:45 UTC
One problem: we only want pulseaudio to be the default ALSA device when the
daemon is running. I suggest that the first half of pcm/pulseaudio.conf:

pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}

should get loaded by default (so we can access the 'pulse' alsa device without
changing the default device). But the second half:

pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

should only be present when the pulseaudio daemon is running. Otherwise alsa
stops working, like so:

[wwoods@brinstar alsa]$ aplay /usr/share/sounds/question.wav 
*** PULSEAUDIO: Unable to connect: Connection refused
aplay: main:546: audio open error: Connection refused


Comment 8 Lennart Poettering 2007-10-17 23:11:18 UTC
Will: If you don't want PA, than don't install it. If you have installed it, we
should set everything up so that most things work out of the box.

If you want PA to release the audio devices, just wait a second, or use
pasuspender. The should be no reason for not running PA -- if it is installed.

I modified alsa-plugins and alsa-lib now so that the pulse plugin actually
becomes the default -- but only if alsa-plugins-pulse is installed.

alsa-lib 1.0.15-0.4.rc3, alsa-plugins 1.0.14-5

Comment 9 Adam Goode 2007-10-18 03:20:01 UTC
This is great, but note that /etc/alsa/pcm/pulseaudio.conf is still never read
by alsa, and you cannot select the "pulse" device. (In fact, all the
/etc/alsa/pcm/... stuff installed by alsa-plugins are completely useless (except
maybe as documentation, but that should be in /usr/share/doc/...)


$ aplay -D pulse
ALSA lib pcm.c:2145:(snd_pcm_open_noupdate) Unknown PCM pulse
aplay: main:546: audio open error: No such file or directory

("default" device works, and is pulseaudio.)

Comment 10 Lennart Poettering 2007-10-18 12:54:53 UTC
Point taken. I did yet another update now which fixes the definition for the
pulse plugin, but the remaining plugins are still not activated properly due to
their ignored config files. I will leave this bug open for now, and hope that it
will be fixed completely after f8.