aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/blackfin/bf5xx-ac97.c8
-rw-r--r--sound/soc/blackfin/bf5xx-ac97.h2
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c22
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.h2
-rw-r--r--sound/soc/blackfin/bf5xx-sport.c2
-rw-r--r--sound/soc/codecs/ad1836.c3
-rw-r--r--sound/soc/codecs/ad1938.c2
-rw-r--r--sound/soc/codecs/wm8753.c1
-rw-r--r--sound/soc/davinci/davinci-mcasp.c24
9 files changed, 45 insertions, 21 deletions
diff --git a/sound/soc/blackfin/bf5xx-ac97.c b/sound/soc/blackfin/bf5xx-ac97.c
index 2758b9017a7f..e69322978739 100644
--- a/sound/soc/blackfin/bf5xx-ac97.c
+++ b/sound/soc/blackfin/bf5xx-ac97.c
@@ -277,7 +277,11 @@ static int bf5xx_ac97_resume(struct snd_soc_dai *dai)
277 if (!dai->active) 277 if (!dai->active)
278 return 0; 278 return 0;
279 279
280#if defined(CONFIG_SND_BF5XX_MULTICHAN_SUPPORT)
281 ret = sport_set_multichannel(sport, 16, 0x3FF, 1);
282#else
280 ret = sport_set_multichannel(sport, 16, 0x1F, 1); 283 ret = sport_set_multichannel(sport, 16, 0x1F, 1);
284#endif
281 if (ret) { 285 if (ret) {
282 pr_err("SPORT is busy!\n"); 286 pr_err("SPORT is busy!\n");
283 return -EBUSY; 287 return -EBUSY;
@@ -334,7 +338,11 @@ static int bf5xx_ac97_probe(struct platform_device *pdev,
334 goto sport_err; 338 goto sport_err;
335 } 339 }
336 /*SPORT works in TDM mode to simulate AC97 transfers*/ 340 /*SPORT works in TDM mode to simulate AC97 transfers*/
341#if defined(CONFIG_SND_BF5XX_MULTICHAN_SUPPORT)
342 ret = sport_set_multichannel(sport_handle, 16, 0x3FF, 1);
343#else
337 ret = sport_set_multichannel(sport_handle, 16, 0x1F, 1); 344 ret = sport_set_multichannel(sport_handle, 16, 0x1F, 1);
345#endif
338 if (ret) { 346 if (ret) {
339 pr_err("SPORT is busy!\n"); 347 pr_err("SPORT is busy!\n");
340 ret = -EBUSY; 348 ret = -EBUSY;
diff --git a/sound/soc/blackfin/bf5xx-ac97.h b/sound/soc/blackfin/bf5xx-ac97.h
index 3f2a911fe0cb..a1f97dd809d6 100644
--- a/sound/soc/blackfin/bf5xx-ac97.h
+++ b/sound/soc/blackfin/bf5xx-ac97.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/sound/arm/bf5xx-ac97.h 2 * sound/soc/blackfin/bf5xx-ac97.h
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as 5 * it under the terms of the GNU General Public License version 2 as
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;
diff --git a/sound/soc/blackfin/bf5xx-i2s.h b/sound/soc/blackfin/bf5xx-i2s.h
index 7107d1a0b06b..264ecdcba35a 100644
--- a/sound/soc/blackfin/bf5xx-i2s.h
+++ b/sound/soc/blackfin/bf5xx-i2s.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/sound/arm/bf5xx-i2s.h 2 * sound/soc/blackfin/bf5xx-i2s.h
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as 5 * it under the terms of the GNU General Public License version 2 as
diff --git a/sound/soc/blackfin/bf5xx-sport.c b/sound/soc/blackfin/bf5xx-sport.c
index 469ce7fab20c..99051ff0954e 100644
--- a/sound/soc/blackfin/bf5xx-sport.c
+++ b/sound/soc/blackfin/bf5xx-sport.c
@@ -326,7 +326,7 @@ static inline int sport_hook_tx_dummy(struct sport_device *sport)
326 326
327int sport_tx_start(struct sport_device *sport) 327int sport_tx_start(struct sport_device *sport)
328{ 328{
329 unsigned flags; 329 unsigned long flags;
330 pr_debug("%s: tx_run:%d, rx_run:%d\n", __func__, 330 pr_debug("%s: tx_run:%d, rx_run:%d\n", __func__,
331 sport->tx_run, sport->rx_run); 331 sport->tx_run, sport->rx_run);
332 if (sport->tx_run) 332 if (sport->tx_run)
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c
index 01343dc984fd..c48485f2c55d 100644
--- a/sound/soc/codecs/ad1836.c
+++ b/sound/soc/codecs/ad1836.c
@@ -251,8 +251,7 @@ static int __devexit ad1836_spi_remove(struct spi_device *spi)
251 251
252static struct spi_driver ad1836_spi_driver = { 252static struct spi_driver ad1836_spi_driver = {
253 .driver = { 253 .driver = {
254 .name = "ad1836-spi", 254 .name = "ad1836",
255 .bus = &spi_bus_type,
256 .owner = THIS_MODULE, 255 .owner = THIS_MODULE,
257 }, 256 },
258 .probe = ad1836_spi_probe, 257 .probe = ad1836_spi_probe,
diff --git a/sound/soc/codecs/ad1938.c b/sound/soc/codecs/ad1938.c
index 9a049a1995a3..34b30efc3cb0 100644
--- a/sound/soc/codecs/ad1938.c
+++ b/sound/soc/codecs/ad1938.c
@@ -456,7 +456,6 @@ static int __devexit ad1938_spi_remove(struct spi_device *spi)
456static struct spi_driver ad1938_spi_driver = { 456static struct spi_driver ad1938_spi_driver = {
457 .driver = { 457 .driver = {
458 .name = "ad1938", 458 .name = "ad1938",
459 .bus = &spi_bus_type,
460 .owner = THIS_MODULE, 459 .owner = THIS_MODULE,
461 }, 460 },
462 .probe = ad1938_spi_probe, 461 .probe = ad1938_spi_probe,
@@ -515,6 +514,7 @@ static int ad1938_register(struct ad1938_priv *ad1938)
515 codec->num_dai = 1; 514 codec->num_dai = 1;
516 codec->write = ad1938_write_reg; 515 codec->write = ad1938_write_reg;
517 codec->read = ad1938_read_reg_cache; 516 codec->read = ad1938_read_reg_cache;
517 codec->set_bias_level = ad1938_set_bias_level;
518 INIT_LIST_HEAD(&codec->dapm_widgets); 518 INIT_LIST_HEAD(&codec->dapm_widgets);
519 INIT_LIST_HEAD(&codec->dapm_paths); 519 INIT_LIST_HEAD(&codec->dapm_paths);
520 520
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index d80d414cfbbd..5ad677ce80da 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -595,6 +595,7 @@ static const struct snd_soc_dapm_route audio_map[] = {
595 595
596 /* Mono Capture mixer-mux */ 596 /* Mono Capture mixer-mux */
597 {"Capture Right Mixer", "Stereo", "Capture Right Mux"}, 597 {"Capture Right Mixer", "Stereo", "Capture Right Mux"},
598 {"Capture Left Mixer", "Stereo", "Capture Left Mux"},
598 {"Capture Left Mixer", "Analogue Mix Left", "Capture Left Mux"}, 599 {"Capture Left Mixer", "Analogue Mix Left", "Capture Left Mux"},
599 {"Capture Left Mixer", "Analogue Mix Left", "Capture Right Mux"}, 600 {"Capture Left Mixer", "Analogue Mix Left", "Capture Right Mux"},
600 {"Capture Right Mixer", "Analogue Mix Right", "Capture Left Mux"}, 601 {"Capture Right Mixer", "Analogue Mix Right", "Capture Left Mux"},
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index eca22d7829d2..7a06c0a86665 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -512,34 +512,49 @@ static int davinci_config_channel_size(struct davinci_audio_dev *dev,
512 int channel_size) 512 int channel_size)
513{ 513{
514 u32 fmt = 0; 514 u32 fmt = 0;
515 u32 mask, rotate;
515 516
516 switch (channel_size) { 517 switch (channel_size) {
517 case DAVINCI_AUDIO_WORD_8: 518 case DAVINCI_AUDIO_WORD_8:
518 fmt = 0x03; 519 fmt = 0x03;
520 rotate = 6;
521 mask = 0x000000ff;
519 break; 522 break;
520 523
521 case DAVINCI_AUDIO_WORD_12: 524 case DAVINCI_AUDIO_WORD_12:
522 fmt = 0x05; 525 fmt = 0x05;
526 rotate = 5;
527 mask = 0x00000fff;
523 break; 528 break;
524 529
525 case DAVINCI_AUDIO_WORD_16: 530 case DAVINCI_AUDIO_WORD_16:
526 fmt = 0x07; 531 fmt = 0x07;
532 rotate = 4;
533 mask = 0x0000ffff;
527 break; 534 break;
528 535
529 case DAVINCI_AUDIO_WORD_20: 536 case DAVINCI_AUDIO_WORD_20:
530 fmt = 0x09; 537 fmt = 0x09;
538 rotate = 3;
539 mask = 0x000fffff;
531 break; 540 break;
532 541
533 case DAVINCI_AUDIO_WORD_24: 542 case DAVINCI_AUDIO_WORD_24:
534 fmt = 0x0B; 543 fmt = 0x0B;
544 rotate = 2;
545 mask = 0x00ffffff;
535 break; 546 break;
536 547
537 case DAVINCI_AUDIO_WORD_28: 548 case DAVINCI_AUDIO_WORD_28:
538 fmt = 0x0D; 549 fmt = 0x0D;
550 rotate = 1;
551 mask = 0x0fffffff;
539 break; 552 break;
540 553
541 case DAVINCI_AUDIO_WORD_32: 554 case DAVINCI_AUDIO_WORD_32:
542 fmt = 0x0F; 555 fmt = 0x0F;
556 rotate = 0;
557 mask = 0xffffffff;
543 break; 558 break;
544 559
545 default: 560 default:
@@ -550,6 +565,13 @@ static int davinci_config_channel_size(struct davinci_audio_dev *dev,
550 RXSSZ(fmt), RXSSZ(0x0F)); 565 RXSSZ(fmt), RXSSZ(0x0F));
551 mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, 566 mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG,
552 TXSSZ(fmt), TXSSZ(0x0F)); 567 TXSSZ(fmt), TXSSZ(0x0F));
568 mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, TXROT(rotate),
569 TXROT(7));
570 mcasp_mod_bits(dev->base + DAVINCI_MCASP_RXFMT_REG, RXROT(rotate),
571 RXROT(7));
572 mcasp_set_reg(dev->base + DAVINCI_MCASP_TXMASK_REG, mask);
573 mcasp_set_reg(dev->base + DAVINCI_MCASP_RXMASK_REG, mask);
574
553 return 0; 575 return 0;
554} 576}
555 577
@@ -638,7 +660,6 @@ static void davinci_hw_param(struct davinci_audio_dev *dev, int stream)
638 printk(KERN_ERR "playback tdm slot %d not supported\n", 660 printk(KERN_ERR "playback tdm slot %d not supported\n",
639 dev->tdm_slots); 661 dev->tdm_slots);
640 662
641 mcasp_set_reg(dev->base + DAVINCI_MCASP_TXMASK_REG, 0xFFFFFFFF);
642 mcasp_clr_bits(dev->base + DAVINCI_MCASP_TXFMCTL_REG, FSXDUR); 663 mcasp_clr_bits(dev->base + DAVINCI_MCASP_TXFMCTL_REG, FSXDUR);
643 } else { 664 } else {
644 /* bit stream is MSB first with no delay */ 665 /* bit stream is MSB first with no delay */
@@ -655,7 +676,6 @@ static void davinci_hw_param(struct davinci_audio_dev *dev, int stream)
655 printk(KERN_ERR "capture tdm slot %d not supported\n", 676 printk(KERN_ERR "capture tdm slot %d not supported\n",
656 dev->tdm_slots); 677 dev->tdm_slots);
657 678
658 mcasp_set_reg(dev->base + DAVINCI_MCASP_RXMASK_REG, 0xFFFFFFFF);
659 mcasp_clr_bits(dev->base + DAVINCI_MCASP_RXFMCTL_REG, FSRDUR); 679 mcasp_clr_bits(dev->base + DAVINCI_MCASP_RXFMCTL_REG, FSRDUR);
660 } 680 }
661} 681}