summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-07-26 13:51:24 -0600
committerStephen Warren <swarren@nvidia.com>2011-08-04 22:57:56 -0600
commit1f976d73389cdc2fdfba2e2a560b02b804959b04 (patch)
tree1a3dfb7280e50ddbadcf9eebec9547f42f5987b8 /sound
parentedb8d971acc3091e7f42ac85b8463e629142054b (diff)
ASoC: Tegra: Support Cardhu board in tegra_wm8903.c
Cardhu is a Tegra30 tablet reference design. In terms of audio, it is extremely similar to Harmony/Ventana, except that the WM8903 codec is attached to a different I2C bus ID, and different I2S port. Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/tegra/tegra_wm8903.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
index e24aba75ba86..156964c65320 100644
--- a/sound/soc/tegra/tegra_wm8903.c
+++ b/sound/soc/tegra/tegra_wm8903.c
@@ -300,7 +300,8 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_new_controls(dapm, tegra_wm8903_dapm_widgets,
ARRAY_SIZE(tegra_wm8903_dapm_widgets));
- if (machine_is_harmony() || machine_is_ventana()) {
+ if (machine_is_harmony() || machine_is_ventana() ||
+ machine_is_cardhu()) {
snd_soc_dapm_add_routes(dapm, harmony_audio_map,
ARRAY_SIZE(harmony_audio_map));
} else if (machine_is_seaboard()) {
@@ -337,7 +338,8 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_force_enable_pin(dapm, "Mic Bias");
/* FIXME: Calculate automatically based on DAPM routes? */
- if (!machine_is_harmony() && !machine_is_ventana())
+ if (!machine_is_harmony() && !machine_is_ventana() &&
+ !machine_is_ventana())
snd_soc_dapm_nc_pin(dapm, "IN1L");
if (!machine_is_seaboard() && !machine_is_aebl())
snd_soc_dapm_nc_pin(dapm, "IN1R");
@@ -404,6 +406,11 @@ static __devinit int tegra_wm8903_driver_probe(struct platform_device *pdev)
if (ret)
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";
+ }
+
card->dev = &pdev->dev;
platform_set_drvdata(pdev, card);
snd_soc_card_set_drvdata(card, machine);