2008-06-24 Stefan Kost <ensonic@users.sf.net>
+ * ext/alsa/gstalsamixer.c:
+ Also consider "speaker" as a name for master volume. If that doesn't
+ help look for the first non-mono volume control that also has a
+ playback switch.
+
+2008-06-24 Stefan Kost <ensonic@users.sf.net>
+
* ChangeLog:
Forgot to save the ChangeLog :/
element = snd_mixer_elem_next (element);
}
- /* If not, check if we have a playback mixer with both volume and switch */
+ /* If not, check if we have a playback mixer labelled as 'Speaker' */
+ element = snd_mixer_first_elem (handle);
+ for (i = 0; i < count; i++) {
+ if (snd_mixer_selem_has_playback_volume (element) &&
+ strcmp (snd_mixer_selem_get_name (element), "Speaker") == 0) {
+ return element;
+ }
+ element = snd_mixer_elem_next (element);
+ }
+
+ /* If not, check if we have a playback mixer with both volume and switch that
+ * is not mono */
+ element = snd_mixer_first_elem (handle);
+ for (i = 0; i < count; i++) {
+ if (snd_mixer_selem_has_playback_volume (element) &&
+ snd_mixer_selem_has_playback_switch (element) &&
+ !snd_mixer_selem_is_playback_mono (element)) {
+ return element;
+ }
+ element = snd_mixer_elem_next (element);
+ }
+
+ /* If not, check if we have any playback mixer with both volume and switch */
element = snd_mixer_first_elem (handle);
for (i = 0; i < count; i++) {
if (snd_mixer_selem_has_playback_volume (element) &&