summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/trimslice.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-11-22 18:21:13 -0700
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-23 10:24:10 +0000
commit65713ce8442b42c6f688bd8b0950a49d8f4dcf5f (patch)
tree20d251c473ab523635cf8aa03f8f2ca00b12792e /sound/soc/tegra/trimslice.c
parentf2296d7bf19a210a462a57bb90b1c9263d18a4ee (diff)
ASoC: Tegra: Move DAS configuration into machine drivers
This removes potentially machine-specific routing knowledge from the I2S driverinto the machine drivers, which is better equipped to know what the appropriate routing configuration is. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/tegra/trimslice.c')
-rw-r--r--sound/soc/tegra/trimslice.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/tegra/trimslice.c b/sound/soc/tegra/trimslice.c
index b3a7efa6d960..2699a6fa45f9 100644
--- a/sound/soc/tegra/trimslice.c
+++ b/sound/soc/tegra/trimslice.c
@@ -118,7 +118,22 @@ static const struct snd_soc_dapm_route trimslice_audio_map[] = {
static int trimslice_asoc_init(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_codec *codec = rtd->codec;
+ struct snd_soc_card *card = codec->card;
struct snd_soc_dapm_context *dapm = &codec->dapm;
+ int ret;
+
+ ret = tegra_das_connect_dap_to_dac(TEGRA_DAS_DAP_ID_1,
+ TEGRA_DAS_DAP_SEL_DAC1);
+ if (ret) {
+ dev_err(card->dev, "Can't set up DAS DAP connection\n");
+ return ret;
+ }
+ ret = tegra_das_connect_dac_to_dap(TEGRA_DAS_DAC_ID_1,
+ TEGRA_DAS_DAC_SEL_DAP1);
+ if (ret) {
+ dev_err(card->dev, "Can't set up DAS DAC connection\n");
+ return ret;
+ }
snd_soc_dapm_nc_pin(dapm, "LHPOUT");
snd_soc_dapm_nc_pin(dapm, "RHPOUT");