ASoC: tegra-alt: Add one more ADSP PCM device
Gaurav Tendolkar [Thu, 20 Aug 2015 11:25:03 +0000 (16:25 +0530)]
Bug 200127533

Change-Id: Ie5ca287d0da4e180ab711e2816c28db18a60d601
Signed-off-by: Gaurav Tendolkar <gtendolkar@nvidia.com>
Reviewed-on: http://git-master/r/786550
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Tested-by: Ravindra Lokhande <rlokhande@nvidia.com>

sound/soc/tegra-alt/tegra210_adsp_alt.c
sound/soc/tegra-alt/tegra_asoc_machine_alt.c
sound/soc/tegra-alt/tegra_asoc_machine_alt.h
sound/soc/tegra-alt/tegra_grenada_alt.c
sound/soc/tegra-alt/tegra_t210ref_alt.c
sound/soc/tegra-alt/tegra_t210ref_mobile_alt.c
sound/soc/tegra-alt/tegra_t210ref_mobile_es755_alt.c
sound/soc/tegra-alt/tegra_t210ref_mobile_rt565x_alt.c

index b78475a..016b5f4 100644 (file)
@@ -1846,16 +1846,33 @@ static struct snd_soc_dai_ops tegra210_adsp_admaif_dai_ops = {
 
 static struct snd_soc_dai_driver tegra210_adsp_dai[] = {
        {
-               .name = "ADSP PCM",
+               .name = "ADSP PCM1",
                .playback = {
-                       .stream_name = "ADSP PCM Receive",
+                       .stream_name = "ADSP PCM1 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",
+                       .stream_name = "ADSP PCM1 Transmit",
+                       .channels_min = 1,
+                       .channels_max = 2,
+                       .rates = SNDRV_PCM_RATE_8000_48000,
+                       .formats = SNDRV_PCM_FMTBIT_S16_LE,
+               },
+       },
+       {
+               .name = "ADSP PCM2",
+               .playback = {
+                       .stream_name = "ADSP PCM2 Receive",
+                       .channels_min = 1,
+                       .channels_max = 2,
+                       .rates = SNDRV_PCM_RATE_8000_48000,
+                       .formats = SNDRV_PCM_FMTBIT_S16_LE,
+               },
+               .capture = {
+                       .stream_name = "ADSP PCM2 Transmit",
                        .channels_min = 1,
                        .channels_max = 2,
                        .rates = SNDRV_PCM_RATE_8000_48000,
index dc35920..43434ed 100644 (file)
@@ -1579,10 +1579,10 @@ static struct snd_soc_dai_link
                .params = &default_link_params,
                .ignore_suspend = 1,
        },
-       [TEGRA210_DAI_LINK_ADSP_PCM] = {
-               .name = "ADSP PCM",
-               .stream_name = "ADSP PCM",
-               .cpu_dai_name = "ADSP PCM",
+       [TEGRA210_DAI_LINK_ADSP_PCM1] = {
+               .name = "ADSP PCM1",
+               .stream_name = "ADSP PCM1",
+               .cpu_dai_name = "ADSP PCM1",
                .codec_dai_name = "ADSP-FE1",
                .cpu_name = "adsp_audio.3",
                .codec_name = "adsp_audio.3",
@@ -1590,11 +1590,22 @@ static struct snd_soc_dai_link
                .ignore_pmdown_time = 1,
                .ignore_suspend = 1,
        },
+       [TEGRA210_DAI_LINK_ADSP_PCM2] = {
+               .name = "ADSP PCM2",
+               .stream_name = "ADSP PCM2",
+               .cpu_dai_name = "ADSP PCM2",
+               .codec_dai_name = "ADSP-FE2",
+               .cpu_name = "adsp_audio.3",
+               .codec_name = "adsp_audio.3",
+               .platform_name = "adsp_audio.3",
+               .ignore_pmdown_time = 1,
+               .ignore_suspend = 1,
+       },
        [TEGRA210_DAI_LINK_ADSP_COMPR1] = {
                .name = "ADSP COMPR1",
                .stream_name = "ADSP COMPR1",
                .cpu_dai_name = "ADSP COMPR1",
-               .codec_dai_name = "ADSP-FE2",
+               .codec_dai_name = "ADSP-FE3",
                .cpu_name = "adsp_audio.3",
                .codec_name = "adsp_audio.3",
                .platform_name = "adsp_audio.3",
@@ -1605,7 +1616,7 @@ static struct snd_soc_dai_link
                .name = "ADSP COMPR2",
                .stream_name = "ADSP COMPR2",
                .cpu_dai_name = "ADSP COMPR2",
-               .codec_dai_name = "ADSP-FE3",
+               .codec_dai_name = "ADSP-FE4",
                .cpu_name = "adsp_audio.3",
                .codec_name = "adsp_audio.3",
                .platform_name = "adsp_audio.3",
@@ -2054,7 +2065,7 @@ struct snd_soc_dai_link *tegra_machine_new_codec_links(
 
                        str = devm_kzalloc(&pdev->dev,
                                sizeof(tegra_codec_links[j].cpu_dai_name) +
-                               1 + sizeof(tegra_codec_links[j].cpu_dai_name),
+                               1 + sizeof(tegra_codec_links[j].codec_dai_name),
                                GFP_KERNEL);
                        str = strcat(str, tegra_codec_links[j].cpu_dai_name);
                        str = strcat(str, " ");
index b0f0a21..fdbfefe 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * tegra_asoc_machine_alt.h
  *
- * Copyright (c) 2014 NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2014-2015 NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -168,7 +168,8 @@ enum tegra210_xbar_dai_link {
        TEGRA210_DAI_LINK_ADSP_ADMAIF8,
        TEGRA210_DAI_LINK_ADSP_ADMAIF9,
        TEGRA210_DAI_LINK_ADSP_ADMAIF10,
-       TEGRA210_DAI_LINK_ADSP_PCM,
+       TEGRA210_DAI_LINK_ADSP_PCM1,
+       TEGRA210_DAI_LINK_ADSP_PCM2,
        TEGRA210_DAI_LINK_ADSP_COMPR1,
        TEGRA210_DAI_LINK_ADSP_COMPR2,
        TEGRA210_XBAR_DAI_LINKS, /* Total number of xbar dai links */
index 01b053d..010dba3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * tegra_grenada.c - Tegra grenada Machine driver
  *
- * Copyright (c) 2013-2014 NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2013-2015 NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -545,7 +545,7 @@ static int tegra_grenada_driver_probe(struct platform_device *pdev)
                &tegra_grenada_sfc_init);
 
        /* set ADSP PCM/COMPR */
-       for (i = TEGRA210_DAI_LINK_ADSP_PCM;
+       for (i = TEGRA210_DAI_LINK_ADSP_PCM1;
                i <= TEGRA210_DAI_LINK_ADSP_COMPR2; i++) {
                tegra_machine_set_dai_ops(i,
                        &tegra_grenada_ops);
index bf8ad6e..dc580f9 100644 (file)
@@ -929,7 +929,7 @@ static int tegra_t210ref_driver_probe(struct platform_device *pdev)
                &tegra_t210ref_sfc4_init);      /* in - 48000Hz, out - 8000Hz */
 
        /* set ADSP PCM/COMPR */
-       for (i = TEGRA210_DAI_LINK_ADSP_PCM;
+       for (i = TEGRA210_DAI_LINK_ADSP_PCM1;
                i <= TEGRA210_DAI_LINK_ADSP_COMPR2; i++) {
                tegra_machine_set_dai_ops(i, &tegra_t210ref_spdif_ops);
        }
index 8d9ea75..f372d68 100644 (file)
@@ -703,7 +703,7 @@ static int tegra_t210ref_driver_probe(struct platform_device *pdev)
                &tegra_t210ref_sfc_init);
 
        /* set ADSP PCM/COMPR */
-       for (i = TEGRA210_DAI_LINK_ADSP_PCM;
+       for (i = TEGRA210_DAI_LINK_ADSP_PCM1;
                i <= TEGRA210_DAI_LINK_ADSP_COMPR2; i++) {
                tegra_machine_set_dai_ops(i,
                        &tegra_t210ref_ops);
index 7e07073..dcb97f1 100644 (file)
@@ -806,7 +806,7 @@ static int tegra_t210ref_driver_probe(struct platform_device *pdev)
                tegra_machine_set_dai_ops(i, &tegra_t210ref_ops);
 
        /* set ADSP PCM */
-       tegra_machine_set_dai_ops(TEGRA210_DAI_LINK_ADSP_PCM,
+       tegra_machine_set_dai_ops(TEGRA210_DAI_LINK_ADSP_PCM1,
                        &tegra_t210ref_ops);
 
        /* set ADSP COMPR */
index 73dbbc0..c6115ed 100644 (file)
@@ -638,7 +638,7 @@ static void dai_link_setup(struct platform_device *pdev, int dummy)
                &tegra_t210ref_sfc_init);
 
        /* set ADSP PCM/COMPR */
-       for (i = TEGRA210_DAI_LINK_ADSP_PCM;
+       for (i = TEGRA210_DAI_LINK_ADSP_PCM1;
                i <= TEGRA210_DAI_LINK_ADSP_COMPR2; i++) {
                tegra_machine_set_dai_ops(i,
                        &tegra_t210ref_ops);