summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorSumit Bhattacharya <sumitb@nvidia.com>2011-09-22 00:35:50 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:00 -0800
commit38cf56edd48272404b84a6da88f4babc5db81f94 (patch)
treefe645a5892a7f104e93fd2b0c5ebb137efafd9ee /sound/soc
parentc29ddbe247d3a0b3ab46f15e24a83de0e64683e4 (diff)
ASoC: Tegra: Enable SPDIF DAI for Tegra20
Bug 872652 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Change-Id: Ia58d12a6bf7d99b0679cf0dc5f0d727af06903c8 Reviewed-on: http://git-master/r/53812 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R0535370b359e6e69f554bb39f9d393c33a3557c9
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/tegra/Kconfig4
-rw-r--r--sound/soc/tegra/tegra_wm8753.c37
-rw-r--r--sound/soc/tegra/tegra_wm8903.c41
3 files changed, 58 insertions, 24 deletions
diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig
index 548d0a7bf838..18577909f666 100644
--- a/sound/soc/tegra/Kconfig
+++ b/sound/soc/tegra/Kconfig
@@ -53,7 +53,9 @@ config SND_SOC_TEGRA_WM8903
depends on MACH_HAS_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_WM8903
+ select SND_SOC_SPDIF if ARCH_TEGRA_2x_SOC
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
@@ -81,7 +83,9 @@ config SND_SOC_TEGRA_WM8753
depends on MACH_HAS_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_WM8753
+ select SND_SOC_SPDIF if ARCH_TEGRA_2x_SOC
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
diff --git a/sound/soc/tegra/tegra_wm8753.c b/sound/soc/tegra/tegra_wm8753.c
index 1674a9b38476..07ab9191ea2c 100644
--- a/sound/soc/tegra/tegra_wm8753.c
+++ b/sound/soc/tegra/tegra_wm8753.c
@@ -135,6 +135,8 @@ static struct snd_soc_ops tegra_wm8753_ops = {
.hw_params = tegra_wm8753_hw_params,
};
+static struct snd_soc_ops tegra_spdif_ops;
+
static struct snd_soc_jack tegra_wm8753_hp_jack;
static struct snd_soc_jack_pin tegra_wm8753_hp_jack_pins[] = {
@@ -328,21 +330,34 @@ static int tegra_wm8753_init(struct snd_soc_pcm_runtime *rtd)
return 0;
}
-static struct snd_soc_dai_link tegra_wm8753_dai = {
- .name = "WM8753",
- .stream_name = "WM8753 PCM HIFI",
- .codec_name = "wm8753-codec.4-001a",
- .platform_name = "tegra-pcm-audio",
- .cpu_dai_name = "tegra20-i2s.0",
- .codec_dai_name = "wm8753-hifi",
- .init = tegra_wm8753_init,
- .ops = &tegra_wm8753_ops,
+static struct snd_soc_dai_link tegra_wm8753_dai[] = {
+ {
+ .name = "WM8753",
+ .stream_name = "WM8753 PCM HIFI",
+ .codec_name = "wm8753-codec.4-001a",
+ .platform_name = "tegra-pcm-audio",
+ .cpu_dai_name = "tegra20-i2s.0",
+ .codec_dai_name = "wm8753-hifi",
+ .init = tegra_wm8753_init,
+ .ops = &tegra_wm8753_ops,
+ },
+#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
+ {
+ .name = "SPDIF",
+ .stream_name = "SPDIF PCM",
+ .codec_name = "spdif-dit",
+ .platform_name = "tegra-pcm-audio",
+ .cpu_dai_name = "tegra20-spdif",
+ .codec_dai_name = "dit-hifi",
+ .ops = &tegra_spdif_ops,
+ }
+#endif
};
static struct snd_soc_card snd_soc_tegra_wm8753 = {
.name = "tegra-wm8753",
- .dai_link = &tegra_wm8753_dai,
- .num_links = 1,
+ .dai_link = tegra_wm8753_dai,
+ .num_links = ARRAY_SIZE(tegra_wm8753_dai),
};
static __devinit int tegra_wm8753_driver_probe(struct platform_device *pdev)
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
index 8c7ff4284437..1fbfaa88e5b4 100644
--- a/sound/soc/tegra/tegra_wm8903.c
+++ b/sound/soc/tegra/tegra_wm8903.c
@@ -127,6 +127,8 @@ static struct snd_soc_ops tegra_wm8903_ops = {
.hw_params = tegra_wm8903_hw_params,
};
+static struct snd_soc_ops tegra_spdif_ops;
+
static struct snd_soc_jack tegra_wm8903_hp_jack;
static struct snd_soc_jack_pin tegra_wm8903_hp_jack_pins[] = {
@@ -343,21 +345,34 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
return 0;
}
-static struct snd_soc_dai_link tegra_wm8903_dai = {
- .name = "WM8903",
- .stream_name = "WM8903 PCM",
- .codec_name = "wm8903.0-001a",
- .platform_name = "tegra-pcm-audio",
- .cpu_dai_name = "tegra20-i2s.0",
- .codec_dai_name = "wm8903-hifi",
- .init = tegra_wm8903_init,
- .ops = &tegra_wm8903_ops,
+static struct snd_soc_dai_link tegra_wm8903_dai[] = {
+ {
+ .name = "WM8903",
+ .stream_name = "WM8903 PCM",
+ .codec_name = "wm8903.0-001a",
+ .platform_name = "tegra-pcm-audio",
+ .cpu_dai_name = "tegra20-i2s.0",
+ .codec_dai_name = "wm8903-hifi",
+ .init = tegra_wm8903_init,
+ .ops = &tegra_wm8903_ops,
+ },
+#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
+ {
+ .name = "SPDIF",
+ .stream_name = "SPDIF PCM",
+ .codec_name = "spdif-dit",
+ .platform_name = "tegra-pcm-audio",
+ .cpu_dai_name = "tegra20-spdif",
+ .codec_dai_name = "dit-hifi",
+ .ops = &tegra_spdif_ops,
+ }
+#endif
};
static struct snd_soc_card snd_soc_tegra_wm8903 = {
.name = "tegra-wm8903",
- .dai_link = &tegra_wm8903_dai,
- .num_links = 1,
+ .dai_link = tegra_wm8903_dai,
+ .num_links = ARRAY_SIZE(tegra_wm8903_dai),
.controls = tegra_wm8903_controls,
.num_controls = ARRAY_SIZE(tegra_wm8903_controls),
@@ -391,8 +406,8 @@ static __devinit int tegra_wm8903_driver_probe(struct platform_device *pdev)
goto err_free_machine;
if (machine_is_cardhu()) {
- tegra_wm8903_dai.codec_name = "wm8903.4-001a",
- tegra_wm8903_dai.cpu_dai_name = "tegra30-i2s.1";
+ tegra_wm8903_dai[0].codec_name = "wm8903.4-001a",
+ tegra_wm8903_dai[0].cpu_dai_name = "tegra30-i2s.1";
}
card->dev = &pdev->dev;