diff options
author | Sumit Bhattacharya <sumitb@nvidia.com> | 2011-09-28 20:31:23 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-10-11 11:25:22 -0700 |
commit | 76e67f1a09ba6e068769adab67c974fcc4f32b09 (patch) | |
tree | 1f35f9edbdef391af5a64b4dbe0824ddf563f65c /sound | |
parent | a4809a9321cf3eac07f4591606ef0045cdb0defd (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
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/tegra/Kconfig | 8 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_max98088.c | 34 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_wm8753.c | 2 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_wm8903.c | 4 |
4 files changed, 31 insertions, 17 deletions
diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig index 8131cc90ed81..106bd7130d5b 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 @@ -84,8 +85,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 @@ -104,7 +106,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 b118d5eb8ae0..29b72e13562a 100644 --- a/sound/soc/tegra/tegra_wm8903.c +++ b/sound/soc/tegra/tegra_wm8903.c @@ -379,7 +379,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", @@ -389,7 +388,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 = { @@ -426,6 +424,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; |