GNOME Bugzilla – Bug 343615
[alsamixer] implement read-only / write-only / no-record / no-mute flags
Last modified: 2012-10-02 22:45:01 UTC
[ forwarded from http://bugs.debian.org/369667 ] A bunch of alsa mixer elements are made read-only because they only reflect hardware status, yet gnome-volume-control allows clicking on them and even changes the item, even though it can't actually be changed by the user.
-> gst, they should implement flags for this, so we can read that flag and set the control insensitive based on the flag value.
I suppose this is covered by bug #347557 then. Ronald, do you have a particular API in mind for this by any chance? (e.g do you just want getter/setters of pre-defined flags or freeform/string-based getters/setters or something completely different?) *** This bug has been marked as a duplicate of 347557 ***
just a flag in the GstMixerTrack (e.g. readable/writable) would be enough. If you want to be strict about api compat, just call it read-only and write-only (where 0 = readwrite). I don't think this is a dup of the other report. For the other report, I would prefer to make it a GstMixerOptionsTrack (the one that only alsa uses right now). The mixer should then display this options-track in the same tab as the volume control itself (either hardcoded or as a user preference). that way, the other report needs no new API. Introducing things like a mic-flag and a line-flag and such is really not the right thing, imo. There is a similar report in gnome-media, and this is how I proposed to fix it. I think Brian thought it was an acceptable approach, also.
Created attachment 79743 [details] [review] patch adding readonly/writeonly flags to GstMixerTrack Like this you mean?
Yes, baiscally. And then implement the read-only flags in alsa.
Can't find any obvious way to get this info from alsa - care to make a patch or point me in the right direction?
There is snd_ctl_elem_info_is_writable, that could help.
Tim, is there anything blocking this patch from being committed after freeze? The alsa/etc parts could still be done later and don't look to complicated either ;)
So this should be committed... and later alsa and friends can be updated to use the flags.
Done: commit 794e03640d8db298a65f2ba466eeca93c3491521 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Fri Sep 11 10:16:15 2009 +0100 mixertrack: add READONLY and WRITEONLY flags Should really have been READABLE and WRITABLE, but those are hard to add whilst maintaining backwards compatibility. See #343615. API: GST_MIXER_TRACK_READONLY API: GST_MIXER_TRACK_WRITEONLY Now the alsa mixer just needs to implement them. And when we do that, we could implement the no-record/no-mute flags too.
GstMixer is no more, so let's close this.