GNOME Bugzilla – Bug 304200
Ability to choose ALSA device
Last modified: 2006-08-23 19:54:41 UTC
Currently the only media players I can find that let me specifically select the ALSA device I want to use are XMMS and Beep-Media-Player. Rhythmbox should have an option that lets you set the ALSA device to use. Please bear in mind that I have an Audiophile 2496 as my secondary sound card solely for music and video, and it is a 24-bit interface so I have to use plug to define a custom device name, "hifi". Beep-Media-Player uses a combo box to allow you to select ALSA device but doesn't list custom ones. The important bit is that it lets you type your own. Many thanks. Alex Jones
rhythmbox uses the gstreamer configuration. You can use gstreamer-properties to select alsa.
No. I can choose a *DEFAULT* device through gstreamer-properties. You should be able to either use the default device or a specific one *just for rhythmbox*. I want to hear Rhythmbox out of my Hi-Fi, but this does not mean I want to hear all of GNOME's bells and whistles out of my Hi-Fi! Thanks
/player/rb-player-gst.c:540 /* Output sink */ mp->priv->sink = gst_gconf_get_default_audio_sink (); Some kind of config option to check whether to use the default audio sink or not? Beep-Media-Player is really pissing me off!
Is anyone hearing me on this? Even Microsoft Windows Media Player lets you explicitly choose audio devices that override the system-wide defaults! It's a useful feature, honest! :(
gst_gconf_get_default_audio_sink (); // ask gstreamer to check the default audio sink for us so we can figure out where the noise is going.
(In reply to comment #4) > Is anyone hearing me on this? Even Microsoft Windows Media Player lets you > explicitly choose audio devices that override the system-wide defaults! It's a > useful feature, honest! :( As this bug still hangs open, I would note that lot of things has changed and now GNOME provides choosing sound card in it's Sound caplet in Control Center menu. Sure, it could be not good enough for people who would like to choose different DE, but it is still progress. It is good enough to close this bug?
Absolutely not I'm afraid. Like I said, I don't want to hear bells and whistles out of my hi-fi. Secondly, the ability to simply "choose a card" is not enough - ALSA fails to open my card in ANY configuration without a plug. I think it has something to do with Endianness. Sucks. I think what is needed is an extension to ESD/esdsink. ESD could have a mixer/routing interface that lets you control volume levels of each open channel independently, and also specify a hardware interface to use. This could even be built into the volume control applet. esdsink could pass an application name or ID to the daemon and this could be used in the mixer UI. This would be the absolute ideal situation. Note that this is not dissimilar to how Mac OS does it, and some of Jimmac's mock-ups for NLD10 suggested the idea. So, Is ESD something we want to be phasing out or would it be worth working on this? A lot of people have a very strong opposition to it. I think it has great potential to be a useful abstraction layer if the lag was sorted out.
OK I drew this up on the back of an envelope, (my) Dia (ability) still sucks, so here it is in written form... Assuming: one ESD has the ability to route audio to many devices. Applications simply need to open an ESDsink with two parameters, an ID and a name. For Rhythmbox, that could be "Rhythmbox" and "org.rhythmbox". ESDsink needs to open a connection to ESD and pass the two parameters. ESD creates a channel for the audio and mixes it internally to a backend (ALSA/OSS), based on the routing settings and channel levels the user has set. ALSA plays my tunes through my phat speakers. Alex is a happy man. Does this sound reasonable? I might try and take this up but I am bound to do a crappy job. Let me know ASAP if I am insane/disillusioned.
I don't think doing this through ESD is a good idea. Changing the ESD protocol sounds painful, and discussions on ESD are almost exclusively focused on getting rid of it. Related: https://wiki.ubuntu.com/GstreamerAudioBackend http://live.gnome.org/GStreamer/esd One possible approach would be to have RBPlayer emit a 'create-sink' signal, and if a handler returns a sink element, use that rather than creating a gconfaudiosink. It would then be possible (more or less) to implement a plugin that created an alsasink element for a specific device in response to that signal.
Alex: What you're talking about sounds very much like what I think JACK (http://jackit.sourceforge.net/) is. I don't think GStreamer 0.10 has work JACK support yet though.
What about Polypaudio? Also, Bug 342950 might be of some interest to abstract the functionality. How's that for a design?
How about just following the GNOME setting in the control-center (in GNOME 2.15)
Hi Bastien Please see comment #7!
What about comment #7? Nobody in their right mind would want to use esound for anything, frankly. Thecode to select the output sink should follow the preferences in the control-center.
Hi Bastien It, inherently, already does, but purely because the code in the Control Centre preferences modifies your ~/.asoundrc.asoundconf. As far as I can tell, it doesn't even bother GStreamer about it. This, however, does not solve the problem! I have two sound cards that I happily use in Windows for different roles. I want Rhythmbox to come out of my hifi by some means or another, that's all! A short-term solution would be a preference that lets me select a partial pipeline. I could just bash in "alsasink device=hw:1" and it would be happy days. Thanks
No, the code in the control-center will change the default audio sink (replacing gstreamer-properties) to the halsoundsink (or whatever it's called), and tell this sink which device to use. It doesn't use the alsa configuration at all (unlike the default soundcard setup in Fedora's system-config-soundcard).
It appears to run asoundconf in Ubuntu. Indeed, this is the reason why it affects non-gstreamer apps, too. I'll be honest with you and say that I actually have no idea what halsoundsink is or does!
Unless you have the a 2.15.x control-center, you're not using the sound capplet. See the linked bug.
Thanks for the pointer to the other bug. I really am running Ubuntu 6.06, though!
Probably solved in Pulse Audio, so I'm gonna close this one. You're freeeee my little bug friend, freeeeeeee!