diff options
author | Sumit Bhattacharya <sumitb@nvidia.com> | 2011-09-22 00:35:50 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:00 -0800 |
commit | 38cf56edd48272404b84a6da88f4babc5db81f94 (patch) | |
tree | fe645a5892a7f104e93fd2b0c5ebb137efafd9ee /sound/soc/tegra/tegra_wm8903.c | |
parent | c29ddbe247d3a0b3ab46f15e24a83de0e64683e4 (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/tegra/tegra_wm8903.c')
-rw-r--r-- | sound/soc/tegra/tegra_wm8903.c | 41 |
1 files changed, 28 insertions, 13 deletions
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; |