summaryrefslogtreecommitdiffstats
path: root/kmix
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-05-08 13:08:03 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-05-08 13:08:13 +0200
commit8b4b43901c2c1af83895220d1f832757030e3bc6 (patch)
tree57dcd62e9bbb75f5bcf4dae4881dc88a73fe9e52 /kmix
parent849cf2c537145e36433311b867077b212e4a7026 (diff)
downloadtdemultimedia-8b4b43901c2c1af83895220d1f832757030e3bc6.tar.gz
tdemultimedia-8b4b43901c2c1af83895220d1f832757030e3bc6.zip
Fix adjusting volume on mono capture device
This resolves Bug 1488
Diffstat (limited to 'kmix')
-rw-r--r--kmix/mixer_alsa9.cpp6
1 files changed, 4 insertions, 2 deletions
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 ) )