diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-01 12:14:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-01 12:14:52 -0400 |
commit | 720e87efe21b43c89093c1f04ec9ecba2f0213b8 (patch) | |
tree | 2cda871ad084ae5ba110c23075dd3c6e84d041ae /sound | |
parent | ccd00d1091fa7fff151127f26f6900be2ac8cc10 (diff) | |
parent | a0334c50bf0ba7c720ed00f931e721c989efd233 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: pcm: fix infinite loop in snd_pcm_update_hw_ptr0()
ALSA: HDA: Add dock mic quirk for Lenovo Thinkpad X220
ALSA: ens1371: fix Creative Ectiva support
ALSA: firewire-speakers: fix hang when unplugging a running device
ASoC: Fix CODEC device name for Corgi
ALSA: hda - Fix pin-config of Gigabyte mobo
ASoC: imx: fix burstsize for DMA
ASoC: imx: set watermarks for mx2-dma
ASoC: twl6040: Return -ENOMEM if create_singlethread_workqueue fails
ASoC: tlv320dac33: Restore L/R DAC power control register
ASoC: Explicitly say registerless widgets have no register
ASoC: tlv320dac33: Fix inconsistent spinlock usage
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/pcm_lib.c | 4 | ||||
-rw-r--r-- | sound/firewire/speakers.c | 3 | ||||
-rw-r--r-- | sound/pci/ens1370.c | 23 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 21 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320dac33.c | 32 | ||||
-rw-r--r-- | sound/soc/codecs/twl6040.c | 4 | ||||
-rw-r--r-- | sound/soc/imx/imx-pcm-dma-mx2.c | 9 | ||||
-rw-r--r-- | sound/soc/imx/imx-ssi.h | 3 | ||||
-rw-r--r-- | sound/soc/pxa/corgi.c | 2 |
10 files changed, 73 insertions, 29 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index a82e3756a72d..64449cb8f873 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -375,6 +375,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream, | |||
375 | } | 375 | } |
376 | 376 | ||
377 | if (runtime->no_period_wakeup) { | 377 | if (runtime->no_period_wakeup) { |
378 | snd_pcm_sframes_t xrun_threshold; | ||
378 | /* | 379 | /* |
379 | * Without regular period interrupts, we have to check | 380 | * Without regular period interrupts, we have to check |
380 | * the elapsed time to detect xruns. | 381 | * the elapsed time to detect xruns. |
@@ -383,7 +384,8 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream, | |||
383 | if (jdelta < runtime->hw_ptr_buffer_jiffies / 2) | 384 | if (jdelta < runtime->hw_ptr_buffer_jiffies / 2) |
384 | goto no_delta_check; | 385 | goto no_delta_check; |
385 | hdelta = jdelta - delta * HZ / runtime->rate; | 386 | hdelta = jdelta - delta * HZ / runtime->rate; |
386 | while (hdelta > runtime->hw_ptr_buffer_jiffies / 2 + 1) { | 387 | xrun_threshold = runtime->hw_ptr_buffer_jiffies / 2 + 1; |
388 | while (hdelta > xrun_threshold) { | ||
387 | delta += runtime->buffer_size; | 389 | delta += runtime->buffer_size; |
388 | hw_base += runtime->buffer_size; | 390 | hw_base += runtime->buffer_size; |
389 | if (hw_base >= runtime->boundary) | 391 | if (hw_base >= runtime->boundary) |
diff --git a/sound/firewire/speakers.c b/sound/firewire/speakers.c index 0fce9218abb1..5466de8527bd 100644 --- a/sound/firewire/speakers.c +++ b/sound/firewire/speakers.c | |||
@@ -778,10 +778,9 @@ static int __devexit fwspk_remove(struct device *dev) | |||
778 | { | 778 | { |
779 | struct fwspk *fwspk = dev_get_drvdata(dev); | 779 | struct fwspk *fwspk = dev_get_drvdata(dev); |
780 | 780 | ||
781 | snd_card_disconnect(fwspk->card); | ||
782 | |||
783 | mutex_lock(&fwspk->mutex); | 781 | mutex_lock(&fwspk->mutex); |
784 | amdtp_out_stream_pcm_abort(&fwspk->stream); | 782 | amdtp_out_stream_pcm_abort(&fwspk->stream); |
783 | snd_card_disconnect(fwspk->card); | ||
785 | fwspk_stop_stream(fwspk); | 784 | fwspk_stop_stream(fwspk); |
786 | mutex_unlock(&fwspk->mutex); | 785 | mutex_unlock(&fwspk->mutex); |
787 | 786 | ||
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index 537cfba829a5..863eafea691f 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c | |||
@@ -229,6 +229,7 @@ MODULE_PARM_DESC(lineio, "Line In to Rear Out (0 = auto, 1 = force)."); | |||
229 | #define ES_REG_1371_CODEC 0x14 /* W/R: Codec Read/Write register address */ | 229 | #define ES_REG_1371_CODEC 0x14 /* W/R: Codec Read/Write register address */ |
230 | #define ES_1371_CODEC_RDY (1<<31) /* codec ready */ | 230 | #define ES_1371_CODEC_RDY (1<<31) /* codec ready */ |
231 | #define ES_1371_CODEC_WIP (1<<30) /* codec register access in progress */ | 231 | #define ES_1371_CODEC_WIP (1<<30) /* codec register access in progress */ |
232 | #define EV_1938_CODEC_MAGIC (1<<26) | ||
232 | #define ES_1371_CODEC_PIRD (1<<23) /* codec read/write select register */ | 233 | #define ES_1371_CODEC_PIRD (1<<23) /* codec read/write select register */ |
233 | #define ES_1371_CODEC_WRITE(a,d) ((((a)&0x7f)<<16)|(((d)&0xffff)<<0)) | 234 | #define ES_1371_CODEC_WRITE(a,d) ((((a)&0x7f)<<16)|(((d)&0xffff)<<0)) |
234 | #define ES_1371_CODEC_READS(a) ((((a)&0x7f)<<16)|ES_1371_CODEC_PIRD) | 235 | #define ES_1371_CODEC_READS(a) ((((a)&0x7f)<<16)|ES_1371_CODEC_PIRD) |
@@ -603,12 +604,18 @@ static void snd_es1370_codec_write(struct snd_ak4531 *ak4531, | |||
603 | 604 | ||
604 | #ifdef CHIP1371 | 605 | #ifdef CHIP1371 |
605 | 606 | ||
607 | static inline bool is_ev1938(struct ensoniq *ensoniq) | ||
608 | { | ||
609 | return ensoniq->pci->device == 0x8938; | ||
610 | } | ||
611 | |||
606 | static void snd_es1371_codec_write(struct snd_ac97 *ac97, | 612 | static void snd_es1371_codec_write(struct snd_ac97 *ac97, |
607 | unsigned short reg, unsigned short val) | 613 | unsigned short reg, unsigned short val) |
608 | { | 614 | { |
609 | struct ensoniq *ensoniq = ac97->private_data; | 615 | struct ensoniq *ensoniq = ac97->private_data; |
610 | unsigned int t, x; | 616 | unsigned int t, x, flag; |
611 | 617 | ||
618 | flag = is_ev1938(ensoniq) ? EV_1938_CODEC_MAGIC : 0; | ||
612 | mutex_lock(&ensoniq->src_mutex); | 619 | mutex_lock(&ensoniq->src_mutex); |
613 | for (t = 0; t < POLL_COUNT; t++) { | 620 | for (t = 0; t < POLL_COUNT; t++) { |
614 | if (!(inl(ES_REG(ensoniq, 1371_CODEC)) & ES_1371_CODEC_WIP)) { | 621 | if (!(inl(ES_REG(ensoniq, 1371_CODEC)) & ES_1371_CODEC_WIP)) { |
@@ -630,7 +637,8 @@ static void snd_es1371_codec_write(struct snd_ac97 *ac97, | |||
630 | 0x00010000) | 637 | 0x00010000) |
631 | break; | 638 | break; |
632 | } | 639 | } |
633 | outl(ES_1371_CODEC_WRITE(reg, val), ES_REG(ensoniq, 1371_CODEC)); | 640 | outl(ES_1371_CODEC_WRITE(reg, val) | flag, |
641 | ES_REG(ensoniq, 1371_CODEC)); | ||
634 | /* restore SRC reg */ | 642 | /* restore SRC reg */ |
635 | snd_es1371_wait_src_ready(ensoniq); | 643 | snd_es1371_wait_src_ready(ensoniq); |
636 | outl(x, ES_REG(ensoniq, 1371_SMPRATE)); | 644 | outl(x, ES_REG(ensoniq, 1371_SMPRATE)); |
@@ -647,8 +655,9 @@ static unsigned short snd_es1371_codec_read(struct snd_ac97 *ac97, | |||
647 | unsigned short reg) | 655 | unsigned short reg) |
648 | { | 656 | { |
649 | struct ensoniq *ensoniq = ac97->private_data; | 657 | struct ensoniq *ensoniq = ac97->private_data; |
650 | unsigned int t, x, fail = 0; | 658 | unsigned int t, x, flag, fail = 0; |
651 | 659 | ||
660 | flag = is_ev1938(ensoniq) ? EV_1938_CODEC_MAGIC : 0; | ||
652 | __again: | 661 | __again: |
653 | mutex_lock(&ensoniq->src_mutex); | 662 | mutex_lock(&ensoniq->src_mutex); |
654 | for (t = 0; t < POLL_COUNT; t++) { | 663 | for (t = 0; t < POLL_COUNT; t++) { |
@@ -671,7 +680,8 @@ static unsigned short snd_es1371_codec_read(struct snd_ac97 *ac97, | |||
671 | 0x00010000) | 680 | 0x00010000) |
672 | break; | 681 | break; |
673 | } | 682 | } |
674 | outl(ES_1371_CODEC_READS(reg), ES_REG(ensoniq, 1371_CODEC)); | 683 | outl(ES_1371_CODEC_READS(reg) | flag, |
684 | ES_REG(ensoniq, 1371_CODEC)); | ||
675 | /* restore SRC reg */ | 685 | /* restore SRC reg */ |
676 | snd_es1371_wait_src_ready(ensoniq); | 686 | snd_es1371_wait_src_ready(ensoniq); |
677 | outl(x, ES_REG(ensoniq, 1371_SMPRATE)); | 687 | outl(x, ES_REG(ensoniq, 1371_SMPRATE)); |
@@ -683,6 +693,11 @@ static unsigned short snd_es1371_codec_read(struct snd_ac97 *ac97, | |||
683 | /* now wait for the stinkin' data (RDY) */ | 693 | /* now wait for the stinkin' data (RDY) */ |
684 | for (t = 0; t < POLL_COUNT; t++) { | 694 | for (t = 0; t < POLL_COUNT; t++) { |
685 | if ((x = inl(ES_REG(ensoniq, 1371_CODEC))) & ES_1371_CODEC_RDY) { | 695 | if ((x = inl(ES_REG(ensoniq, 1371_CODEC))) & ES_1371_CODEC_RDY) { |
696 | if (is_ev1938(ensoniq)) { | ||
697 | for (t = 0; t < 100; t++) | ||
698 | inl(ES_REG(ensoniq, CONTROL)); | ||
699 | x = inl(ES_REG(ensoniq, 1371_CODEC)); | ||
700 | } | ||
686 | mutex_unlock(&ensoniq->src_mutex); | 701 | mutex_unlock(&ensoniq->src_mutex); |
687 | return ES_1371_CODEC_READ(x); | 702 | return ES_1371_CODEC_READ(x); |
688 | } | 703 | } |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index d08cf31596f3..69e33869a53e 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -3034,6 +3034,7 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = { | |||
3034 | SND_PCI_QUIRK(0x17aa, 0x21c5, "Thinkpad Edge 13", CXT5066_THINKPAD), | 3034 | SND_PCI_QUIRK(0x17aa, 0x21c5, "Thinkpad Edge 13", CXT5066_THINKPAD), |
3035 | SND_PCI_QUIRK(0x17aa, 0x21c6, "Thinkpad Edge 13", CXT5066_ASUS), | 3035 | SND_PCI_QUIRK(0x17aa, 0x21c6, "Thinkpad Edge 13", CXT5066_ASUS), |
3036 | SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo Thinkpad", CXT5066_THINKPAD), | 3036 | SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo Thinkpad", CXT5066_THINKPAD), |
3037 | SND_PCI_QUIRK(0x17aa, 0x21da, "Lenovo X220", CXT5066_THINKPAD), | ||
3037 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G560", CXT5066_ASUS), | 3038 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G560", CXT5066_ASUS), |
3038 | SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", CXT5066_IDEAPAD), /* Fallback for Lenovos without dock mic */ | 3039 | SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", CXT5066_IDEAPAD), /* Fallback for Lenovos without dock mic */ |
3039 | {} | 3040 | {} |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0ef0035fe99f..12c6f4508c54 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -9863,7 +9863,6 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = { | |||
9863 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), | 9863 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), |
9864 | SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL), | 9864 | SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL), |
9865 | SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch), | 9865 | SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch), |
9866 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte P35 DS3R", ALC882_6ST_DIG), | ||
9867 | 9866 | ||
9868 | SND_PCI_QUIRK(0x1462, 0x0349, "MSI", ALC883_TARGA_2ch_DIG), | 9867 | SND_PCI_QUIRK(0x1462, 0x0349, "MSI", ALC883_TARGA_2ch_DIG), |
9869 | SND_PCI_QUIRK(0x1462, 0x040d, "MSI", ALC883_TARGA_2ch_DIG), | 9868 | SND_PCI_QUIRK(0x1462, 0x040d, "MSI", ALC883_TARGA_2ch_DIG), |
@@ -10700,6 +10699,7 @@ enum { | |||
10700 | PINFIX_LENOVO_Y530, | 10699 | PINFIX_LENOVO_Y530, |
10701 | PINFIX_PB_M5210, | 10700 | PINFIX_PB_M5210, |
10702 | PINFIX_ACER_ASPIRE_7736, | 10701 | PINFIX_ACER_ASPIRE_7736, |
10702 | PINFIX_GIGABYTE_880GM, | ||
10703 | }; | 10703 | }; |
10704 | 10704 | ||
10705 | static const struct alc_fixup alc882_fixups[] = { | 10705 | static const struct alc_fixup alc882_fixups[] = { |
@@ -10731,6 +10731,13 @@ static const struct alc_fixup alc882_fixups[] = { | |||
10731 | .type = ALC_FIXUP_SKU, | 10731 | .type = ALC_FIXUP_SKU, |
10732 | .v.sku = ALC_FIXUP_SKU_IGNORE, | 10732 | .v.sku = ALC_FIXUP_SKU_IGNORE, |
10733 | }, | 10733 | }, |
10734 | [PINFIX_GIGABYTE_880GM] = { | ||
10735 | .type = ALC_FIXUP_PINS, | ||
10736 | .v.pins = (const struct alc_pincfg[]) { | ||
10737 | { 0x14, 0x1114410 }, /* set as speaker */ | ||
10738 | { } | ||
10739 | } | ||
10740 | }, | ||
10734 | }; | 10741 | }; |
10735 | 10742 | ||
10736 | static struct snd_pci_quirk alc882_fixup_tbl[] = { | 10743 | static struct snd_pci_quirk alc882_fixup_tbl[] = { |
@@ -10738,6 +10745,7 @@ static struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
10738 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", PINFIX_LENOVO_Y530), | 10745 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", PINFIX_LENOVO_Y530), |
10739 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", PINFIX_ABIT_AW9D_MAX), | 10746 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", PINFIX_ABIT_AW9D_MAX), |
10740 | SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", PINFIX_ACER_ASPIRE_7736), | 10747 | SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", PINFIX_ACER_ASPIRE_7736), |
10748 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte", PINFIX_GIGABYTE_880GM), | ||
10741 | {} | 10749 | {} |
10742 | }; | 10750 | }; |
10743 | 10751 | ||
@@ -18774,8 +18782,6 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = { | |||
18774 | ALC662_3ST_6ch_DIG), | 18782 | ALC662_3ST_6ch_DIG), |
18775 | SND_PCI_QUIRK(0x1179, 0xff6e, "Toshiba NB20x", ALC662_AUTO), | 18783 | SND_PCI_QUIRK(0x1179, 0xff6e, "Toshiba NB20x", ALC662_AUTO), |
18776 | SND_PCI_QUIRK(0x144d, 0xca00, "Samsung NC10", ALC272_SAMSUNG_NC10), | 18784 | SND_PCI_QUIRK(0x144d, 0xca00, "Samsung NC10", ALC272_SAMSUNG_NC10), |
18777 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte 945GCM-S2L", | ||
18778 | ALC662_3ST_6ch_DIG), | ||
18779 | SND_PCI_QUIRK(0x152d, 0x2304, "Quanta WH1", ALC663_ASUS_H13), | 18785 | SND_PCI_QUIRK(0x152d, 0x2304, "Quanta WH1", ALC663_ASUS_H13), |
18780 | SND_PCI_QUIRK(0x1565, 0x820f, "Biostar TA780G M2+", ALC662_3ST_6ch_DIG), | 18786 | SND_PCI_QUIRK(0x1565, 0x820f, "Biostar TA780G M2+", ALC662_3ST_6ch_DIG), |
18781 | SND_PCI_QUIRK(0x1631, 0xc10c, "PB RS65", ALC663_ASUS_M51VA), | 18787 | SND_PCI_QUIRK(0x1631, 0xc10c, "PB RS65", ALC663_ASUS_M51VA), |
@@ -19449,6 +19455,7 @@ enum { | |||
19449 | ALC662_FIXUP_IDEAPAD, | 19455 | ALC662_FIXUP_IDEAPAD, |
19450 | ALC272_FIXUP_MARIO, | 19456 | ALC272_FIXUP_MARIO, |
19451 | ALC662_FIXUP_CZC_P10T, | 19457 | ALC662_FIXUP_CZC_P10T, |
19458 | ALC662_FIXUP_GIGABYTE, | ||
19452 | }; | 19459 | }; |
19453 | 19460 | ||
19454 | static const struct alc_fixup alc662_fixups[] = { | 19461 | static const struct alc_fixup alc662_fixups[] = { |
@@ -19477,12 +19484,20 @@ static const struct alc_fixup alc662_fixups[] = { | |||
19477 | {} | 19484 | {} |
19478 | } | 19485 | } |
19479 | }, | 19486 | }, |
19487 | [ALC662_FIXUP_GIGABYTE] = { | ||
19488 | .type = ALC_FIXUP_PINS, | ||
19489 | .v.pins = (const struct alc_pincfg[]) { | ||
19490 | { 0x14, 0x1114410 }, /* set as speaker */ | ||
19491 | { } | ||
19492 | } | ||
19493 | }, | ||
19480 | }; | 19494 | }; |
19481 | 19495 | ||
19482 | static struct snd_pci_quirk alc662_fixup_tbl[] = { | 19496 | static struct snd_pci_quirk alc662_fixup_tbl[] = { |
19483 | SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE), | 19497 | SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE), |
19484 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), | 19498 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), |
19485 | SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), | 19499 | SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), |
19500 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte", ALC662_FIXUP_GIGABYTE), | ||
19486 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), | 19501 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), |
19487 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), | 19502 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), |
19488 | SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T), | 19503 | SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T), |
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index 00b6d87e7bdb..eb1a0b4e09b6 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -324,6 +324,10 @@ static void dac33_init_chip(struct snd_soc_codec *codec) | |||
324 | dac33_write(codec, DAC33_OUT_AMP_CTRL, | 324 | dac33_write(codec, DAC33_OUT_AMP_CTRL, |
325 | dac33_read_reg_cache(codec, DAC33_OUT_AMP_CTRL)); | 325 | dac33_read_reg_cache(codec, DAC33_OUT_AMP_CTRL)); |
326 | 326 | ||
327 | dac33_write(codec, DAC33_LDAC_PWR_CTRL, | ||
328 | dac33_read_reg_cache(codec, DAC33_LDAC_PWR_CTRL)); | ||
329 | dac33_write(codec, DAC33_RDAC_PWR_CTRL, | ||
330 | dac33_read_reg_cache(codec, DAC33_RDAC_PWR_CTRL)); | ||
327 | } | 331 | } |
328 | 332 | ||
329 | static inline int dac33_read_id(struct snd_soc_codec *codec) | 333 | static inline int dac33_read_id(struct snd_soc_codec *codec) |
@@ -670,6 +674,7 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33) | |||
670 | { | 674 | { |
671 | struct snd_soc_codec *codec = dac33->codec; | 675 | struct snd_soc_codec *codec = dac33->codec; |
672 | unsigned int delay; | 676 | unsigned int delay; |
677 | unsigned long flags; | ||
673 | 678 | ||
674 | switch (dac33->fifo_mode) { | 679 | switch (dac33->fifo_mode) { |
675 | case DAC33_FIFO_MODE1: | 680 | case DAC33_FIFO_MODE1: |
@@ -677,10 +682,10 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33) | |||
677 | DAC33_THRREG(dac33->nsample)); | 682 | DAC33_THRREG(dac33->nsample)); |
678 | 683 | ||
679 | /* Take the timestamps */ | 684 | /* Take the timestamps */ |
680 | spin_lock_irq(&dac33->lock); | 685 | spin_lock_irqsave(&dac33->lock, flags); |
681 | dac33->t_stamp2 = ktime_to_us(ktime_get()); | 686 | dac33->t_stamp2 = ktime_to_us(ktime_get()); |
682 | dac33->t_stamp1 = dac33->t_stamp2; | 687 | dac33->t_stamp1 = dac33->t_stamp2; |
683 | spin_unlock_irq(&dac33->lock); | 688 | spin_unlock_irqrestore(&dac33->lock, flags); |
684 | 689 | ||
685 | dac33_write16(codec, DAC33_PREFILL_MSB, | 690 | dac33_write16(codec, DAC33_PREFILL_MSB, |
686 | DAC33_THRREG(dac33->alarm_threshold)); | 691 | DAC33_THRREG(dac33->alarm_threshold)); |
@@ -692,11 +697,11 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33) | |||
692 | break; | 697 | break; |
693 | case DAC33_FIFO_MODE7: | 698 | case DAC33_FIFO_MODE7: |
694 | /* Take the timestamp */ | 699 | /* Take the timestamp */ |
695 | spin_lock_irq(&dac33->lock); | 700 | spin_lock_irqsave(&dac33->lock, flags); |
696 | dac33->t_stamp1 = ktime_to_us(ktime_get()); | 701 | dac33->t_stamp1 = ktime_to_us(ktime_get()); |
697 | /* Move back the timestamp with drain time */ | 702 | /* Move back the timestamp with drain time */ |
698 | dac33->t_stamp1 -= dac33->mode7_us_to_lthr; | 703 | dac33->t_stamp1 -= dac33->mode7_us_to_lthr; |
699 | spin_unlock_irq(&dac33->lock); | 704 | spin_unlock_irqrestore(&dac33->lock, flags); |
700 | 705 | ||
701 | dac33_write16(codec, DAC33_PREFILL_MSB, | 706 | dac33_write16(codec, DAC33_PREFILL_MSB, |
702 | DAC33_THRREG(DAC33_MODE7_MARGIN)); | 707 | DAC33_THRREG(DAC33_MODE7_MARGIN)); |
@@ -714,13 +719,14 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33) | |||
714 | static inline void dac33_playback_handler(struct tlv320dac33_priv *dac33) | 719 | static inline void dac33_playback_handler(struct tlv320dac33_priv *dac33) |
715 | { | 720 | { |
716 | struct snd_soc_codec *codec = dac33->codec; | 721 | struct snd_soc_codec *codec = dac33->codec; |
722 | unsigned long flags; | ||
717 | 723 | ||
718 | switch (dac33->fifo_mode) { | 724 | switch (dac33->fifo_mode) { |
719 | case DAC33_FIFO_MODE1: | 725 | case DAC33_FIFO_MODE1: |
720 | /* Take the timestamp */ | 726 | /* Take the timestamp */ |
721 | spin_lock_irq(&dac33->lock); | 727 | spin_lock_irqsave(&dac33->lock, flags); |
722 | dac33->t_stamp2 = ktime_to_us(ktime_get()); | 728 | dac33->t_stamp2 = ktime_to_us(ktime_get()); |
723 | spin_unlock_irq(&dac33->lock); | 729 | spin_unlock_irqrestore(&dac33->lock, flags); |
724 | 730 | ||
725 | dac33_write16(codec, DAC33_NSAMPLE_MSB, | 731 | dac33_write16(codec, DAC33_NSAMPLE_MSB, |
726 | DAC33_THRREG(dac33->nsample)); | 732 | DAC33_THRREG(dac33->nsample)); |
@@ -773,10 +779,11 @@ static irqreturn_t dac33_interrupt_handler(int irq, void *dev) | |||
773 | { | 779 | { |
774 | struct snd_soc_codec *codec = dev; | 780 | struct snd_soc_codec *codec = dev; |
775 | struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); | 781 | struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); |
782 | unsigned long flags; | ||
776 | 783 | ||
777 | spin_lock(&dac33->lock); | 784 | spin_lock_irqsave(&dac33->lock, flags); |
778 | dac33->t_stamp1 = ktime_to_us(ktime_get()); | 785 | dac33->t_stamp1 = ktime_to_us(ktime_get()); |
779 | spin_unlock(&dac33->lock); | 786 | spin_unlock_irqrestore(&dac33->lock, flags); |
780 | 787 | ||
781 | /* Do not schedule the workqueue in Mode7 */ | 788 | /* Do not schedule the workqueue in Mode7 */ |
782 | if (dac33->fifo_mode != DAC33_FIFO_MODE7) | 789 | if (dac33->fifo_mode != DAC33_FIFO_MODE7) |
@@ -1173,15 +1180,16 @@ static snd_pcm_sframes_t dac33_dai_delay( | |||
1173 | unsigned int time_delta, uthr; | 1180 | unsigned int time_delta, uthr; |
1174 | int samples_out, samples_in, samples; | 1181 | int samples_out, samples_in, samples; |
1175 | snd_pcm_sframes_t delay = 0; | 1182 | snd_pcm_sframes_t delay = 0; |
1183 | unsigned long flags; | ||
1176 | 1184 | ||
1177 | switch (dac33->fifo_mode) { | 1185 | switch (dac33->fifo_mode) { |
1178 | case DAC33_FIFO_BYPASS: | 1186 | case DAC33_FIFO_BYPASS: |
1179 | break; | 1187 | break; |
1180 | case DAC33_FIFO_MODE1: | 1188 | case DAC33_FIFO_MODE1: |
1181 | spin_lock(&dac33->lock); | 1189 | spin_lock_irqsave(&dac33->lock, flags); |
1182 | t0 = dac33->t_stamp1; | 1190 | t0 = dac33->t_stamp1; |
1183 | t1 = dac33->t_stamp2; | 1191 | t1 = dac33->t_stamp2; |
1184 | spin_unlock(&dac33->lock); | 1192 | spin_unlock_irqrestore(&dac33->lock, flags); |
1185 | t_now = ktime_to_us(ktime_get()); | 1193 | t_now = ktime_to_us(ktime_get()); |
1186 | 1194 | ||
1187 | /* We have not started to fill the FIFO yet, delay is 0 */ | 1195 | /* We have not started to fill the FIFO yet, delay is 0 */ |
@@ -1246,10 +1254,10 @@ static snd_pcm_sframes_t dac33_dai_delay( | |||
1246 | } | 1254 | } |
1247 | break; | 1255 | break; |
1248 | case DAC33_FIFO_MODE7: | 1256 | case DAC33_FIFO_MODE7: |
1249 | spin_lock(&dac33->lock); | 1257 | spin_lock_irqsave(&dac33->lock, flags); |
1250 | t0 = dac33->t_stamp1; | 1258 | t0 = dac33->t_stamp1; |
1251 | uthr = dac33->uthr; | 1259 | uthr = dac33->uthr; |
1252 | spin_unlock(&dac33->lock); | 1260 | spin_unlock_irqrestore(&dac33->lock, flags); |
1253 | t_now = ktime_to_us(ktime_get()); | 1261 | t_now = ktime_to_us(ktime_get()); |
1254 | 1262 | ||
1255 | /* We have not started to fill the FIFO yet, delay is 0 */ | 1263 | /* We have not started to fill the FIFO yet, delay is 0 */ |
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 482fcdb59bfa..255901c4460d 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c | |||
@@ -1629,8 +1629,10 @@ static int twl6040_probe(struct snd_soc_codec *codec) | |||
1629 | priv->naudint = naudint; | 1629 | priv->naudint = naudint; |
1630 | priv->workqueue = create_singlethread_workqueue("twl6040-codec"); | 1630 | priv->workqueue = create_singlethread_workqueue("twl6040-codec"); |
1631 | 1631 | ||
1632 | if (!priv->workqueue) | 1632 | if (!priv->workqueue) { |
1633 | ret = -ENOMEM; | ||
1633 | goto work_err; | 1634 | goto work_err; |
1635 | } | ||
1634 | 1636 | ||
1635 | INIT_DELAYED_WORK(&priv->delayed_work, twl6040_accessory_work); | 1637 | INIT_DELAYED_WORK(&priv->delayed_work, twl6040_accessory_work); |
1636 | 1638 | ||
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c index 671ef8dd524c..aab7765f401a 100644 --- a/sound/soc/imx/imx-pcm-dma-mx2.c +++ b/sound/soc/imx/imx-pcm-dma-mx2.c | |||
@@ -110,12 +110,12 @@ static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream, | |||
110 | slave_config.direction = DMA_TO_DEVICE; | 110 | slave_config.direction = DMA_TO_DEVICE; |
111 | slave_config.dst_addr = dma_params->dma_addr; | 111 | slave_config.dst_addr = dma_params->dma_addr; |
112 | slave_config.dst_addr_width = buswidth; | 112 | slave_config.dst_addr_width = buswidth; |
113 | slave_config.dst_maxburst = dma_params->burstsize; | 113 | slave_config.dst_maxburst = dma_params->burstsize * buswidth; |
114 | } else { | 114 | } else { |
115 | slave_config.direction = DMA_FROM_DEVICE; | 115 | slave_config.direction = DMA_FROM_DEVICE; |
116 | slave_config.src_addr = dma_params->dma_addr; | 116 | slave_config.src_addr = dma_params->dma_addr; |
117 | slave_config.src_addr_width = buswidth; | 117 | slave_config.src_addr_width = buswidth; |
118 | slave_config.src_maxburst = dma_params->burstsize; | 118 | slave_config.src_maxburst = dma_params->burstsize * buswidth; |
119 | } | 119 | } |
120 | 120 | ||
121 | ret = dmaengine_slave_config(iprtd->dma_chan, &slave_config); | 121 | ret = dmaengine_slave_config(iprtd->dma_chan, &slave_config); |
@@ -303,6 +303,11 @@ static struct snd_soc_platform_driver imx_soc_platform_mx2 = { | |||
303 | 303 | ||
304 | static int __devinit imx_soc_platform_probe(struct platform_device *pdev) | 304 | static int __devinit imx_soc_platform_probe(struct platform_device *pdev) |
305 | { | 305 | { |
306 | struct imx_ssi *ssi = platform_get_drvdata(pdev); | ||
307 | |||
308 | ssi->dma_params_tx.burstsize = 6; | ||
309 | ssi->dma_params_rx.burstsize = 4; | ||
310 | |||
306 | return snd_soc_register_platform(&pdev->dev, &imx_soc_platform_mx2); | 311 | return snd_soc_register_platform(&pdev->dev, &imx_soc_platform_mx2); |
307 | } | 312 | } |
308 | 313 | ||
diff --git a/sound/soc/imx/imx-ssi.h b/sound/soc/imx/imx-ssi.h index a4406a134892..dc8a87530e3e 100644 --- a/sound/soc/imx/imx-ssi.h +++ b/sound/soc/imx/imx-ssi.h | |||
@@ -234,7 +234,4 @@ void imx_pcm_free(struct snd_pcm *pcm); | |||
234 | */ | 234 | */ |
235 | #define IMX_SSI_DMABUF_SIZE (64 * 1024) | 235 | #define IMX_SSI_DMABUF_SIZE (64 * 1024) |
236 | 236 | ||
237 | #define DMA_RXFIFO_BURST 0x4 | ||
238 | #define DMA_TXFIFO_BURST 0x6 | ||
239 | |||
240 | #endif /* _IMX_SSI_H */ | 237 | #endif /* _IMX_SSI_H */ |
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index 784cff5f67e8..9027da466cae 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c | |||
@@ -310,7 +310,7 @@ static struct snd_soc_dai_link corgi_dai = { | |||
310 | .cpu_dai_name = "pxa2xx-i2s", | 310 | .cpu_dai_name = "pxa2xx-i2s", |
311 | .codec_dai_name = "wm8731-hifi", | 311 | .codec_dai_name = "wm8731-hifi", |
312 | .platform_name = "pxa-pcm-audio", | 312 | .platform_name = "pxa-pcm-audio", |
313 | .codec_name = "wm8731-codec-0.001b", | 313 | .codec_name = "wm8731-codec.0-001b", |
314 | .init = corgi_wm8731_init, | 314 | .init = corgi_wm8731_init, |
315 | .ops = &corgi_ops, | 315 | .ops = &corgi_ops, |
316 | }; | 316 | }; |