Bug 57684 - default multi sink profile does not create digital sink on startup
Summary: default multi sink profile does not create digital sink on startup
Status: RESOLVED NOTABUG
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: alsa (show other bugs)
Version: unspecified
Hardware: ARM Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-29 11:38 UTC by sam.right
Modified: 2012-12-02 19:57 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
pulseaudio verbose log (112.50 KB, text/plain)
2012-12-02 18:33 UTC, sam.right
Details

Description sam.right 2012-11-29 11:38:14 UTC
I have a usb sound card and would like to have analogue output and digital output presented as two sinks under pulseaudio server. 

To achieve this I added a multi-sink profile in /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf. That works if I switch the profile from analog-output (default profile) to multi-sink (which contains analog-output and iec958-stereo-output). The system will create a digital output sink after the switch. 

I would like it to be done automatically whenever an alsa card is detected by the system to avoid manual input. I modified priority of the multi-sink profile to make it default however pulseaudio does not create a digital sink after startup even the multi-sink profile is now the active one.

Can this be fixed?
Comment 1 sam.right 2012-11-29 11:39:14 UTC
Running pulseaudio 2.1
Comment 2 Tanu Kaskinen 2012-12-02 18:19:26 UTC
If the multi-sink profile is active, but there's no sink for the digital output, something went wrong. Could you take a verbose pulseaudio log, as instructed here: https://wiki.ubuntu.com/PulseAudio/Log , and attach it here?

As a sidenote, modifying the priorities shouldn't be needed if you have module-card-restore loaded (and it's loaded by default). Whenever you select a card profile, module-card-restore will remember that selection and restore it when pulseaudio restarts (or when the card is plugged in after unplugging it).
Comment 3 sam.right 2012-12-02 18:33:12 UTC
Created attachment 70938 [details]
pulseaudio verbose log

pulseaudio verbose log as created by running 

pulseaudio --system -vvvv --log-time=1 > /tmp/pulseverbose.log 2>&1
Comment 4 sam.right 2012-12-02 18:34:22 UTC
debug log attached. Let me know if you need anything else.
Comment 5 Tanu Kaskinen 2012-12-02 19:02:31 UTC
It looks like the sound card doesn't support using both analog and digital output at the same time, so it's expected that the multi-sink profile doesn't work. The reason why it appeared to work when you manually changed from a single-sink profile to the multi-sink profile was probably that the analog sink was suspended during the profile switch, so the alsa device wasn't in use, making it possible to create the digital sink. When the multi-sink profile is activated at startup, the alsa device is opened when the analog sink is created, and then creating the digital sink fails.

To me it looks like there's no bug.
Comment 6 sam.right 2012-12-02 19:18:52 UTC
Thanks for your help looking into this.

Is there any other way to create a fake sink that links to the digital output? I don't really need them to be able to produce sounds at the same time but it will make things a lot easier if analog and digital output can be presented as separate sinks so the application can just switch to the associated sink instead of going through profile switching and sink probing etc.
Comment 7 sam.right 2012-12-02 19:27:32 UTC
Is it possible to force release the device or put the device into sleep mode after the single iteration of alsa device detection is successful? This could solve the problem.
Comment 8 Tanu Kaskinen 2012-12-02 19:57:27 UTC
(In reply to comment #7)
> Is it possible to force release the device or put the device into sleep mode
> after the single iteration of alsa device detection is successful? This
> could solve the problem.

No, the card initialization routine is what it is, and it's not possible to affect it without modifying the code. And if you suggest that the code should be changed, that won't be done, because all sinks of one card profile are supposed to be usable simultaneously.

Currently there's no nice way to route audio to targets that are not currently active, so switching card profiles (and/or sink ports) is necessary. There's some hope that this will be improved in the not-so-distant future. This is one of the biggest problems in pulseaudio, and there's work being done to improve the situation.

I'll close this bug with NOTABUG resolution, since the failure to create the digital sink is expected behavior.


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.