aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/blackfin/bf5xx-i2s.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 13:02:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 13:02:43 -0400
commitfe61c99a1227aeb5a4324e39cecf465a4b2052d3 (patch)
tree897eb0eaab90488835a18197dca9640737d5623a /sound/soc/blackfin/bf5xx-i2s.c
parent9fd815b55f31be48dbb3dd23922587d247a4e497 (diff)
parent877ae70763fa0b19ffbe25e7e119fc96f52fbbd3 (diff)
Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ASoC: wm8753: fix mapping when MONOMIX is set to Stereo ASoC: some minor changes for AD1836 and AD1938 codec drivers ASoC: DaVinci: Fixes to McASP configuration ASoC: Blackfin I2S: fix resuming when device hasn't been used ASoC: Blackfin I2S: add lost platform_device parameter to resume function ASoC: fix typos in Blackfin headers ASoC: bf5xx-sport: the irq save/restore funcs take an unsigned long ASoC: Blackfin AC97: add a few missing multichannel define handling
Diffstat (limited to 'sound/soc/blackfin/bf5xx-i2s.c')
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c
index 876abade27e1..1e9d161c76c4 100644
--- a/sound/soc/blackfin/bf5xx-i2s.c
+++ b/sound/soc/blackfin/bf5xx-i2s.c
@@ -227,7 +227,8 @@ static int bf5xx_i2s_probe(struct platform_device *pdev,
227 return 0; 227 return 0;
228} 228}
229 229
230static void bf5xx_i2s_remove(struct snd_soc_dai *dai) 230static void bf5xx_i2s_remove(struct platform_device *pdev,
231 struct snd_soc_dai *dai)
231{ 232{
232 pr_debug("%s enter\n", __func__); 233 pr_debug("%s enter\n", __func__);
233 peripheral_free_list(&sport_req[sport_num][0]); 234 peripheral_free_list(&sport_req[sport_num][0]);
@@ -236,36 +237,31 @@ static void bf5xx_i2s_remove(struct snd_soc_dai *dai)
236#ifdef CONFIG_PM 237#ifdef CONFIG_PM
237static int bf5xx_i2s_suspend(struct snd_soc_dai *dai) 238static int bf5xx_i2s_suspend(struct snd_soc_dai *dai)
238{ 239{
239 struct sport_device *sport =
240 (struct sport_device *)dai->private_data;
241 240
242 pr_debug("%s : sport %d\n", __func__, dai->id); 241 pr_debug("%s : sport %d\n", __func__, dai->id);
243 if (!dai->active) 242
244 return 0;
245 if (dai->capture.active) 243 if (dai->capture.active)
246 sport_rx_stop(sport); 244 sport_rx_stop(sport_handle);
247 if (dai->playback.active) 245 if (dai->playback.active)
248 sport_tx_stop(sport); 246 sport_tx_stop(sport_handle);
249 return 0; 247 return 0;
250} 248}
251 249
252static int bf5xx_i2s_resume(struct snd_soc_dai *dai) 250static int bf5xx_i2s_resume(struct snd_soc_dai *dai)
253{ 251{
254 int ret; 252 int ret;
255 struct sport_device *sport =
256 (struct sport_device *)dai->private_data;
257 253
258 pr_debug("%s : sport %d\n", __func__, dai->id); 254 pr_debug("%s : sport %d\n", __func__, dai->id);
259 if (!dai->active)
260 return 0;
261 255
262 ret = sport_config_rx(sport, RFSR | RCKFE, RSFSE|0x1f, 0, 0); 256 ret = sport_config_rx(sport_handle, bf5xx_i2s.rcr1,
257 bf5xx_i2s.rcr2, 0, 0);
263 if (ret) { 258 if (ret) {
264 pr_err("SPORT is busy!\n"); 259 pr_err("SPORT is busy!\n");
265 return -EBUSY; 260 return -EBUSY;
266 } 261 }
267 262
268 ret = sport_config_tx(sport, TFSR | TCKFE, TSFSE|0x1f, 0, 0); 263 ret = sport_config_tx(sport_handle, bf5xx_i2s.tcr1,
264 bf5xx_i2s.tcr2, 0, 0);
269 if (ret) { 265 if (ret) {
270 pr_err("SPORT is busy!\n"); 266 pr_err("SPORT is busy!\n");
271 return -EBUSY; 267 return -EBUSY;