summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorSumit Bhattacharya <sumitb@nvidia.com>2011-09-28 20:31:23 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:16 -0800
commit1bdb0af1054890a367f73899c163944c1a40aaba (patch)
treeb89d09c067e11d38613de76f1aef67c9be7a32bb /sound/soc
parent424330657d9a2d998f5e7c200468122586e349e0 (diff)
ASoC: Tegra: Enable SPDIF DAI for Tegra30
Bug 872652 Change-Id: Ia35ba728859bcba1bff1ce73c622203d027bc8f9 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/54989 Reviewed-by: Scott Peterson <speterson@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Gerrit_Virtual_Submit Rebase-Id: Rd23d694c056cefb76669c510b1367128255f3835
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/tegra/Kconfig8
-rw-r--r--sound/soc/tegra/tegra_max98088.c34
-rw-r--r--sound/soc/tegra/tegra_wm8753.c2
-rw-r--r--sound/soc/tegra/tegra_wm8903.c4
4 files changed, 31 insertions, 17 deletions
diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig
index f474ee16ac52..c69f058f625c 100644
--- a/sound/soc/tegra/Kconfig
+++ b/sound/soc/tegra/Kconfig
@@ -63,8 +63,9 @@ config SND_SOC_TEGRA_WM8903
select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC
select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC
select SND_SOC_TEGRA20_SPDIF if ARCH_TEGRA_2x_SOC
+ select SND_SOC_TEGRA30_SPDIF if ARCH_TEGRA_3x_SOC
select SND_SOC_WM8903
- select SND_SOC_SPDIF if ARCH_TEGRA_2x_SOC
+ select SND_SOC_SPDIF
help
Say Y or M here if you want to add support for SoC audio on Tegra
boards using the WM8093 codec. Currently, the supported boards are
@@ -93,8 +94,9 @@ config SND_SOC_TEGRA_WM8753
select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC
select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC
select SND_SOC_TEGRA20_SPDIF if ARCH_TEGRA_2x_SOC
+ select SND_SOC_TEGRA30_SPDIF if ARCH_TEGRA_3x_SOC
select SND_SOC_WM8753
- select SND_SOC_SPDIF if ARCH_TEGRA_2x_SOC
+ select SND_SOC_SPDIF
help
Say Y or M here if you want to add support for SoC audio on Tegra
boards using the WM8753 codec. Currently, only supported board is
@@ -113,7 +115,9 @@ config SND_SOC_TEGRA_MAX98088
depends on MACH_HAS_SND_SOC_TEGRA_MAX98088
select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC
select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC
+ select SND_SOC_TEGRA30_SPDIF if ARCH_TEGRA_3x_SOC
select SND_SOC_MAX98088
+ select SND_SOC_SPDIF
help
Say Y or M here if you want to add support for SoC audio on Tegra
boards using the MAX98088 codec. Currently, only supported board is
diff --git a/sound/soc/tegra/tegra_max98088.c b/sound/soc/tegra/tegra_max98088.c
index 12f9650ad2a5..d89c2835244f 100644
--- a/sound/soc/tegra/tegra_max98088.c
+++ b/sound/soc/tegra/tegra_max98088.c
@@ -133,6 +133,7 @@ static int tegra_max98088_hw_params(struct snd_pcm_substream *substream,
static struct snd_soc_ops tegra_max98088_ops = {
.hw_params = tegra_max98088_hw_params,
};
+static struct snd_soc_ops tegra_spdif_ops;
static struct snd_soc_jack tegra_max98088_hp_jack;
@@ -301,21 +302,32 @@ static int tegra_max98088_init(struct snd_soc_pcm_runtime *rtd)
return 0;
}
-static struct snd_soc_dai_link tegra_max98088_dai = {
- .name = "MAX98088",
- .stream_name = "MAX98088 HIFI",
- .codec_name = "max98088.0-0010",
- .platform_name = "tegra-pcm-audio",
- .cpu_dai_name = "tegra30-i2s.0",
- .codec_dai_name = "HiFi",
- .init = tegra_max98088_init,
- .ops = &tegra_max98088_ops,
+static struct snd_soc_dai_link tegra_max98088_dai[] = {
+ {
+ .name = "MAX98088",
+ .stream_name = "MAX98088 HIFI",
+ .codec_name = "max98088.0-0010",
+ .platform_name = "tegra-pcm-audio",
+ .cpu_dai_name = "tegra30-i2s.0",
+ .codec_dai_name = "HiFi",
+ .init = tegra_max98088_init,
+ .ops = &tegra_max98088_ops,
+ },
+ {
+ .name = "SPDIF",
+ .stream_name = "SPDIF PCM",
+ .codec_name = "spdif-dit",
+ .platform_name = "tegra-pcm-audio",
+ .cpu_dai_name = "tegra30-spdif",
+ .codec_dai_name = "dit-hifi",
+ .ops = &tegra_spdif_ops,
+ }
};
static struct snd_soc_card snd_soc_tegra_max98088 = {
.name = "tegra-max98088",
- .dai_link = &tegra_max98088_dai,
- .num_links = 1,
+ .dai_link = tegra_max98088_dai,
+ .num_links = ARRAY_SIZE(tegra_max98088_dai),
};
static __devinit int tegra_max98088_driver_probe(struct platform_device *pdev)
diff --git a/sound/soc/tegra/tegra_wm8753.c b/sound/soc/tegra/tegra_wm8753.c
index 07ab9191ea2c..4dc3b7dc80ae 100644
--- a/sound/soc/tegra/tegra_wm8753.c
+++ b/sound/soc/tegra/tegra_wm8753.c
@@ -341,7 +341,6 @@ static struct snd_soc_dai_link tegra_wm8753_dai[] = {
.init = tegra_wm8753_init,
.ops = &tegra_wm8753_ops,
},
-#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
{
.name = "SPDIF",
.stream_name = "SPDIF PCM",
@@ -351,7 +350,6 @@ static struct snd_soc_dai_link tegra_wm8753_dai[] = {
.codec_dai_name = "dit-hifi",
.ops = &tegra_spdif_ops,
}
-#endif
};
static struct snd_soc_card snd_soc_tegra_wm8753 = {
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
index 1fbfaa88e5b4..4bea080e6f2a 100644
--- a/sound/soc/tegra/tegra_wm8903.c
+++ b/sound/soc/tegra/tegra_wm8903.c
@@ -356,7 +356,6 @@ static struct snd_soc_dai_link tegra_wm8903_dai[] = {
.init = tegra_wm8903_init,
.ops = &tegra_wm8903_ops,
},
-#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
{
.name = "SPDIF",
.stream_name = "SPDIF PCM",
@@ -366,7 +365,6 @@ static struct snd_soc_dai_link tegra_wm8903_dai[] = {
.codec_dai_name = "dit-hifi",
.ops = &tegra_spdif_ops,
}
-#endif
};
static struct snd_soc_card snd_soc_tegra_wm8903 = {
@@ -408,6 +406,8 @@ static __devinit int tegra_wm8903_driver_probe(struct platform_device *pdev)
if (machine_is_cardhu()) {
tegra_wm8903_dai[0].codec_name = "wm8903.4-001a",
tegra_wm8903_dai[0].cpu_dai_name = "tegra30-i2s.1";
+
+ tegra_wm8903_dai[1].cpu_dai_name = "tegra30-spdif";
}
card->dev = &pdev->dev;