diff options
author | Barry Song <barry.song@analog.com> | 2011-03-28 01:45:10 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-29 18:20:05 -0400 |
commit | 2c66cb99d134d787827ed1cd93cc59351ab66a95 (patch) | |
tree | 4c67200205b224947e9500b17af9537e54254a65 /sound/soc/blackfin/bf5xx-ad73311.c | |
parent | bfe4ee0a935dccf5980ecb5605c66fe50feb9056 (diff) |
ASoC: Blackfin: push down SPORT settings from global variables
Now that we have multi-component support, take the time to unify the
SPORT implementations a bit and make the setup dynamic. This kills
off the global sport_handle which was shared across all the Blackfin
machine drivers. The pin management aspect is off loaded to platform
resources, and now multiple SPORTs can be instantiated simultaneously.
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Scott Jiang <scott.jiang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/blackfin/bf5xx-ad73311.c')
-rw-r--r-- | sound/soc/blackfin/bf5xx-ad73311.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/sound/soc/blackfin/bf5xx-ad73311.c b/sound/soc/blackfin/bf5xx-ad73311.c index 9f0d4f3c590f..732a247f2527 100644 --- a/sound/soc/blackfin/bf5xx-ad73311.c +++ b/sound/soc/blackfin/bf5xx-ad73311.c | |||
@@ -145,16 +145,6 @@ static int bf5xx_probe(struct platform_device *pdev) | |||
145 | return 0; | 145 | return 0; |
146 | } | 146 | } |
147 | 147 | ||
148 | static int bf5xx_ad73311_startup(struct snd_pcm_substream *substream) | ||
149 | { | ||
150 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | ||
151 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
152 | |||
153 | pr_debug("%s enter\n", __func__); | ||
154 | snd_soc_dai_set_drvdata(cpu_dai, sport_handle); | ||
155 | return 0; | ||
156 | } | ||
157 | |||
158 | static int bf5xx_ad73311_hw_params(struct snd_pcm_substream *substream, | 148 | static int bf5xx_ad73311_hw_params(struct snd_pcm_substream *substream, |
159 | struct snd_pcm_hw_params *params) | 149 | struct snd_pcm_hw_params *params) |
160 | { | 150 | { |
@@ -176,24 +166,34 @@ static int bf5xx_ad73311_hw_params(struct snd_pcm_substream *substream, | |||
176 | 166 | ||
177 | 167 | ||
178 | static struct snd_soc_ops bf5xx_ad73311_ops = { | 168 | static struct snd_soc_ops bf5xx_ad73311_ops = { |
179 | .startup = bf5xx_ad73311_startup, | ||
180 | .hw_params = bf5xx_ad73311_hw_params, | 169 | .hw_params = bf5xx_ad73311_hw_params, |
181 | }; | 170 | }; |
182 | 171 | ||
183 | static struct snd_soc_dai_link bf5xx_ad73311_dai = { | 172 | static struct snd_soc_dai_link bf5xx_ad73311_dai[] = { |
184 | .name = "ad73311", | 173 | { |
185 | .stream_name = "AD73311", | 174 | .name = "ad73311", |
186 | .cpu_dai_name = "bfin-i2s", | 175 | .stream_name = "AD73311", |
187 | .codec_dai_name = "ad73311-hifi", | 176 | .cpu_dai_name = "bfin-i2s.0", |
188 | .platform_name = "bfin-i2s-pcm-audio", | 177 | .codec_dai_name = "ad73311-hifi", |
189 | .codec_name = "ad73311", | 178 | .platform_name = "bfin-i2s-pcm-audio", |
190 | .ops = &bf5xx_ad73311_ops, | 179 | .codec_name = "ad73311", |
180 | .ops = &bf5xx_ad73311_ops, | ||
181 | }, | ||
182 | { | ||
183 | .name = "ad73311", | ||
184 | .stream_name = "AD73311", | ||
185 | .cpu_dai_name = "bfin-i2s.1", | ||
186 | .codec_dai_name = "ad73311-hifi", | ||
187 | .platform_name = "bfin-i2s-pcm-audio", | ||
188 | .codec_name = "ad73311", | ||
189 | .ops = &bf5xx_ad73311_ops, | ||
190 | }, | ||
191 | }; | 191 | }; |
192 | 192 | ||
193 | static struct snd_soc_card bf5xx_ad73311 = { | 193 | static struct snd_soc_card bf5xx_ad73311 = { |
194 | .name = "bfin-ad73311", | 194 | .name = "bfin-ad73311", |
195 | .probe = bf5xx_probe, | 195 | .probe = bf5xx_probe, |
196 | .dai_link = &bf5xx_ad73311_dai, | 196 | .dai_link = &bf5xx_ad73311_dai[CONFIG_SND_BF5XX_SPORT_NUM], |
197 | .num_links = 1, | 197 | .num_links = 1, |
198 | }; | 198 | }; |
199 | 199 | ||