From 7e057cf8cd5e84aecf8ad82750ac8b6c6f0da68a Mon Sep 17 00:00:00 2001 From: Laxminath Kasam Date: Wed, 9 Aug 2017 23:55:15 +0530 Subject: [PATCH] audio-lnx: Enable compilation for sdm670 audio Enable compilation for sdm670 audio. Update for both internal and external codecs. Change-Id: I030837a2c0180a5a31d0ab786ad5de607027050f Signed-off-by: Laxminath Kasam --- Makefile | 9 +++++++++ asoc/Makefile | 2 +- asoc/codecs/Makefile | 14 +++++++++++++- asoc/codecs/msm_sdw/Makefile | 1 - asoc/codecs/msm_sdw/msm_sdw.h | 2 +- asoc/codecs/msm_sdw/msm_sdw_cdc.c | 22 ++++++++++------------ asoc/codecs/wcd_cpe_core.c | 2 +- asoc/codecs/wcd_cpe_services.c | 3 +-- asoc/sdm660-ext-dai-links.c | 2 +- 9 files changed, 37 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 05b04c6373..ff83693730 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,10 @@ ifeq ($(CONFIG_ARCH_SDM845), y) include $(srctree)/techpack/audio/config/sdm845auto.conf export endif +ifeq ($(CONFIG_ARCH_SDM670), y) +include $(srctree)/techpack/audio/config/sdm670auto.conf +export +endif # Use USERINCLUDE when you must reference the UAPI directories only. USERINCLUDE += \ @@ -18,6 +22,11 @@ ifeq ($(CONFIG_ARCH_SDM845), y) LINUXINCLUDE += \ -include $(srctree)/techpack/audio/config/sdm845autoconf.h endif +ifeq ($(CONFIG_ARCH_SDM670), y) +LINUXINCLUDE += \ + -include $(srctree)/techpack/audio/config/sdm670autoconf.h +endif + obj-y += asoc/ obj-y += dsp/ diff --git a/asoc/Makefile b/asoc/Makefile index 67cb9f3aac..3fccff6726 100644 --- a/asoc/Makefile +++ b/asoc/Makefile @@ -21,7 +21,7 @@ obj-$(CONFIG_SND_SOC_MACHINE_MSM8998) += snd-soc-msm8998.o # for SDM660 sound card driver snd-soc-sdm660-common-objs := sdm660-common.o -obj-$(CONFIG_SND_SOC_SDM660_COMMON) += snd-soc-sdm660-common.o +obj-$(CONFIG_SND_SOC_SDM670) += snd-soc-sdm660-common.o # for SDM660 sound card driver snd-soc-int-codec-objs := sdm660-internal.o diff --git a/asoc/codecs/Makefile b/asoc/codecs/Makefile index 04218e8103..bb3a9356e8 100644 --- a/asoc/codecs/Makefile +++ b/asoc/codecs/Makefile @@ -1,12 +1,24 @@ snd-soc-wcd9xxx-v2-objs := wcd9xxx-common-v2.o wcd9xxx-resmgr-v2.o wcdcal-hwdep.o wcd9xxx-soc-init.o snd-soc-wcd-cpe-objs := wcd_cpe_services.o wcd_cpe_core.o snd-soc-wsa881x-objs := wsa881x.o wsa881x-tables.o wsa881x-regmap.o wsa881x-temp-sensor.o -snd-soc-wcd-mbhc-objs := wcd-mbhc-v2.o wcd-mbhc-adc.o +snd-soc-wcd-mbhc-objs := wcd-mbhc-v2.o +ifneq (,$(filter $(CONFIG_SND_SOC_WCD_MBHC_LEGACY),y m)) + snd-soc-wcd-mbhc-objs += wcd-mbhc-legacy.o +endif +ifneq (,$(filter $(CONFIG_SND_SOC_WCD_MBHC_ADC),y m)) + snd-soc-wcd-mbhc-objs += wcd-mbhc-adc.o +endif snd-soc-wcd-dsp-utils-objs := wcd-dsp-utils.o snd-soc-wcd-dsp-mgr-objs := wcd-dsp-mgr.o snd-soc-wcd-spi-objs := wcd-spi.o +snd-soc-wcd9335-objs := wcd9335.o +snd-soc-wcd-cpe-objs := wcd_cpe_services.o wcd_cpe_core.o +obj-$(CONFIG_SND_SOC_WCD9335) += snd-soc-wcd9335.o +obj-$(CONFIG_SND_SOC_WCD_CPE) += snd-soc-wcd-cpe.o obj-$(CONFIG_SND_SOC_WCD934X) += wcd934x/ +obj-$(CONFIG_SND_SOC_SDM660_CDC) += sdm660_cdc/ +obj-$(CONFIG_SND_SOC_MSM_SDW) += msm_sdw/ ifeq ($(CONFIG_COMMON_CLK_MSM), y) obj-$(CONFIG_AUDIO_EXT_CLK) += audio-ext-clk.o endif diff --git a/asoc/codecs/msm_sdw/Makefile b/asoc/codecs/msm_sdw/Makefile index 64e932b9d2..9518f4db5b 100644 --- a/asoc/codecs/msm_sdw/Makefile +++ b/asoc/codecs/msm_sdw/Makefile @@ -1,3 +1,2 @@ snd-soc-msm-sdw-objs := msm_sdw_cdc.o msm_sdw_regmap.o msm-sdw-tables.o msm_sdw_cdc_utils.o obj-$(CONFIG_SND_SOC_MSM_SDW) += snd-soc-msm-sdw.o -ccflags-y += -I$(srctree)/sound/soc/msm diff --git a/asoc/codecs/msm_sdw/msm_sdw.h b/asoc/codecs/msm_sdw/msm_sdw.h index 376ebc6c38..3285f5f551 100644 --- a/asoc/codecs/msm_sdw/msm_sdw.h +++ b/asoc/codecs/msm_sdw/msm_sdw.h @@ -13,7 +13,7 @@ #define MSM_SDW_H #include -#include +#include #include "msm_sdw_registers.h" #define MSM_SDW_MAX_REGISTER 0x400 diff --git a/asoc/codecs/msm_sdw/msm_sdw_cdc.c b/asoc/codecs/msm_sdw/msm_sdw_cdc.c index cfe42e00e3..3ff184c7fa 100644 --- a/asoc/codecs/msm_sdw/msm_sdw_cdc.c +++ b/asoc/codecs/msm_sdw/msm_sdw_cdc.c @@ -14,25 +14,25 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include -#include -#include #include #include #include #include -#include #include +#include +#include +#include +#include +#include #include "msm_sdw.h" #include "msm_sdw_registers.h" +#include "../msm-cdc-pinctrl.h" #define MSM_SDW_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\ SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000) @@ -937,9 +937,8 @@ static int msm_sdw_ear_spkr_pa_gain_put(struct snd_kcontrol *kcontrol, static int msm_sdw_vi_feed_mixer_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_widget_list *wlist = - dapm_kcontrol_get_wlist(kcontrol); - struct snd_soc_dapm_widget *widget = wlist->widgets[0]; + struct snd_soc_dapm_widget *widget = + snd_soc_dapm_kcontrol_widget(kcontrol); struct snd_soc_codec *codec = snd_soc_dapm_to_codec(widget->dapm); struct msm_sdw_priv *msm_sdw_p = snd_soc_codec_get_drvdata(codec); @@ -951,9 +950,8 @@ static int msm_sdw_vi_feed_mixer_get(struct snd_kcontrol *kcontrol, static int msm_sdw_vi_feed_mixer_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_widget_list *wlist = - dapm_kcontrol_get_wlist(kcontrol); - struct snd_soc_dapm_widget *widget = wlist->widgets[0]; + struct snd_soc_dapm_widget *widget = + snd_soc_dapm_kcontrol_widget(kcontrol); struct snd_soc_codec *codec = snd_soc_dapm_to_codec(widget->dapm); struct msm_sdw_priv *msm_sdw_p = snd_soc_codec_get_drvdata(codec); struct soc_multi_mixer_control *mixer = diff --git a/asoc/codecs/wcd_cpe_core.c b/asoc/codecs/wcd_cpe_core.c index 7748ace126..a7fcce316e 100644 --- a/asoc/codecs/wcd_cpe_core.c +++ b/asoc/codecs/wcd_cpe_core.c @@ -23,12 +23,12 @@ #include #include #include -#include #include #include #include "core.h" #include "cpe_core.h" #include "cpe_err.h" +#include "cpe_cmi.h" #include "wcd_cpe_core.h" #include "wcd_cpe_services.h" #include "wcd_cmi_api.h" diff --git a/asoc/codecs/wcd_cpe_services.c b/asoc/codecs/wcd_cpe_services.c index 7a0e703114..522ce7abac 100644 --- a/asoc/codecs/wcd_cpe_services.c +++ b/asoc/codecs/wcd_cpe_services.c @@ -18,8 +18,7 @@ #include #include #include -#include -#include +#include "wcd9335_registers.h" #include "core.h" #include "cpe_cmi.h" #include "wcd_cpe_services.h" diff --git a/asoc/sdm660-ext-dai-links.c b/asoc/sdm660-ext-dai-links.c index 1e89976b4a..71ba1fa906 100644 --- a/asoc/sdm660-ext-dai-links.c +++ b/asoc/sdm660-ext-dai-links.c @@ -16,7 +16,7 @@ #include #include #include -#include "qdsp6v2/msm-pcm-routing-v2.h" +#include "msm-pcm-routing-v2.h" #include "sdm660-common.h" #include "sdm660-external.h" #include "codecs/core.h"