Bug 51662

Summary: libcanberra based sounds fail when pulseaudio is not enabled
Product: libcanberra Reporter: Dominique Leuenberger <dominique-freedesktop.org>
Component: UnspecifiedAssignee: Lennart Poettering <lennart>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
URL: http://code.google.com/p/chromium/issues/detail?id=167769
Whiteboard:
i915 platform: i915 features:
Attachments: Use multi as default backend and 'fix' it.
Cleaner patch: do not just strip the check, but do the same as in other backends.. and catch it in both places.
Final patch which we now ship

Description Dominique Leuenberger 2012-07-02 12:34:57 UTC
Created attachment 63719 [details] [review]
Use multi as default backend and 'fix' it.

This bug was originally reported in openSUSE:
https://bugzilla.novell.com/show_bug.cgi?id=753243

I a feature complete libcanberra, with pulse, alsa, gstreamer and multi plugin is being installed (default loader=dso), then pulse is the only plugin being used (unless specifying CANBERRA_DRIVER=[...]).

If now pulse is disabled on a machine (but installed), this results in no sound:
- The pulse plugin 'loads', but fails to connect to the sound server.

I created a small patch, that adds 'multi' as the 'preferred' plugin to ca_driver_order.

Additionally, I had to patch multi.c: the 'driver' is not always defined in this case (which is also expected: a few lines further down there is a if(c->driver) statement.. )

With this patch, when PA is enabled, it is being used.. otherwise it falls back to alsa (or further).

What do you think? Worthy to be merged?
Comment 1 Dominique Leuenberger 2012-07-02 13:46:44 UTC
Created attachment 63725 [details] [review]
Cleaner patch: do not just strip the check, but do the same as in other backends.. and catch it in both places.
Comment 2 Dominique Leuenberger 2012-07-20 18:40:16 UTC
Created attachment 64461 [details] [review]
Final patch which we now ship
Comment 3 Dominique Leuenberger 2012-11-01 13:52:35 UTC
Lennart,

Do you have an opinion about this one?
Comment 4 rob j. 2013-01-03 12:33:50 UTC
Please refer to the information I posted in the bug report at Chromium development. Notice the stack traces to point the very likely suspect to be libcanberra trying to connect pulse which isn't installed. Removing libcanberra-pulse resolved the issue for me, you might want to look for another solution/patch ^^ Thanks

My initial report: http://code.google.com/p/chromium/issues/detail?id=167769
Merged with report: http://code.google.com/p/chromium/issues/detail?id=76600

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.