mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
ext/alsa/gstalsamixertrack.c: Make sure playback volumes aren't accidentally overwritten by capture volumes if an als...
Original commit message from CVS: * ext/alsa/gstalsamixertrack.c: (gst_alsa_mixer_track_update_alsa_capabilities): Make sure playback volumes aren't accidentally overwritten by capture volumes if an alsa mixer track has both playback and capture capabilities: we create two GstMixerTracks in that case, so make sure we query only the alsa capabilities that refer to the type of GstMixerTrack we created from the dual capability alsa element. Should fix issues with Audigy2 sound cards (#518082).
This commit is contained in:
parent
555feaa11b
commit
dc9eb0d6b8
2 changed files with 38 additions and 14 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2008-05-27 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||
|
||||
* ext/alsa/gstalsamixertrack.c:
|
||||
(gst_alsa_mixer_track_update_alsa_capabilities):
|
||||
Make sure playback volumes aren't accidentally overwritten by
|
||||
capture volumes if an alsa mixer track has both playback and
|
||||
capture capabilities: we create two GstMixerTracks in that
|
||||
case, so make sure we query only the alsa capabilities that
|
||||
refer to the type of GstMixerTrack we created from the dual
|
||||
capability alsa element. Should fix issues with Audigy2 sound
|
||||
cards (#518082).
|
||||
|
||||
2008-05-27 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||
|
||||
* tests/check/pipelines/oggmux.c: (test_pipeline):
|
||||
|
|
|
@ -75,28 +75,40 @@ gst_alsa_mixer_track_update_alsa_capabilities (GstAlsaMixerTrack * alsa_track)
|
|||
alsa_track->alsa_flags = 0;
|
||||
alsa_track->capture_group = -1;
|
||||
|
||||
/* common flags */
|
||||
if (snd_mixer_selem_has_common_volume (alsa_track->element))
|
||||
alsa_track->alsa_flags |= GST_ALSA_MIXER_TRACK_VOLUME;
|
||||
|
||||
if (snd_mixer_selem_has_playback_volume (alsa_track->element))
|
||||
alsa_track->alsa_flags |= GST_ALSA_MIXER_TRACK_PVOLUME;
|
||||
|
||||
if (snd_mixer_selem_has_capture_volume (alsa_track->element))
|
||||
alsa_track->alsa_flags |= GST_ALSA_MIXER_TRACK_CVOLUME;
|
||||
|
||||
if (snd_mixer_selem_has_common_switch (alsa_track->element))
|
||||
alsa_track->alsa_flags |= GST_ALSA_MIXER_TRACK_SWITCH;
|
||||
|
||||
if (snd_mixer_selem_has_playback_switch (alsa_track->element))
|
||||
alsa_track->alsa_flags |= GST_ALSA_MIXER_TRACK_PSWITCH;
|
||||
/* Since we create two separate mixer track objects for alsa elements that
|
||||
* support both playback and capture, we're going to 'hide' the alsa flags
|
||||
* that don't pertain to this mixer track from alsa_flags, otherwise
|
||||
* gst_alsa_mixer_track_update() is going to do things we don't want */
|
||||
|
||||
if (snd_mixer_selem_has_capture_switch (alsa_track->element)) {
|
||||
alsa_track->alsa_flags |= GST_ALSA_MIXER_TRACK_CSWITCH;
|
||||
/* playback flags */
|
||||
if ((GST_MIXER_TRACK (alsa_track)->flags & GST_MIXER_TRACK_OUTPUT)) {
|
||||
if (snd_mixer_selem_has_playback_volume (alsa_track->element))
|
||||
alsa_track->alsa_flags |= GST_ALSA_MIXER_TRACK_PVOLUME;
|
||||
|
||||
if (snd_mixer_selem_has_capture_switch_exclusive (alsa_track->element)) {
|
||||
alsa_track->alsa_flags |= GST_ALSA_MIXER_TRACK_CSWITCH_EXCL;
|
||||
alsa_track->capture_group =
|
||||
snd_mixer_selem_get_capture_group (alsa_track->element);
|
||||
if (snd_mixer_selem_has_playback_switch (alsa_track->element))
|
||||
alsa_track->alsa_flags |= GST_ALSA_MIXER_TRACK_PSWITCH;
|
||||
}
|
||||
|
||||
/* capture flags */
|
||||
if ((GST_MIXER_TRACK (alsa_track)->flags & GST_MIXER_TRACK_INPUT)) {
|
||||
if (snd_mixer_selem_has_capture_volume (alsa_track->element))
|
||||
alsa_track->alsa_flags |= GST_ALSA_MIXER_TRACK_CVOLUME;
|
||||
|
||||
if (snd_mixer_selem_has_capture_switch (alsa_track->element)) {
|
||||
alsa_track->alsa_flags |= GST_ALSA_MIXER_TRACK_CSWITCH;
|
||||
|
||||
if (snd_mixer_selem_has_capture_switch_exclusive (alsa_track->element)) {
|
||||
alsa_track->alsa_flags |= GST_ALSA_MIXER_TRACK_CSWITCH_EXCL;
|
||||
alsa_track->capture_group =
|
||||
snd_mixer_selem_get_capture_group (alsa_track->element);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue