From 76b455c910320d308b0f162cac62db0f8fb0b4c6 Mon Sep 17 00:00:00 2001 From: Ralf Herz Date: Mon, 10 Sep 2018 13:58:04 +0200 Subject: [PATCH] hal: Fix SPDIF/HDMI PCM capture in qcs405 Use an ACDB ID for unmodified PCM capture for SPDIF/HDMI. Use dedicated audio device for HDMI ARC. Change-Id: Ia59c2e587e7951d5fb9a251120189cf9404c0863 --- hal/audio_extn/audio_extn.h | 4 ++++ hal/msm8974/platform.c | 9 ++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hal/audio_extn/audio_extn.h b/hal/audio_extn/audio_extn.h index 6c5d0e13..6ec07b38 100644 --- a/hal/audio_extn/audio_extn.h +++ b/hal/audio_extn/audio_extn.h @@ -52,6 +52,10 @@ #define AUDIO_DEVICE_IN_PROXY (AUDIO_DEVICE_BIT_IN | 0x1000000) #endif +#ifndef AUDIO_DEVICE_IN_HDMI_ARC +#define AUDIO_DEVICE_IN_HDMI_ARC (AUDIO_DEVICE_BIT_IN | 0x8000000) +#endif + #ifndef INCALL_MUSIC_ENABLED #define AUDIO_OUTPUT_FLAG_INCALL_MUSIC 0x80000000 //0x8000 #endif diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c index 3337e10a..0c4e2034 100644 --- a/hal/msm8974/platform.c +++ b/hal/msm8974/platform.c @@ -649,9 +649,9 @@ static int acdb_device_table[SND_DEVICE_MAX] = { [SND_DEVICE_IN_HEADSET_MIC_FLUENCE] = 47, [SND_DEVICE_IN_VOICE_SPEAKER_MIC] = 11, [SND_DEVICE_IN_VOICE_HEADSET_MIC] = 8, - [SND_DEVICE_IN_SPDIF] = 4, - [SND_DEVICE_IN_HDMI_MIC] = 4, - [SND_DEVICE_IN_HDMI_ARC] = 4, + [SND_DEVICE_IN_SPDIF] = 143, + [SND_DEVICE_IN_HDMI_MIC] = 143, + [SND_DEVICE_IN_HDMI_ARC] = 143, [SND_DEVICE_IN_BT_SCO_MIC] = 21, [SND_DEVICE_IN_BT_SCO_MIC_NREC] = 122, [SND_DEVICE_IN_BT_SCO_MIC_WB] = 38, @@ -4591,8 +4591,7 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d snd_device = SND_DEVICE_IN_SPDIF; } else if (in_device & AUDIO_DEVICE_IN_AUX_DIGITAL) { snd_device = SND_DEVICE_IN_HDMI_MIC; - } else if (in_device & AUDIO_DEVICE_IN_TV_TUNER) { - /* add separate AUDIO_DEVICE for this? */ + } else if (in_device & AUDIO_DEVICE_IN_HDMI_ARC) { snd_device = SND_DEVICE_IN_HDMI_ARC; } else if (in_device & AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET || in_device & AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET) {