diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-04-26 09:05:39 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-04-26 09:05:39 -0400 |
commit | 31d44b57c508971c083ce038d7c5ededd09cea01 (patch) | |
tree | 249689625896d65894f56763c22f726e39fde5ec /sound | |
parent | 885f42e1f466c36e3663d912a831e940f01a112b (diff) | |
parent | 1c7276cfc04b1a5b296b691c2e07297a4f6c19aa (diff) |
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound')
-rw-r--r-- | sound/arm/pxa2xx-pcm-lib.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 25 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 3 | ||||
-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 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-pcm.c | 1 | ||||
-rw-r--r-- | sound/soc/pxa/zylonite.c | 6 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 8 |
12 files changed, 73 insertions, 27 deletions
diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c index 8808b82311b1..76e0d5695075 100644 --- a/sound/arm/pxa2xx-pcm-lib.c +++ b/sound/arm/pxa2xx-pcm-lib.c | |||
@@ -140,6 +140,9 @@ int __pxa2xx_pcm_prepare(struct snd_pcm_substream *substream) | |||
140 | if (!prtd || !prtd->params) | 140 | if (!prtd || !prtd->params) |
141 | return 0; | 141 | return 0; |
142 | 142 | ||
143 | if (prtd->dma_ch == -1) | ||
144 | return -EINVAL; | ||
145 | |||
143 | DCSR(prtd->dma_ch) &= ~DCSR_RUN; | 146 | DCSR(prtd->dma_ch) &= ~DCSR_RUN; |
144 | DCSR(prtd->dma_ch) = 0; | 147 | DCSR(prtd->dma_ch) = 0; |
145 | DCMD(prtd->dma_ch) = 0; | 148 | DCMD(prtd->dma_ch) = 0; |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 2b6019390489..fb07def1586f 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1000,6 +1000,7 @@ void snd_hda_shutup_pins(struct hda_codec *codec) | |||
1000 | } | 1000 | } |
1001 | EXPORT_SYMBOL_HDA(snd_hda_shutup_pins); | 1001 | EXPORT_SYMBOL_HDA(snd_hda_shutup_pins); |
1002 | 1002 | ||
1003 | #ifdef SND_HDA_NEEDS_RESUME | ||
1003 | /* Restore the pin controls cleared previously via snd_hda_shutup_pins() */ | 1004 | /* Restore the pin controls cleared previously via snd_hda_shutup_pins() */ |
1004 | static void restore_shutup_pins(struct hda_codec *codec) | 1005 | static void restore_shutup_pins(struct hda_codec *codec) |
1005 | { | 1006 | { |
@@ -1016,6 +1017,7 @@ static void restore_shutup_pins(struct hda_codec *codec) | |||
1016 | } | 1017 | } |
1017 | codec->pins_shutup = 0; | 1018 | codec->pins_shutup = 0; |
1018 | } | 1019 | } |
1020 | #endif | ||
1019 | 1021 | ||
1020 | static void init_hda_cache(struct hda_cache_rec *cache, | 1022 | static void init_hda_cache(struct hda_cache_rec *cache, |
1021 | unsigned int record_size); | 1023 | unsigned int record_size); |
@@ -1394,6 +1396,7 @@ static void purify_inactive_streams(struct hda_codec *codec) | |||
1394 | } | 1396 | } |
1395 | } | 1397 | } |
1396 | 1398 | ||
1399 | #ifdef SND_HDA_NEEDS_RESUME | ||
1397 | /* clean up all streams; called from suspend */ | 1400 | /* clean up all streams; called from suspend */ |
1398 | static void hda_cleanup_all_streams(struct hda_codec *codec) | 1401 | static void hda_cleanup_all_streams(struct hda_codec *codec) |
1399 | { | 1402 | { |
@@ -1405,6 +1408,7 @@ static void hda_cleanup_all_streams(struct hda_codec *codec) | |||
1405 | really_cleanup_stream(codec, p); | 1408 | really_cleanup_stream(codec, p); |
1406 | } | 1409 | } |
1407 | } | 1410 | } |
1411 | #endif | ||
1408 | 1412 | ||
1409 | /* | 1413 | /* |
1410 | * amp access functions | 1414 | * amp access functions |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 81f0c5c401b5..e631874a3e32 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -14869,6 +14869,23 @@ static void alc269_fixup_hweq(struct hda_codec *codec, | |||
14869 | alc_write_coef_idx(codec, 0x1e, coef | 0x80); | 14869 | alc_write_coef_idx(codec, 0x1e, coef | 0x80); |
14870 | } | 14870 | } |
14871 | 14871 | ||
14872 | static void alc271_fixup_dmic(struct hda_codec *codec, | ||
14873 | const struct alc_fixup *fix, int action) | ||
14874 | { | ||
14875 | static struct hda_verb verbs[] = { | ||
14876 | {0x20, AC_VERB_SET_COEF_INDEX, 0x0d}, | ||
14877 | {0x20, AC_VERB_SET_PROC_COEF, 0x4000}, | ||
14878 | {} | ||
14879 | }; | ||
14880 | unsigned int cfg; | ||
14881 | |||
14882 | if (strcmp(codec->chip_name, "ALC271X")) | ||
14883 | return; | ||
14884 | cfg = snd_hda_codec_get_pincfg(codec, 0x12); | ||
14885 | if (get_defcfg_connect(cfg) == AC_JACK_PORT_FIXED) | ||
14886 | snd_hda_sequence_write(codec, verbs); | ||
14887 | } | ||
14888 | |||
14872 | enum { | 14889 | enum { |
14873 | ALC269_FIXUP_SONY_VAIO, | 14890 | ALC269_FIXUP_SONY_VAIO, |
14874 | ALC275_FIXUP_SONY_VAIO_GPIO2, | 14891 | ALC275_FIXUP_SONY_VAIO_GPIO2, |
@@ -14877,6 +14894,7 @@ enum { | |||
14877 | ALC269_FIXUP_ASUS_G73JW, | 14894 | ALC269_FIXUP_ASUS_G73JW, |
14878 | ALC269_FIXUP_LENOVO_EAPD, | 14895 | ALC269_FIXUP_LENOVO_EAPD, |
14879 | ALC275_FIXUP_SONY_HWEQ, | 14896 | ALC275_FIXUP_SONY_HWEQ, |
14897 | ALC271_FIXUP_DMIC, | ||
14880 | }; | 14898 | }; |
14881 | 14899 | ||
14882 | static const struct alc_fixup alc269_fixups[] = { | 14900 | static const struct alc_fixup alc269_fixups[] = { |
@@ -14930,7 +14948,11 @@ static const struct alc_fixup alc269_fixups[] = { | |||
14930 | .v.func = alc269_fixup_hweq, | 14948 | .v.func = alc269_fixup_hweq, |
14931 | .chained = true, | 14949 | .chained = true, |
14932 | .chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2 | 14950 | .chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2 |
14933 | } | 14951 | }, |
14952 | [ALC271_FIXUP_DMIC] = { | ||
14953 | .type = ALC_FIXUP_FUNC, | ||
14954 | .v.func = alc271_fixup_dmic, | ||
14955 | }, | ||
14934 | }; | 14956 | }; |
14935 | 14957 | ||
14936 | static struct snd_pci_quirk alc269_fixup_tbl[] = { | 14958 | static struct snd_pci_quirk alc269_fixup_tbl[] = { |
@@ -14939,6 +14961,7 @@ static struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
14939 | SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), | 14961 | SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), |
14940 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), | 14962 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), |
14941 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), | 14963 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), |
14964 | SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), | ||
14942 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), | 14965 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), |
14943 | SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), | 14966 | SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), |
14944 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), | 14967 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index c391bfb95e09..75b7155b1645 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -3408,6 +3408,9 @@ static int get_connection_index(struct hda_codec *codec, hda_nid_t mux, | |||
3408 | hda_nid_t conn[HDA_MAX_NUM_INPUTS]; | 3408 | hda_nid_t conn[HDA_MAX_NUM_INPUTS]; |
3409 | int i, nums; | 3409 | int i, nums; |
3410 | 3410 | ||
3411 | if (!(get_wcaps(codec, mux) & AC_WCAP_CONN_LIST)) | ||
3412 | return -1; | ||
3413 | |||
3411 | nums = snd_hda_get_connections(codec, mux, conn, ARRAY_SIZE(conn)); | 3414 | nums = snd_hda_get_connections(codec, mux, conn, ARRAY_SIZE(conn)); |
3412 | for (i = 0; i < nums; i++) | 3415 | for (i = 0; i < nums; i++) |
3413 | if (conn[i] == nid) | 3416 | if (conn[i] == nid) |
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 | }; |
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c index 02fb66416ddc..2ce0b2d891d5 100644 --- a/sound/soc/pxa/pxa2xx-pcm.c +++ b/sound/soc/pxa/pxa2xx-pcm.c | |||
@@ -65,6 +65,7 @@ static int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream) | |||
65 | if (prtd->dma_ch >= 0) { | 65 | if (prtd->dma_ch >= 0) { |
66 | pxa_free_dma(prtd->dma_ch); | 66 | pxa_free_dma(prtd->dma_ch); |
67 | prtd->dma_ch = -1; | 67 | prtd->dma_ch = -1; |
68 | prtd->params = NULL; | ||
68 | } | 69 | } |
69 | 70 | ||
70 | return 0; | 71 | return 0; |
diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c index ac577263b3e3..b6445757fc54 100644 --- a/sound/soc/pxa/zylonite.c +++ b/sound/soc/pxa/zylonite.c | |||
@@ -167,7 +167,7 @@ static struct snd_soc_dai_link zylonite_dai[] = { | |||
167 | .codec_name = "wm9713-codec", | 167 | .codec_name = "wm9713-codec", |
168 | .platform_name = "pxa-pcm-audio", | 168 | .platform_name = "pxa-pcm-audio", |
169 | .cpu_dai_name = "pxa2xx-ac97", | 169 | .cpu_dai_name = "pxa2xx-ac97", |
170 | .codec_name = "wm9713-hifi", | 170 | .codec_dai_name = "wm9713-hifi", |
171 | .init = zylonite_wm9713_init, | 171 | .init = zylonite_wm9713_init, |
172 | }, | 172 | }, |
173 | { | 173 | { |
@@ -176,7 +176,7 @@ static struct snd_soc_dai_link zylonite_dai[] = { | |||
176 | .codec_name = "wm9713-codec", | 176 | .codec_name = "wm9713-codec", |
177 | .platform_name = "pxa-pcm-audio", | 177 | .platform_name = "pxa-pcm-audio", |
178 | .cpu_dai_name = "pxa2xx-ac97-aux", | 178 | .cpu_dai_name = "pxa2xx-ac97-aux", |
179 | .codec_name = "wm9713-aux", | 179 | .codec_dai_name = "wm9713-aux", |
180 | }, | 180 | }, |
181 | { | 181 | { |
182 | .name = "WM9713 Voice", | 182 | .name = "WM9713 Voice", |
@@ -184,7 +184,7 @@ static struct snd_soc_dai_link zylonite_dai[] = { | |||
184 | .codec_name = "wm9713-codec", | 184 | .codec_name = "wm9713-codec", |
185 | .platform_name = "pxa-pcm-audio", | 185 | .platform_name = "pxa-pcm-audio", |
186 | .cpu_dai_name = "pxa-ssp-dai.2", | 186 | .cpu_dai_name = "pxa-ssp-dai.2", |
187 | .codec_name = "wm9713-voice", | 187 | .codec_dai_name = "wm9713-voice", |
188 | .ops = &zylonite_voice_ops, | 188 | .ops = &zylonite_voice_ops, |
189 | }, | 189 | }, |
190 | }; | 190 | }; |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 4dda58926bc5..b76b74db0968 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -92,8 +92,8 @@ static int min_bytes_needed(unsigned long val) | |||
92 | static int format_register_str(struct snd_soc_codec *codec, | 92 | static int format_register_str(struct snd_soc_codec *codec, |
93 | unsigned int reg, char *buf, size_t len) | 93 | unsigned int reg, char *buf, size_t len) |
94 | { | 94 | { |
95 | int wordsize = codec->driver->reg_word_size * 2; | 95 | int wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; |
96 | int regsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; | 96 | int regsize = codec->driver->reg_word_size * 2; |
97 | int ret; | 97 | int ret; |
98 | char tmpbuf[len + 1]; | 98 | char tmpbuf[len + 1]; |
99 | char regbuf[regsize + 1]; | 99 | char regbuf[regsize + 1]; |
@@ -132,8 +132,8 @@ static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf, | |||
132 | size_t total = 0; | 132 | size_t total = 0; |
133 | loff_t p = 0; | 133 | loff_t p = 0; |
134 | 134 | ||
135 | wordsize = codec->driver->reg_word_size * 2; | 135 | wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; |
136 | regsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; | 136 | regsize = codec->driver->reg_word_size * 2; |
137 | 137 | ||
138 | len = wordsize + regsize + 2 + 1; | 138 | len = wordsize + regsize + 2 + 1; |
139 | 139 | ||