From 8b4b43901c2c1af83895220d1f832757030e3bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 8 May 2013 13:08:03 +0200 Subject: Fix adjusting volume on mono capture device This resolves Bug 1488 --- kmix/mixer_alsa9.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'kmix/mixer_alsa9.cpp') diff --git a/kmix/mixer_alsa9.cpp b/kmix/mixer_alsa9.cpp index 8f00c8d9..46d98d41 100644 --- a/kmix/mixer_alsa9.cpp +++ b/kmix/mixer_alsa9.cpp @@ -763,13 +763,15 @@ Mixer_ALSA::writeVolumeToHW( int devnum, Volume& volume ) if (snd_mixer_selem_has_playback_volume( elem ) && !volume.isCapture() ) { snd_mixer_selem_set_playback_volume ( elem, SND_MIXER_SCHN_FRONT_LEFT, left ); - if ( ! snd_mixer_selem_is_playback_mono ( elem ) ) + if ( ! snd_mixer_selem_is_playback_mono ( elem ) ) { snd_mixer_selem_set_playback_volume ( elem, SND_MIXER_SCHN_FRONT_RIGHT, right ); + } } else if ( snd_mixer_selem_has_capture_volume( elem ) && volume.isCapture() ) { snd_mixer_selem_set_capture_volume ( elem, SND_MIXER_SCHN_FRONT_LEFT, left ); - if ( ! snd_mixer_selem_is_playback_mono ( elem ) ) + if ( ! snd_mixer_selem_is_capture_mono ( elem ) ) { snd_mixer_selem_set_capture_volume ( elem, SND_MIXER_SCHN_FRONT_RIGHT, right ); + } } if ( snd_mixer_selem_has_playback_switch( elem ) ) -- cgit v1.2.1