From: <tp...@ke...> - 2008-01-07 13:20:01
|
CVS Root: /cvs/gstreamer Module: gst-plugins-base Changes by: tpm Date: Mon Jan 07 2008 13:20:05 UTC Log message: Patch by: Jerone Young <jerone at gmail com> * ext/alsa/gstalsamixer.c: (gst_alsa_mixer_find_master_mixer): If there's no mixer track by the name of 'Master' or 'Front', check if there's one called 'PCM' before trying the generic fallback logic (fixes #506928, where we pick 'Mic' as master track for the AD1984 card in a Thinkpad T61/X61 laptop). Modified files: . : ChangeLog ext/alsa : gstalsamixer.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/ChangeLog.diff?r1=1.3678&r2=1.3679 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/ext/alsa/gstalsamixer.c.diff?r1=1.39&r2=1.40 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-base/ChangeLog,v retrieving revision 1.3678 retrieving revision 1.3679 diff -u -d -r1.3678 -r1.3679 --- ChangeLog 7 Jan 2008 11:40:03 -0000 1.3678 +++ ChangeLog 7 Jan 2008 13:19:49 -0000 1.3679 @@ -1,3 +1,13 @@ +2008-01-07 Tim-Philipp Müller <tim at centricular dot net> + + Patch by: Jerone Young <jerone at gmail com> + * ext/alsa/gstalsamixer.c: (gst_alsa_mixer_find_master_mixer): + If there's no mixer track by the name of 'Master' or 'Front', + check if there's one called 'PCM' before trying the generic + fallback logic (fixes #506928, where we pick 'Mic' as master + track for the AD1984 card in a Thinkpad T61/X61 laptop). 2008-01-07 Wim Taymans <wim...@co...> * gst/playback/gstplay-enum.c: Index: gstalsamixer.c RCS file: /cvs/gstreamer/gst-plugins-base/ext/alsa/gstalsamixer.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- gstalsamixer.c 16 Sep 2007 01:56:21 -0000 1.39 +++ gstalsamixer.c 7 Jan 2008 13:19:50 -0000 1.40 @@ -155,6 +155,16 @@ element = snd_mixer_elem_next (element); } + /* If not, check if we have a playback mixer labelled as 'PCM' */ + 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), "PCM") == 0) { + return element; + } + element = snd_mixer_elem_next (element); + } /* If not, check if we have a playback mixer with both volume and switch */ element = snd_mixer_first_elem (handle); for (i = 0; i < count; i++) { |