From efee3b9c9511f65d50ffbc583cbb25a095b8dd84 Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Wed, 16 Oct 2019 07:57:21 +0530 Subject: [PATCH] ASoC: tegra-alt: update dai order for DSPK This is a preparatory patch for moving all DAI links to DT. With the DT based DAI link approach, we need to index through the DSPK DAI array to reference a particular interface. This patch re-orders DAI array to be consistent with other drivers, where we always first list CIF DAI and then followed by DAP and Dummy (wherever applicable). DT can use macros for these indices and can be common if the same order is followed for all modules. Bug 200538260 Bug 200520821 Change-Id: Ib3ced6078b73bdf542891e28d8081e3dd38e1ab5 Signed-off-by: Sameer Pujar Reviewed-on: https://git-master.nvidia.com/r/2220275 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Mohan Kumar D Reviewed-by: Sharad Gupta Reviewed-by: mobile promotions Tested-by: mobile promotions --- sound/soc/tegra-alt/tegra186_dspk_alt.c | 34 ++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sound/soc/tegra-alt/tegra186_dspk_alt.c b/sound/soc/tegra-alt/tegra186_dspk_alt.c index 275a621d..25acfc1b 100644 --- a/sound/soc/tegra-alt/tegra186_dspk_alt.c +++ b/sound/soc/tegra-alt/tegra186_dspk_alt.c @@ -228,6 +228,17 @@ static struct snd_soc_dai_ops tegra186_dspk_dai_ops = { }; static struct snd_soc_dai_driver tegra186_dspk_dais[] = { + { + .name = "CIF", + .playback = { + .stream_name = "CIF Receive", + .channels_min = 1, + .channels_max = 2, + .rates = SNDRV_PCM_RATE_8000_48000, + .formats = SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S32_LE, + }, + }, { .name = "DAP", .capture = { @@ -241,10 +252,14 @@ static struct snd_soc_dai_driver tegra186_dspk_dais[] = { .ops = &tegra186_dspk_dai_ops, .symmetric_rates = 1, }, + /* The second DAI is used when the output of the DSPK is connected + * to two mono codecs. When the output of the DSPK is connected to + * a single stereo codec, then only the first DAI should be used. + */ { - .name = "CIF", + .name = "CIF2", .playback = { - .stream_name = "CIF Receive", + .stream_name = "CIF2 Receive", .channels_min = 1, .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_48000, @@ -252,10 +267,6 @@ static struct snd_soc_dai_driver tegra186_dspk_dais[] = { SNDRV_PCM_FMTBIT_S32_LE, }, }, - /* The second DAI is used when the output of the DSPK is connected - * to two mono codecs. When the output of the DSPK is connected to - * a single stereo codec, then only the first DAI should be used. - */ { .name = "DAP2", .capture = { @@ -268,17 +279,6 @@ static struct snd_soc_dai_driver tegra186_dspk_dais[] = { }, .symmetric_rates = 1, }, - { - .name = "CIF2", - .playback = { - .stream_name = "CIF2 Receive", - .channels_min = 1, - .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_48000, - .formats = SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S32_LE, - }, - }, { .name = "DUMMY_SINK", .playback = {