aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra/trimslice.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-12-07 15:58:29 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-07 23:34:07 -0500
commit7b9b5e11704afb8f05aa6490c3b4bb2cc328647c (patch)
tree387fd91ea3b96cdb68ab5b3ac62a14bcec00a2ac /sound/soc/tegra/trimslice.c
parent16b24881a031a653cd76b83bfd96ef2d30b2491b (diff)
ASoC: Tegra: Move DAS configuration into DAS driver
Move DAS routing setup into the DAS driver itself. This removes the need to duplicate this in each machine driver, of which we'll soon have three. An added advantage is that the machine drivers no longer call the Tegra20- specific DAS functions by name, so the machine driver no longer needs to be split up into Tegra20 and Tegra30 versions. If individual machine drivers need a different routing setup to this default, they can still call the DAS functions to set that up. Long-term, DAS will be a codec driver, and user-space will be able to control its routing, possibly within constraints that the machine driver sets up. Configuring the DAS routing from the DAS driver is a very slight move in that direction. 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.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/sound/soc/tegra/trimslice.c b/sound/soc/tegra/trimslice.c
index 043eb7c7eb73..7d95b7697a73 100644
--- a/sound/soc/tegra/trimslice.c
+++ b/sound/soc/tegra/trimslice.c
@@ -115,28 +115,6 @@ static const struct snd_soc_dapm_route trimslice_audio_map[] = {
115 {"RLINEIN", NULL, "Line In"}, 115 {"RLINEIN", NULL, "Line In"},
116}; 116};
117 117
118static int trimslice_asoc_init(struct snd_soc_pcm_runtime *rtd)
119{
120 struct snd_soc_codec *codec = rtd->codec;
121 struct snd_soc_card *card = codec->card;
122 int ret;
123
124 ret = tegra_das_connect_dap_to_dac(TEGRA_DAS_DAP_ID_1,
125 TEGRA_DAS_DAP_SEL_DAC1);
126 if (ret) {
127 dev_err(card->dev, "Can't set up DAS DAP connection\n");
128 return ret;
129 }
130 ret = tegra_das_connect_dac_to_dap(TEGRA_DAS_DAC_ID_1,
131 TEGRA_DAS_DAC_SEL_DAP1);
132 if (ret) {
133 dev_err(card->dev, "Can't set up DAS DAC connection\n");
134 return ret;
135 }
136
137 return 0;
138}
139
140static struct snd_soc_dai_link trimslice_tlv320aic23_dai = { 118static struct snd_soc_dai_link trimslice_tlv320aic23_dai = {
141 .name = "TLV320AIC23", 119 .name = "TLV320AIC23",
142 .stream_name = "AIC23", 120 .stream_name = "AIC23",
@@ -144,7 +122,6 @@ static struct snd_soc_dai_link trimslice_tlv320aic23_dai = {
144 .platform_name = "tegra-pcm-audio", 122 .platform_name = "tegra-pcm-audio",
145 .cpu_dai_name = "tegra-i2s.0", 123 .cpu_dai_name = "tegra-i2s.0",
146 .codec_dai_name = "tlv320aic23-hifi", 124 .codec_dai_name = "tlv320aic23-hifi",
147 .init = trimslice_asoc_init,
148 .ops = &trimslice_asoc_ops, 125 .ops = &trimslice_asoc_ops,
149}; 126};
150 127