Skip to content

Commit

Permalink
audio: Fix submix output device check.
Browse files Browse the repository at this point in the history
-AUDIO_DEVICE_IN_FM_RX is incorrectly matched
 with AUDIO_DEVICE_OUT_REMOTE_SUBMIX because
 method audio_is_remote_submix_device is not
 checking for AUDIO_DEVICE_BIT_IN.

-Fix is to add AUDIO_DEVICE_BIT_IN while doing
 the check for AUDIO_DEVICE_OUT_REMOTE_SUBMIX.

CRs-Fixed: 566837

Change-Id: I47ca3bd151da848a444d4bcf83a56e866f20d4f7
(cherry picked from commit f8573b76d6c03e1a9eff34e093056a810f898509)
(cherry picked from commit ae982a488c68e0cd06622e7ee7a31fddb1f4d131)
  • Loading branch information
Pavan Chikkala authored and broodplank committed Nov 11, 2013
1 parent 5fa16e3 commit 1579201
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/system/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ static inline bool audio_is_usb_device(audio_devices_t device)

static inline bool audio_is_remote_submix_device(audio_devices_t device)
{
if ((device & AUDIO_DEVICE_OUT_REMOTE_SUBMIX) == AUDIO_DEVICE_OUT_REMOTE_SUBMIX
if ((device & AUDIO_DEVICE_BIT_IN | device & AUDIO_DEVICE_OUT_REMOTE_SUBMIX) == AUDIO_DEVICE_OUT_REMOTE_SUBMIX
|| (device & AUDIO_DEVICE_IN_REMOTE_SUBMIX) == AUDIO_DEVICE_IN_REMOTE_SUBMIX)
return true;
else
Expand Down

0 comments on commit 1579201

Please sign in to comment.