-
Notifications
You must be signed in to change notification settings - Fork 688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crude ALSA device selection. #5787
base: master
Are you sure you want to change the base?
Conversation
It works by scraping /proc/asound/cards rather than by proper ioctls, doesn't check device suitability (like, an USB microphone would show up as a card despite having no pcm output), and so on. But we can improve it later. For consistency with the PulseAudio finder, only top-level devices are shown. We'd probably want subdevices as well (clementine-player#5352), but unless we query plug sensors, the list would be too spammy for now. Fixes clementine-player#5611.
Hi, could you please comment so I know I'm barking up the right tree? Further improvements would include using a library or ioctls instead of scraping /proc/, device classification, plug detection, subdevice support, etc -- but researching/coding this is kind of a waste of time without some feedback from your side. Does what I'm proposing sound reasonable? Out of 4 screen-attached computers I own, PulseAudio works adequately on 0. Here's one of examples. |
Isn't it better to use ALSA and snd_ctl_card_info() ? |
@jonaski: yeah, that's the plan in the long run. I'm asking about behaviour Clementine's authors want though, not about implementation for now. |
I'm not sure we really care about ALSA but if you want to build this properly (i.e. without parsing Incremental pull requests appreciated too. |
Out of 4 screen-attached computers I own, Pulse works adequately on 0:
In all of these cases, problems are not specific to Clementine in any way (ie, exactly the same happens with mplayer, mpg123, etc). Thus, if without any specific needs I see a 4/4 fail rate on ordinary gear (ok, the armhf laptop probably doesn't count as ordinary), I guess a good part of other users also can't "just use pulseaudio".
Cool, would you prefer the library or ioctls? The former would be way cleaner and saner, the latter has no dependencies. |
Yeah, I get that it's your pet problem :-) I think the library is fine; we probably link to it anyway via gstreamer. |
Since in Pulse audio goes through mixer, to allow multiple stream inputs (AFAIK even single audio stream always goes through the mixer). With direct output to ALSA device - a bit-perfect stream goes into hardware audio device. Also during that - if (as often is) device able to process only single input stream - direct streaming to the device seethes it, and as a side effect makes impossible other sounds to pop-up during streaming. So it can be useful simple feature for musicians and audiophiles. This feature is sort of a poor mans version of Jack. |
Also as we see - it allows for people to bypass PulseAudio - if PulseAudio has issues on their system. Also ALSA has a quite powerful DSL inside, can have it's own processing setup, mixer, input virtual devices that Jack or LMMS are connected to. |
This is a first stab at proper user-friendly ALSA device selection.
Leaves a lot to be wished for, but Works For Me™, and can be built upon.