From 4da94a78dac73be770bae52f2e0f3c093801ebbe Mon Sep 17 00:00:00 2001 From: longc103 Date: Wed, 2 Mar 2022 20:32:59 +0800 Subject: [PATCH] audio-kernel: devon audio bring up changes: 1. add aw88261 config 2. cause hw i2c address conflict, disable receiver smartpa. Change-Id: I242f0edb9ea1db9d0620126d332f5f01cf3837dd Reviewed-on: https://gerrit.mot.com/2205301 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Submit-Approved: Jira Key Tested-by: Jira Key Reviewed-by: SLTApproved: Submit-Approved: Tested-by: Reviewed-by: Yunfei Guo (cherry picked from commit 244d714b75be72eaff960780de0b3f0643f62ce8) Reviewed-on: https://gerrit.mot.com/2206429 Reviewed-by: Hujun Liao --- asoc/Kbuild | 3 +++ asoc/bengal.c | 7 +++++++ asoc/codecs/Kbuild | 6 +++++- asoc/codecs/wcd937x/Kbuild | 4 +++- config/devonautoconf.h | 6 ++++++ dsp/Kbuild | 4 ++++ 6 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 config/devonautoconf.h diff --git a/asoc/Kbuild b/asoc/Kbuild index 4163a09c56f7..8e56deead965 100644 --- a/asoc/Kbuild +++ b/asoc/Kbuild @@ -104,6 +104,9 @@ ifeq ($(KERNEL_BUILD), 0) INCS += -include $(AUDIO_ROOT)/config/hawaoautoconf.h endif + ifneq (,$(filter devon%, $(TARGET_PRODUCT))) + INCS += -include $(AUDIO_ROOT)/config/devonautoconf.h + endif endif # As per target team, build is done as follows: diff --git a/asoc/bengal.c b/asoc/bengal.c index aa6bfdaadf81..f1d93e1cbd75 100644 --- a/asoc/bengal.c +++ b/asoc/bengal.c @@ -5445,6 +5445,13 @@ static struct snd_soc_dai_link_component awinic_codecs[] = { .dai_name = "aw882xx-aif-1-35", .name = "aw882xxacf_smartpa.1-0035", }, +#elif CONFIG_DEVON_AW882XX_SMARTPA +/* { + .of_node = NULL, + .dai_name = "aw882xx-aif-1-36", + .name = "aw882xxacf_smartpa.1-0036", + }, +*/ #else { .of_node = NULL, diff --git a/asoc/codecs/Kbuild b/asoc/codecs/Kbuild index 9af58e0d7cfe..87cd0432ee94 100644 --- a/asoc/codecs/Kbuild +++ b/asoc/codecs/Kbuild @@ -97,6 +97,10 @@ ifeq ($(KERNEL_BUILD), 0) ifneq (,$(filter hawao%, $(TARGET_PRODUCT))) INCS += -include $(AUDIO_ROOT)/config/hawaoautoconf.h endif + + ifneq (,$(filter devon%, $(TARGET_PRODUCT))) + INCS += -include $(AUDIO_ROOT)/config/devonautoconf.h + endif endif # As per target team, build is done as follows: @@ -295,7 +299,7 @@ hdmi_dlkm-y := $(HDMICODEC_OBJS) #Add awinic driver begain ifdef CONFIG_SND_SMARTPA_AW882XX -ifneq (,$(filter rhode% hawao%, $(TARGET_PRODUCT))) +ifneq (,$(filter rhode% hawao% devon%, $(TARGET_PRODUCT))) SND_SOC_AW882XX_OBJS += aw88261/aw882xx.o SND_SOC_AW882XX_OBJS += aw88261/aw_init.o SND_SOC_AW882XX_OBJS += aw88261/aw_bin_parse.o diff --git a/asoc/codecs/wcd937x/Kbuild b/asoc/codecs/wcd937x/Kbuild index 5a4c10c45f0a..c61f84db1666 100644 --- a/asoc/codecs/wcd937x/Kbuild +++ b/asoc/codecs/wcd937x/Kbuild @@ -42,7 +42,9 @@ ifeq ($(KERNEL_BUILD), 0) ifneq (,$(filter hawao%, $(TARGET_PRODUCT))) INCS += -include $(AUDIO_ROOT)/config/hawaoautoconf.h endif - + ifneq (,$(filter devon%, $(TARGET_PRODUCT))) + INCS += -include $(AUDIO_ROOT)/config/devonautoconf.h + endif endif # As per target team, build is done as follows: diff --git a/config/devonautoconf.h b/config/devonautoconf.h new file mode 100644 index 000000000000..888e2a32129f --- /dev/null +++ b/config/devonautoconf.h @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. + */ +#define CONFIG_AW882XX_STEREO_SMARTPA 1 +#define CONFIG_AW882XX_PARAMS_STORED_IN_BIN 1 +#define CONFIG_DEVON_AW882XX_SMARTPA 1 diff --git a/dsp/Kbuild b/dsp/Kbuild index 4e9e82aa4197..33e70a4ca839 100644 --- a/dsp/Kbuild +++ b/dsp/Kbuild @@ -103,6 +103,10 @@ ifeq ($(KERNEL_BUILD), 0) ifneq (,$(filter hawao%, $(TARGET_PRODUCT))) INCS += -include $(AUDIO_ROOT)/config/hawaoautoconf.h endif + + ifneq (,$(filter devon%, $(TARGET_PRODUCT))) + INCS += -include $(AUDIO_ROOT)/config/devonautoconf.h + endif endif