diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-05-08 13:08:03 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-05-08 13:11:09 +0200 |
commit | 0820f21717e8c0d2c164e532350902328ad286f0 (patch) | |
tree | cad6d9a25ece16f9707f5ef2a265173e396c7678 /kmix | |
parent | a4c1404ca89260fe6ff3e46faa5ac858a82f16ba (diff) | |
download | tdemultimedia-0820f21717e8c0d2c164e532350902328ad286f0.tar.gz tdemultimedia-0820f21717e8c0d2c164e532350902328ad286f0.zip |
Fix adjusting volume on mono capture device
This resolves Bug 1488
(cherry picked from commit 8b4b43901c2c1af83895220d1f832757030e3bc6)
Diffstat (limited to 'kmix')
-rw-r--r-- | kmix/mixer_alsa9.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kmix/mixer_alsa9.cpp b/kmix/mixer_alsa9.cpp index 4666b01a..15bd184a 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 ) ) |