From 3afd0a22430935f840c963ec94b3959479ce159c Mon Sep 17 00:00:00 2001 From: Gaurav Tendolkar Date: Mon, 29 Jun 2015 11:11:54 +0530 Subject: [PATCH] ASoC: tegra-alt: Create p2382ref machine driver - Added machine driver for board p2382ref - Removed board specific checks from machine driver Bug 200113249 Change-Id: I03eced9f30b5a642b71cb8d6a0e4d332cb005f64 Signed-off-by: Gaurav Tendolkar Reviewed-on: http://git-master/r/763461 Reviewed-by: Nitin Pai Reviewed-by: Sumit Bhattacharya Reviewed-by: Viraj Karandikar Reviewed-by: Arun Shamanna Lakshmi --- sound/soc/tegra-alt/Kconfig | 44 ++++++++++++++++++++++--- sound/soc/tegra-alt/Makefile | 20 ++++++++--- sound/soc/tegra-alt/tegra210_adsp_alt.c | 20 ----------- 3 files changed, 54 insertions(+), 30 deletions(-) diff --git a/sound/soc/tegra-alt/Kconfig b/sound/soc/tegra-alt/Kconfig index 15f145ca..99f18342 100644 --- a/sound/soc/tegra-alt/Kconfig +++ b/sound/soc/tegra-alt/Kconfig @@ -155,18 +155,24 @@ config SND_SOC_TEGRA210_OPE_ALT Say Y or M if you want to add support for Tegra210 OPE module. config SND_SOC_TEGRA210_ADSP_ALT - tristate "Tegra210 ADSP driver" - depends on SND_SOC_TEGRA_ALT && SND_SOC_TEGRA_ALT_210 && TEGRA_NVADSP - help - Say Y or M if you want to add support for Tegra210 ADSP module. + tristate "Tegra210 ADSP driver" + depends on SND_SOC_TEGRA_ALT && SND_SOC_TEGRA_ALT_210 && TEGRA_NVADSP + help + Say Y or M if you want to add support for Tegra210 ADSP module. config SND_SOC_TEGRA_ASOC_HWDEP_ALT - tristate "Tegra asoc hwdep driver" + tristate "Tegra ASoC hwdep driver" depends on SND_SOC_TEGRA_ALT select SND_HWDEP help Say Y or M if you want to add support for Tegra ASoC HWDEP module. +config SND_SOC_TEGRA_ASOC_MACHINE_ALT + tristate "Tegra ASoC machine driver" + depends on SND_SOC_TEGRA_ALT + help + Say Y or M if you want to add support for Tegra ASoC machine driver + config SND_SOC_TEGRA_VCM30T124_ALT tristate "SoC Audio support for VCM30_T124" depends on SND_SOC_TEGRA_ALT @@ -184,6 +190,7 @@ config SND_SOC_TEGRA_VCM30T124_ALT select SND_SOC_SPDIF select SND_SOC_AK4618 select SND_SOC_TEGRA_ASOC_HWDEP_ALT + select SND_SOC_TEGRA_ASOC_MACHINE_ALT help Say Y or M here if you want to add support for SoC audio on the TEGRA VCM30_T124 using wm8731 and ad1937 codecs or using ak4618 @@ -210,6 +217,7 @@ config SND_SOC_TEGRA_GRENADA_ALT select SND_SOC_TEGRA210_SPDIF_ALT select SND_SOC_TEGRA210_ADSP_ALT select SND_SOC_SPDIF + select SND_SOC_TEGRA_ASOC_MACHINE_ALT help Say Y or M here. @@ -259,6 +267,7 @@ config SND_SOC_TEGRA_T210REF_MOBILE_ES755_ALT select SND_SOC_SPDIF select SND_SOC_ES755 select SND_SOC_TAS2552 + select SND_SOC_TEGRA_ASOC_MACHINE_ALT help Say Y or M here. @@ -284,6 +293,7 @@ config SND_SOC_TEGRA_T210REF_ALT select SND_SOC_TEGRA_ASOC_HWDEP_ALT select SND_SOC_SPDIF select SND_SOC_AD193X_I2C + select SND_SOC_TEGRA_ASOC_MACHINE_ALT help Say Y or M here. @@ -301,5 +311,29 @@ config SND_SOC_TEGRA_P1889REF_ALT select SND_SOC_TEGRA124_AFC_ALT select SND_SOC_SPDIF select SND_SOC_TEGRA_ASOC_HWDEP_ALT + select SND_SOC_TEGRA_ASOC_MACHINE_ALT + help + Say Y or M here + +config SND_SOC_TEGRA_T210REF_P2382_ALT + tristate "SoC Audio support for P2382Ref T210" + depends on SND_SOC_TEGRA_ALT + depends on ARCH_TEGRA_21x_SOC + select SND_SOC_TEGRA210_XBAR_ALT + select SND_SOC_TEGRA210_PCM_ALT + select SND_SOC_TEGRA210_ADMA_ALT + select SND_SOC_TEGRA210_ADMAIF_ALT + select SND_SOC_TEGRA210_I2S_ALT + select SND_SOC_TEGRA210_AMX_ALT + select SND_SOC_TEGRA210_ADX_ALT + select SND_SOC_TEGRA210_MIXER_ALT + select SND_SOC_TEGRA210_SFC_ALT + select SND_SOC_TEGRA210_AFC_ALT + select SND_SOC_TEGRA210_MVC_ALT + select SND_SOC_TEGRA210_OPE_ALT + select SND_SOC_TEGRA210_ADSP_ALT + select SND_SOC_TEGRA_ASOC_HWDEP_ALT + select SND_SOC_SPDIF + select SND_SOC_TEGRA_ASOC_MACHINE_ALT help Say Y or M here diff --git a/sound/soc/tegra-alt/Makefile b/sound/soc/tegra-alt/Makefile index ba1adc4f..5ff475aa 100644 --- a/sound/soc/tegra-alt/Makefile +++ b/sound/soc/tegra-alt/Makefile @@ -6,6 +6,7 @@ subdir-ccflags-y := -Werror snd-soc-tegra-alt-pcm-objs := tegra_pcm_alt.o snd-soc-tegra-alt-utils-objs := tegra_asoc_utils_alt.o snd-soc-tegra-alt-hwdep-objs := tegra_asoc_hwdep_alt.o +snd-soc-tegra-alt-machine-objs := tegra_asoc_machine_alt.o snd-soc-tegra30-alt-apbif-objs := tegra30_apbif_alt.o snd-soc-tegra30-alt-xbar-objs := tegra30_xbar_alt.o snd-soc-tegra30-alt-i2s-objs := tegra30_i2s_alt.o @@ -36,6 +37,7 @@ obj-$(CONFIG_SND_SOC_TEGRA_ALT) += snd-soc-tegra-alt-utils.o obj-$(CONFIG_SND_SOC_TEGRA_ALT) += snd-soc-tegra-alt-pcm.o obj-$(CONFIG_SND_SOC_TEGRA_ALT) += snd-soc-tegra210-alt-fpga-clock.o obj-$(CONFIG_SND_SOC_TEGRA_ASOC_HWDEP_ALT) += snd-soc-tegra-alt-hwdep.o +obj-$(CONFIG_SND_SOC_TEGRA_ASOC_MACHINE_ALT) += snd-soc-tegra-alt-machine.o obj-$(CONFIG_SND_SOC_TEGRA30_APBIF_ALT) += snd-soc-tegra30-alt-apbif.o obj-$(CONFIG_SND_SOC_TEGRA30_XBAR_ALT) += snd-soc-tegra30-alt-xbar.o obj-$(CONFIG_SND_SOC_TEGRA30_I2S_ALT) += snd-soc-tegra30-alt-i2s.o @@ -62,16 +64,24 @@ obj-$(CONFIG_SND_SOC_TEGRA210_OPE_ALT) += snd-soc-tegra210-alt-mbdrc.o obj-$(CONFIG_SND_SOC_TEGRA210_ADSP_ALT) += snd-soc-tegra210-alt-adsp.o # Tegra machine Support -snd-soc-tegra-alt-vcm30t124-objs := tegra_vcm30t124_alt.o tegra_asoc_machine_alt.o -snd-soc-tegra-alt-grenada-objs := tegra_grenada_alt.o tegra_asoc_machine_alt.o -snd-soc-tegra-alt-p1889ref-objs := tegra_p1889ref_alt.o tegra_asoc_machine_alt.o +snd-soc-tegra-alt-vcm30t124-objs := tegra_vcm30t124_alt.o +snd-soc-tegra-alt-grenada-objs := tegra_grenada_alt.o +snd-soc-tegra-alt-p1889ref-objs := tegra_p1889ref_alt.o snd-soc-tegra-alt-t210ref-mobile-objs := tegra_t210ref_mobile_alt.o -snd-soc-tegra-alt-t210ref-mobile-es755-objs := tegra_t210ref_mobile_es755_alt.o tegra_asoc_machine_alt.o -snd-soc-tegra-alt-t210ref-objs := tegra_t210ref_alt.o tegra_asoc_machine_alt.o +snd-soc-tegra-alt-t210ref-mobile-es755-objs := tegra_t210ref_mobile_es755_alt.o +snd-soc-tegra-alt-t210ref-objs := tegra_t210ref_alt.o +snd-soc-tegra-alt-t210ref-p2382-objs := tegra_t210ref_p2382_alt.o obj-$(CONFIG_SND_SOC_TEGRA_VCM30T124_ALT) += snd-soc-tegra-alt-vcm30t124.o +obj-$(CONFIG_SND_SOC_TEGRA_VCM30T124_ALT) += snd-soc-tegra-alt-machine.o obj-$(CONFIG_SND_SOC_TEGRA_P1889REF_ALT) += snd-soc-tegra-alt-p1889ref.o +obj-$(CONFIG_SND_SOC_TEGRA_P1889REF_ALT) += snd-soc-tegra-alt-machine.o obj-$(CONFIG_SND_SOC_TEGRA_GRENADA_ALT) += snd-soc-tegra-alt-grenada.o +obj-$(CONFIG_SND_SOC_TEGRA_GRENADA_ALT) += snd-soc-tegra-alt-machine.o obj-$(CONFIG_SND_SOC_TEGRA_T210REF_MOBILE_ALT) += snd-soc-tegra-alt-t210ref-mobile.o obj-$(CONFIG_SND_SOC_TEGRA_T210REF_MOBILE_ES755_ALT) += snd-soc-tegra-alt-t210ref-mobile-es755.o +obj-$(CONFIG_SND_SOC_TEGRA_T210REF_MOBILE_ES755_ALT) += snd-soc-tegra-alt-machine.o obj-$(CONFIG_SND_SOC_TEGRA_T210REF_ALT) += snd-soc-tegra-alt-t210ref.o +obj-$(CONFIG_SND_SOC_TEGRA_T210REF_ALT) += snd-soc-tegra-alt-machine.o +obj-$(CONFIG_SND_SOC_TEGRA_T210REF_P2382_ALT) += snd-soc-tegra-alt-t210ref-p2382.o +obj-$(CONFIG_SND_SOC_TEGRA_T210REF_P2382_ALT) += snd-soc-tegra-alt-machine.o diff --git a/sound/soc/tegra-alt/tegra210_adsp_alt.c b/sound/soc/tegra-alt/tegra210_adsp_alt.c index 8fc95914..6508924b 100644 --- a/sound/soc/tegra-alt/tegra210_adsp_alt.c +++ b/sound/soc/tegra-alt/tegra210_adsp_alt.c @@ -1782,25 +1782,6 @@ static struct snd_soc_dai_ops tegra210_adsp_admaif_dai_ops = { }; static struct snd_soc_dai_driver tegra210_adsp_dai[] = { -#ifndef CONFIG_SND_SOC_TEGRA_T210REF_ALT - { - .name = "ADSP PCM", - .playback = { - .stream_name = "ADSP PCM Receive", - .channels_min = 1, - .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_48000, - .formats = SNDRV_PCM_FMTBIT_S16_LE, - }, - .capture = { - .stream_name = "ADSP PCM Transmit", - .channels_min = 1, - .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_48000, - .formats = SNDRV_PCM_FMTBIT_S16_LE, - }, - }, -#else { .name = "ADSP PCM1", .playback = { @@ -1835,7 +1816,6 @@ static struct snd_soc_dai_driver tegra210_adsp_dai[] = { .formats = SNDRV_PCM_FMTBIT_S16_LE, }, }, -#endif { .name = "ADSP COMPR1", .compress_dai = 1,