summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi Kumar Alamanda <ralama@codeaurora.org>2015-10-02 15:23:26 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-02 15:23:26 +0000
commitfb21e4e53923416672ebbf33910d3c4bea5d15f5 (patch)
tree6480c779e5f79628aa9149d86631e3ca265d1df9
parenta5812aabd43617e0943ceb1115da089df2477db2 (diff)
parent888dc3d2301c438392644b71dbea43b8860687bb (diff)
downloadandroid_hardware_qcom_audio-fb21e4e53923416672ebbf33910d3c4bea5d15f5.tar.gz
android_hardware_qcom_audio-fb21e4e53923416672ebbf33910d3c4bea5d15f5.tar.bz2
android_hardware_qcom_audio-fb21e4e53923416672ebbf33910d3c4bea5d15f5.zip
am 888dc3d2: hal: fix hotword detection failure during music playback
* commit '888dc3d2301c438392644b71dbea43b8860687bb': hal: fix hotword detection failure during music playback
-rw-r--r--hal/audio_extn/soundtrigger.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hal/audio_extn/soundtrigger.c b/hal/audio_extn/soundtrigger.c
index 4d093879..b5475a17 100644
--- a/hal/audio_extn/soundtrigger.c
+++ b/hal/audio_extn/soundtrigger.c
@@ -209,12 +209,14 @@ void audio_extn_sound_trigger_update_device_status(snd_device_t snd_device,
return;
if (snd_device >= SND_DEVICE_OUT_BEGIN &&
- snd_device < SND_DEVICE_OUT_END)
+ snd_device < SND_DEVICE_OUT_END) {
device_type = PCM_PLAYBACK;
- else if (snd_device >= SND_DEVICE_IN_BEGIN &&
- snd_device < SND_DEVICE_IN_END)
+ } else if (snd_device >= SND_DEVICE_IN_BEGIN &&
+ snd_device < SND_DEVICE_IN_END) {
+ if (snd_device == SND_DEVICE_IN_CAPTURE_VI_FEEDBACK)
+ return;
device_type = PCM_CAPTURE;
- else {
+ } else {
ALOGE("%s: invalid device 0x%x, for event %d",
__func__, snd_device, event);
return;