From 00d55efdfbbf148296415a7d295229731b8e3eb7 Mon Sep 17 00:00:00 2001 From: Karthikeyan Mani Date: Fri, 27 Oct 2017 18:41:55 -0700 Subject: [PATCH] asoc: codecs: add support for TX hybrid mode Add support for analog mic TX hybrid mode to allow audio catpure in high performance at the same time achieving lower power. CRs-Fixed: 2136385 Change-Id: I08b90a26d6b6e4761ff17dec84bf58f8d437d908 Signed-off-by: Karthikeyan Mani --- asoc/codecs/wcd934x/wcd934x.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/asoc/codecs/wcd934x/wcd934x.c b/asoc/codecs/wcd934x/wcd934x.c index 2b930581a5..8e3981c9fd 100644 --- a/asoc/codecs/wcd934x/wcd934x.c +++ b/asoc/codecs/wcd934x/wcd934x.c @@ -115,6 +115,7 @@ static const struct snd_kcontrol_new name##_mux = \ #define WCD934X_AMIC_PWR_LEVEL_LP 0 #define WCD934X_AMIC_PWR_LEVEL_DEFAULT 1 #define WCD934X_AMIC_PWR_LEVEL_HP 2 +#define WCD934X_AMIC_PWR_LEVEL_HYBRID 3 #define WCD934X_AMIC_PWR_LVL_MASK 0x60 #define WCD934X_AMIC_PWR_LVL_SHIFT 0x5 @@ -122,6 +123,7 @@ static const struct snd_kcontrol_new name##_mux = \ #define WCD934X_DEC_PWR_LVL_LP 0x02 #define WCD934X_DEC_PWR_LVL_HP 0x04 #define WCD934X_DEC_PWR_LVL_DF 0x00 +#define WCD934X_DEC_PWR_LVL_HYBRID WCD934X_DEC_PWR_LVL_DF #define WCD934X_STRING_LEN 100 #define WCD934X_CDC_SIDETONE_IIR_COEFF_MAX 5 @@ -4014,6 +4016,7 @@ static int tavil_codec_enable_dec(struct snd_soc_dapm_widget *w, WCD934X_DEC_PWR_LVL_HP); break; case WCD934X_AMIC_PWR_LEVEL_DEFAULT: + case WCD934X_AMIC_PWR_LEVEL_HYBRID: default: snd_soc_update_bits(codec, dec_cfg_reg, WCD934X_DEC_PWR_LVL_MASK, @@ -5707,7 +5710,7 @@ static const char * const rx_cf_text[] = { }; static const char * const amic_pwr_lvl_text[] = { - "LOW_PWR", "DEFAULT", "HIGH_PERF" + "LOW_PWR", "DEFAULT", "HIGH_PERF", "HYBRID" }; static const char * const hph_idle_detect_text[] = {