##(see the SpecSpec for an explanation) * '''Launchpad Entry''': UbuntuSpec:multiuser-soundcards-pulseaudio * '''Created''': * '''Contributors''': David Henningsson * '''Packages affected''': PulseAudio, possibly more == Summary == PulseAudio currently assumes all soundcards are of exclusive use to the person logged into the current X session. There are several use cases where this assumption is not valid. We need to investigate possible solutions to this problem. {{{#!wiki comment == Release Note == This section should include a paragraph describing the end-user impact of this change. It is meant to be included in the release notes of the first release in which it is implemented. (Not all of these will actually be included in the release notes, at the release manager's discretion; but writing them is a useful exercise.) It is mandatory. == Rationale == This should cover the _why_: why is this change being proposed, what justifies it, where we see this justified. }}} == User stories == * User Foo has one of his soundcards connected to a long cable that goes to speakers in another room, where it serves as a media player. Foo wants to control what music is being played in that room, even if someone else is sitting in front of the computer. * User Bar needs to run a program which needs to output a sound, regardless of who currently logged in. It could e g be some kind of alarm. * User Gavitron has a headless PC. X11 has been disabled at boot, and no user logs in at console. Speakers are plugged in to this computer. Users visit a website served from this machine, and select the music they wish to hear. (Currently this scenario appears impossible with PulseAudio.) == Assumptions == Removing !PulseAudio is not trivial, so it would be better if we could support these use cases in PA than to throw PA out the window. == Design == Ideas lifted recently in pulseaudio-discuss: * Write udev rules to change permissions on the audio device(s). * Make a user part of the "audio" group. * Reconfigure PA to open up for other users to connect to the currently active PA. Other ideas (these have been disliked in pulseaudio-discuss though): * Move the reserve API to the system DBus? * Run !PulseAudio as a system-wide daemon? * Run !PulseAudio on top of dmix? === Write udev rules === By writing udev rules, one can change the device permissions on the audio device nodes. * Pros: * !PulseAudio follows udev rules / device permission * "The right way" to configure multi-seat, or that the soundcard does not belong to the logged in user * Safe and secure * Cons: * Writing udev rules is not easily accessible for the newbie Ubuntu user * Only one at a time can access the audio device - it becomes busy. * Suitable use cases: * System-wide media player daemon which has a dedicated soundcard === Adding the user to the audio group === A user added to the audio group can access the audio devices even if not logged in. * Pros: * Easy to configure * Cons: * Only one at a time can access the audio device - it becomes busy. * Spy-on-mic possible, but only if the user is not already using the soundcard * Suitable use cases: === Opening up PulseAudio for other users to use === * Pros: * Proper mixing between active user and background users * Easy to configure * Cons: * Less secure (spy-on-mic problem) * Interruptions when user logs in and out * Suitable use cases: * When background services need to inform users by making an audio alarm * When security is not an issue {{{#!wiki comment == Implementation == This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like: === UI Changes === Should cover changes required to the UI, or specific UI that is required to implement this === Code Changes === Code changes should include an overview of what needs to change, and in some cases even the specific details. === Migration === Include: * data migration, if any * redirects from old URLs to new ones, if any * how users will be pointed to the new way of doing things, if necessary. == Test/Demo Plan == It's important that we are able to test new features, and demonstrate them to users. Use this section to describe a short plan that anybody can follow that demonstrates the feature is working. This can then be used during testing, and to show off after release. Please add an entry to http://testcases.qa.ubuntu.com/Coverage/NewFeatures for tracking test coverage. This need not be added or completed until the specification is nearing beta. == Unresolved issues == This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved. == BoF agenda and discussion == Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected. }}} ---- CategorySpec