-
Notifications
You must be signed in to change notification settings - Fork 689
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
enumerate ALSA devices #5611
Comments
People involved in #5352 are probably also interested in this. |
I'm not sure what your saying here, sounds like you want Clementine to automatically recognize the output device and then what??? I guest that would be nice but? |
I don't think you exactly understand. Go look at how Pulseaudio devices are listed now. The intent is to have the same functionality for ALSA. Instead of just having the ability to output to the 'default' ALSA device, we want the ability to pick where the output goes without having to even look at Pulse. I liked the old configuration system better myself, but the developers have pretty much said that they're never going to accept anything that goes back to that, so we have to work within what exists currently. As far as the complaints about Pulse in general, check my comment from August 26, 2016 in #5344, it covers what options you need to change to get Pulse to quit resampling in the brain-dead manner. |
@Ferroin |
OK, so to clarify further. The change in output selection in Clementine not only nuked the ability to get bit perfect-streaming, it also completely removed the ability to control output routing when using anything but Pulseaudio. This issue is specifically about getting that output routing support back for ALSA. Doing so may or may not make it possible again to get bit-perfect audio output (I don't know enough about the internals of GStreamer and how Clementine uses it to say for certain), but this functionality was used by a lot more people than just those who wanted bit-perfect output. To put it another way, the idea is similar to the ability to output to arbitrary ALSA sinks like the old configuration option let you do, except that Clementine will enumerate them for you and list the actual names, instead of you having to go through /proc yourself and figure out what card identifier to put in the text field. |
@Ferroin Thanks again for the response |
Was there any progress with this idea? When the day comes that I am not able to keep my current linux os build updated with the hacks I've made that kept Clem 1.2.3 running it's over. Outside of some very crude, near cli options, Linux no longer will have support for bit perfect streaming. Leaving us who care with the option of Windoz or Mac with HQPlayer, JRiver, Audivarna, Amarra, Roon, etc players. :( |
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.
As discussed in #5344, the ability to specify an ALSA output device (such as "hw=2,0") has been removed, as confusing to users. Unfortunately, this breaks Clementine for people with non-trivial audio setups who can't use PulseAudio because of bugs in the latter.
So, let's make ALSA as user-friendly as PulseAudio. It turns out all those devices can be enumerated, and thus listed the same way Clementine presents PulseAudio ones.
There are two ways to do so:
For the latter, files that are of interest to us are:
/proc/asound/cards
/proc/asound/card*/pcmp/info (possibly sub/info instead)
By reading those, we can get a mapping of hw=X,Y,Z values to "card: X", "device: Y", "subdevice: Z", and show the human-friendly field "name: " to the user. PulseAudio prefixes that with the card's name (available from /proc/asound/cards) as sadly some cards provide bogus device names like "HDMI 0", I think that's a good idea for ALSA too.
Would you want me to investigate the issue more?
The text was updated successfully, but these errors were encountered: