summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2017-02-10 19:28:35 +0100
committerChristopher N. Hesse <raymanfx@gmail.com>2017-02-11 13:59:48 +0000
commit757e2d8a772b4fcaa1f194eb98a77f97d35af932 (patch)
tree5e23556dee4a7e992b5fa1ad2ba950250f77bbed /audio
parent04037e7121c617e03640a45249dbc3950f3a0c90 (diff)
downloadhardware_samsung-757e2d8a772b4fcaa1f194eb98a77f97d35af932.tar.gz
hardware_samsung-757e2d8a772b4fcaa1f194eb98a77f97d35af932.tar.bz2
hardware_samsung-757e2d8a772b4fcaa1f194eb98a77f97d35af932.zip
audio: Remove device bit only on active_input
This makes the code less confusing. Change-Id: I6020f892f5165a6c784b05737e29b24d7121b8c9
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_hw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 7783ae6..3659277 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -617,9 +617,9 @@ static snd_device_t get_input_snd_device(struct audio_device *adev, audio_device
source = (active_input == NULL) ?
AUDIO_SOURCE_DEFAULT : active_input->source;
- in_device = ((active_input == NULL) ?
- AUDIO_DEVICE_NONE : active_input->devices)
- & ~AUDIO_DEVICE_BIT_IN;
+ in_device = (active_input == NULL) ?
+ AUDIO_DEVICE_NONE :
+ (active_input->devices & ~AUDIO_DEVICE_BIT_IN);
channel_mask = (active_input == NULL) ?
AUDIO_CHANNEL_IN_MONO : active_input->main_channels;