ASoC: Tegra: Remove spdif device for t14x
Ravindra Lokhande [Wed, 13 Feb 2013 23:37:19 +0000 (15:37 -0800)]
Change-Id: I702275cee7485d98e4982cf86314c1726d4a6dfe
Signed-off-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-on: http://git-master/r/200577
Reviewed-by: Chandrakanth Gorantla <cgorantla@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Gaurav Sarode <gsarode@nvidia.com>

sound/soc/tegra/Kconfig
sound/soc/tegra/tegra_max98090.c

index 0fdda40..6a88d36 100644 (file)
@@ -273,7 +273,6 @@ config SND_SOC_TEGRA_MAX98090
        select SND_SOC_TEGRA30_I2S if !ARCH_TEGRA_2x_SOC
        select SND_SOC_MAX98090
        select SND_SOC_TEGRA30_DAM if !ARCH_TEGRA_2x_SOC
-       select SND_SOC_TEGRA30_SPDIF if !ARCH_TEGRA_2x_SOC
        select SND_SOC_MAX97236
        select SND_SOC_SPDIF
        help
index 74cf9de..dab4bea 100644 (file)
 #define GPIO_HP_DET     BIT(4)
 
 #define DAI_LINK_HIFI          0
-#define DAI_LINK_SPDIF         1
-#define DAI_LINK_BTSCO         2
-#define DAI_LINK_VOICE_CALL    3
-#define DAI_LINK_BT_VOICE_CALL 4
-#define NUM_DAI_LINKS       5
+#define DAI_LINK_BTSCO         1
+#define DAI_LINK_VOICE_CALL    2
+#define DAI_LINK_BT_VOICE_CALL 3
 
 const char *tegra_max98090_i2s_dai_name[TEGRA30_NR_I2S_IFC] = {
        "tegra30-i2s.0",
@@ -330,51 +328,6 @@ static int tegra_max98090_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int tegra_spdif_hw_params(struct snd_pcm_substream *substream,
-                                       struct snd_pcm_hw_params *params)
-{
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct snd_soc_card *card = rtd->card;
-       struct tegra_max98090 *machine = snd_soc_card_get_drvdata(card);
-       int srate, mclk, min_mclk;
-       int err;
-
-       srate = params_rate(params);
-       switch (srate) {
-       case 11025:
-       case 22050:
-       case 44100:
-       case 88200:
-               mclk = 11289600;
-               break;
-       case 8000:
-       case 16000:
-       case 32000:
-       case 48000:
-       case 64000:
-       case 96000:
-               mclk = 12288000;
-               break;
-       default:
-               return -EINVAL;
-       }
-       min_mclk = 128 * srate;
-
-       err = tegra_asoc_utils_set_rate(&machine->util_data, srate, mclk);
-       if (err < 0) {
-               if (!(machine->util_data.set_mclk % min_mclk))
-                       mclk = machine->util_data.set_mclk;
-               else {
-                       dev_err(card->dev, "Can't configure clocks\n");
-                       return err;
-               }
-       }
-
-       tegra_asoc_utils_lock_clk_rate(&machine->util_data, 1);
-
-       return 0;
-}
-
 static int tegra_bt_hw_params(struct snd_pcm_substream *substream,
                struct snd_pcm_hw_params *params)
 {
@@ -809,11 +762,6 @@ static struct snd_soc_ops tegra_max98090_ops = {
 #endif
 };
 
-static struct snd_soc_ops tegra_spdif_ops = {
-       .hw_params = tegra_spdif_hw_params,
-       .hw_free = tegra_hw_free,
-};
-
 static struct snd_soc_ops tegra_voice_call_ops = {
        .hw_params = tegra_voice_call_hw_params,
        .shutdown = tegra_voice_call_shutdown,
@@ -1119,7 +1067,7 @@ static int tegra_max98090_init(struct snd_soc_pcm_runtime *rtd)
        return 0;
 }
 
-static struct snd_soc_dai_link tegra_max98090_dai[NUM_DAI_LINKS] = {
+static struct snd_soc_dai_link tegra_max98090_dai[] = {
        [DAI_LINK_HIFI] = {
                        .name = "MAX98090",
                        .stream_name = "MAX98090 HIFI",
@@ -1129,15 +1077,6 @@ static struct snd_soc_dai_link tegra_max98090_dai[NUM_DAI_LINKS] = {
                        .init = tegra_max98090_init,
                        .ops = &tegra_max98090_ops,
                },
-       [DAI_LINK_SPDIF] = {
-                       .name = "SPDIF",
-                       .stream_name = "SPDIF PCM",
-                       .codec_name = "spdif-dit.0",
-                       .platform_name = "tegra-pcm-audio",
-                       .cpu_dai_name = "tegra30-spdif",
-                       .codec_dai_name = "dit-hifi",
-                       .ops = &tegra_spdif_ops,
-               },
        [DAI_LINK_BTSCO] = {
                        .name = "BT SCO",
                        .stream_name = "BT SCO PCM",