aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/core/sgbuf.c2
-rw-r--r--sound/pci/emu10k1/memory.c5
-rw-r--r--sound/pci/hda/hda_auto_parser.c5
-rw-r--r--sound/pci/hda/patch_conexant.c6
-rw-r--r--sound/pci/hda/patch_hdmi.c12
-rw-r--r--sound/pci/hda/patch_realtek.c8
-rw-r--r--sound/soc/codecs/ab8500-codec.c4
-rw-r--r--sound/soc/codecs/ad1980.c1
-rw-r--r--sound/soc/codecs/mc13783.c2
-rw-r--r--sound/soc/codecs/sgtl5000.c3
-rw-r--r--sound/soc/codecs/stac9766.c1
-rw-r--r--sound/soc/codecs/wm8962.c3
-rw-r--r--sound/soc/codecs/wm8994.c15
-rw-r--r--sound/soc/codecs/wm9712.c1
-rw-r--r--sound/soc/codecs/wm9713.c1
-rw-r--r--sound/soc/mxs/mxs-saif.c24
-rw-r--r--sound/soc/omap/omap-mcbsp.c1
-rw-r--r--sound/soc/omap/omap-pcm.c1
-rw-r--r--sound/soc/soc-core.c2
-rw-r--r--sound/soc/tegra/tegra_alc5632.c2
-rw-r--r--sound/soc/tegra/tegra_wm8903.c10
-rw-r--r--sound/soc/ux500/ux500_msp_dai.c2
-rw-r--r--sound/soc/ux500/ux500_msp_i2s.c2
-rw-r--r--sound/soc/ux500/ux500_msp_i2s.h2
24 files changed, 86 insertions, 29 deletions
diff --git a/sound/core/sgbuf.c b/sound/core/sgbuf.c
index 4e7ec2b49873..d0f00356fc11 100644
--- a/sound/core/sgbuf.c
+++ b/sound/core/sgbuf.c
@@ -101,7 +101,7 @@ void *snd_malloc_sgbuf_pages(struct device *device,
101 if (snd_dma_alloc_pages_fallback(SNDRV_DMA_TYPE_DEV, device, 101 if (snd_dma_alloc_pages_fallback(SNDRV_DMA_TYPE_DEV, device,
102 chunk, &tmpb) < 0) { 102 chunk, &tmpb) < 0) {
103 if (!sgbuf->pages) 103 if (!sgbuf->pages)
104 return NULL; 104 goto _failed;
105 if (!res_size) 105 if (!res_size)
106 goto _failed; 106 goto _failed;
107 size = sgbuf->pages * PAGE_SIZE; 107 size = sgbuf->pages * PAGE_SIZE;
diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c
index 4f502a2bdc3c..0a436626182b 100644
--- a/sound/pci/emu10k1/memory.c
+++ b/sound/pci/emu10k1/memory.c
@@ -326,7 +326,10 @@ snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *subst
326 for (page = blk->first_page; page <= blk->last_page; page++, idx++) { 326 for (page = blk->first_page; page <= blk->last_page; page++, idx++) {
327 unsigned long ofs = idx << PAGE_SHIFT; 327 unsigned long ofs = idx << PAGE_SHIFT;
328 dma_addr_t addr; 328 dma_addr_t addr;
329 addr = snd_pcm_sgbuf_get_addr(substream, ofs); 329 if (ofs >= runtime->dma_bytes)
330 addr = emu->silent_page.addr;
331 else
332 addr = snd_pcm_sgbuf_get_addr(substream, ofs);
330 if (! is_valid_page(emu, addr)) { 333 if (! is_valid_page(emu, addr)) {
331 printk(KERN_ERR "emu: failure page = %d\n", idx); 334 printk(KERN_ERR "emu: failure page = %d\n", idx);
332 mutex_unlock(&hdr->block_mutex); 335 mutex_unlock(&hdr->block_mutex);
diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c
index 647218d69f68..4f7d2dfcef7b 100644
--- a/sound/pci/hda/hda_auto_parser.c
+++ b/sound/pci/hda/hda_auto_parser.c
@@ -332,13 +332,12 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec,
332 if (cfg->dig_outs) 332 if (cfg->dig_outs)
333 snd_printd(" dig-out=0x%x/0x%x\n", 333 snd_printd(" dig-out=0x%x/0x%x\n",
334 cfg->dig_out_pins[0], cfg->dig_out_pins[1]); 334 cfg->dig_out_pins[0], cfg->dig_out_pins[1]);
335 snd_printd(" inputs:"); 335 snd_printd(" inputs:\n");
336 for (i = 0; i < cfg->num_inputs; i++) { 336 for (i = 0; i < cfg->num_inputs; i++) {
337 snd_printd(" %s=0x%x", 337 snd_printd(" %s=0x%x\n",
338 hda_get_autocfg_input_label(codec, cfg, i), 338 hda_get_autocfg_input_label(codec, cfg, i),
339 cfg->inputs[i].pin); 339 cfg->inputs[i].pin);
340 } 340 }
341 snd_printd("\n");
342 if (cfg->dig_in_pin) 341 if (cfg->dig_in_pin)
343 snd_printd(" dig-in=0x%x\n", cfg->dig_in_pin); 342 snd_printd(" dig-in=0x%x\n", cfg->dig_in_pin);
344 343
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 14361184ae1e..5e22a8f43d2e 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -2967,12 +2967,10 @@ static const char * const cxt5066_models[CXT5066_MODELS] = {
2967}; 2967};
2968 2968
2969static const struct snd_pci_quirk cxt5066_cfg_tbl[] = { 2969static const struct snd_pci_quirk cxt5066_cfg_tbl[] = {
2970 SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT5066_AUTO),
2971 SND_PCI_QUIRK_MASK(0x1025, 0xff00, 0x0400, "Acer", CXT5066_IDEAPAD), 2970 SND_PCI_QUIRK_MASK(0x1025, 0xff00, 0x0400, "Acer", CXT5066_IDEAPAD),
2972 SND_PCI_QUIRK(0x1028, 0x02d8, "Dell Vostro", CXT5066_DELL_VOSTRO), 2971 SND_PCI_QUIRK(0x1028, 0x02d8, "Dell Vostro", CXT5066_DELL_VOSTRO),
2973 SND_PCI_QUIRK(0x1028, 0x02f5, "Dell Vostro 320", CXT5066_IDEAPAD), 2972 SND_PCI_QUIRK(0x1028, 0x02f5, "Dell Vostro 320", CXT5066_IDEAPAD),
2974 SND_PCI_QUIRK(0x1028, 0x0401, "Dell Vostro 1014", CXT5066_DELL_VOSTRO), 2973 SND_PCI_QUIRK(0x1028, 0x0401, "Dell Vostro 1014", CXT5066_DELL_VOSTRO),
2975 SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTRO),
2976 SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), 2974 SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD),
2977 SND_PCI_QUIRK(0x1028, 0x050f, "Dell Inspiron", CXT5066_IDEAPAD), 2975 SND_PCI_QUIRK(0x1028, 0x050f, "Dell Inspiron", CXT5066_IDEAPAD),
2978 SND_PCI_QUIRK(0x1028, 0x0510, "Dell Vostro", CXT5066_IDEAPAD), 2976 SND_PCI_QUIRK(0x1028, 0x0510, "Dell Vostro", CXT5066_IDEAPAD),
@@ -2988,14 +2986,10 @@ static const struct snd_pci_quirk cxt5066_cfg_tbl[] = {
2988 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400s", CXT5066_THINKPAD), 2986 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400s", CXT5066_THINKPAD),
2989 SND_PCI_QUIRK(0x17aa, 0x21c5, "Thinkpad Edge 13", CXT5066_THINKPAD), 2987 SND_PCI_QUIRK(0x17aa, 0x21c5, "Thinkpad Edge 13", CXT5066_THINKPAD),
2990 SND_PCI_QUIRK(0x17aa, 0x21c6, "Thinkpad Edge 13", CXT5066_ASUS), 2988 SND_PCI_QUIRK(0x17aa, 0x21c6, "Thinkpad Edge 13", CXT5066_ASUS),
2991 SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T510", CXT5066_AUTO),
2992 SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520 & W520", CXT5066_AUTO),
2993 SND_PCI_QUIRK(0x17aa, 0x21da, "Lenovo X220", CXT5066_THINKPAD), 2989 SND_PCI_QUIRK(0x17aa, 0x21da, "Lenovo X220", CXT5066_THINKPAD),
2994 SND_PCI_QUIRK(0x17aa, 0x21db, "Lenovo X220-tablet", CXT5066_THINKPAD), 2990 SND_PCI_QUIRK(0x17aa, 0x21db, "Lenovo X220-tablet", CXT5066_THINKPAD),
2995 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo U350", CXT5066_ASUS), 2991 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo U350", CXT5066_ASUS),
2996 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G560", CXT5066_ASUS), 2992 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G560", CXT5066_ASUS),
2997 SND_PCI_QUIRK(0x17aa, 0x3938, "Lenovo G565", CXT5066_AUTO),
2998 SND_PCI_QUIRK(0x1b0a, 0x2092, "CyberpowerPC Gamer Xplorer N57001", CXT5066_AUTO),
2999 {} 2993 {}
3000}; 2994};
3001 2995
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 69b928449789..8f23374fa642 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -877,8 +877,6 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
877 struct hdmi_eld *eld; 877 struct hdmi_eld *eld;
878 struct hdmi_spec_per_cvt *per_cvt = NULL; 878 struct hdmi_spec_per_cvt *per_cvt = NULL;
879 879
880 hinfo->nid = 0; /* clear the leftover value */
881
882 /* Validate hinfo */ 880 /* Validate hinfo */
883 pin_idx = hinfo_to_pin_index(spec, hinfo); 881 pin_idx = hinfo_to_pin_index(spec, hinfo);
884 if (snd_BUG_ON(pin_idx < 0)) 882 if (snd_BUG_ON(pin_idx < 0))
@@ -1163,6 +1161,14 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
1163 return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format); 1161 return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format);
1164} 1162}
1165 1163
1164static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
1165 struct hda_codec *codec,
1166 struct snd_pcm_substream *substream)
1167{
1168 snd_hda_codec_cleanup_stream(codec, hinfo->nid);
1169 return 0;
1170}
1171
1166static int hdmi_pcm_close(struct hda_pcm_stream *hinfo, 1172static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
1167 struct hda_codec *codec, 1173 struct hda_codec *codec,
1168 struct snd_pcm_substream *substream) 1174 struct snd_pcm_substream *substream)
@@ -1202,6 +1208,7 @@ static const struct hda_pcm_ops generic_ops = {
1202 .open = hdmi_pcm_open, 1208 .open = hdmi_pcm_open,
1203 .close = hdmi_pcm_close, 1209 .close = hdmi_pcm_close,
1204 .prepare = generic_hdmi_playback_pcm_prepare, 1210 .prepare = generic_hdmi_playback_pcm_prepare,
1211 .cleanup = generic_hdmi_playback_pcm_cleanup,
1205}; 1212};
1206 1213
1207static int generic_hdmi_build_pcms(struct hda_codec *codec) 1214static int generic_hdmi_build_pcms(struct hda_codec *codec)
@@ -1220,7 +1227,6 @@ static int generic_hdmi_build_pcms(struct hda_codec *codec)
1220 pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK]; 1227 pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK];
1221 pstr->substreams = 1; 1228 pstr->substreams = 1;
1222 pstr->ops = generic_ops; 1229 pstr->ops = generic_ops;
1223 pstr->nid = 1; /* FIXME: just for avoiding a debug WARNING */
1224 /* other pstr fields are set in open */ 1230 /* other pstr fields are set in open */
1225 } 1231 }
1226 1232
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 344b221d2102..4f81dd44c837 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6099,6 +6099,8 @@ static const struct alc_fixup alc269_fixups[] = {
6099 [ALC269_FIXUP_PCM_44K] = { 6099 [ALC269_FIXUP_PCM_44K] = {
6100 .type = ALC_FIXUP_FUNC, 6100 .type = ALC_FIXUP_FUNC,
6101 .v.func = alc269_fixup_pcm_44k, 6101 .v.func = alc269_fixup_pcm_44k,
6102 .chained = true,
6103 .chain_id = ALC269_FIXUP_QUANTA_MUTE
6102 }, 6104 },
6103 [ALC269_FIXUP_STEREO_DMIC] = { 6105 [ALC269_FIXUP_STEREO_DMIC] = {
6104 .type = ALC_FIXUP_FUNC, 6106 .type = ALC_FIXUP_FUNC,
@@ -6206,9 +6208,11 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
6206 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), 6208 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
6207 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE), 6209 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE),
6208 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE), 6210 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE),
6211 SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK),
6212 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK),
6213 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK),
6209 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK), 6214 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
6210 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_QUANTA_MUTE), 6215 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
6211 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Lenovo Ideapd", ALC269_FIXUP_PCM_44K),
6212 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), 6216 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
6213 6217
6214#if 0 6218#if 0
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 3c795921c5f6..23b40186f9b8 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -2406,6 +2406,10 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec)
2406 2406
2407 /* Setup AB8500 according to board-settings */ 2407 /* Setup AB8500 according to board-settings */
2408 pdata = (struct ab8500_platform_data *)dev_get_platdata(dev->parent); 2408 pdata = (struct ab8500_platform_data *)dev_get_platdata(dev->parent);
2409
2410 /* Inform SoC Core that we have our own I/O arrangements. */
2411 codec->control_data = (void *)true;
2412
2409 status = ab8500_audio_setup_mics(codec, &pdata->codec->amics); 2413 status = ab8500_audio_setup_mics(codec, &pdata->codec->amics);
2410 if (status < 0) { 2414 if (status < 0) {
2411 pr_err("%s: Failed to setup mics (%d)!\n", __func__, status); 2415 pr_err("%s: Failed to setup mics (%d)!\n", __func__, status);
diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c
index 8c39dddd7d00..11b1b714b8b5 100644
--- a/sound/soc/codecs/ad1980.c
+++ b/sound/soc/codecs/ad1980.c
@@ -186,6 +186,7 @@ static int ad1980_soc_probe(struct snd_soc_codec *codec)
186 186
187 printk(KERN_INFO "AD1980 SoC Audio Codec\n"); 187 printk(KERN_INFO "AD1980 SoC Audio Codec\n");
188 188
189 codec->control_data = codec; /* we don't use regmap! */
189 ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); 190 ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0);
190 if (ret < 0) { 191 if (ret < 0) {
191 printk(KERN_ERR "ad1980: failed to register AC97 codec\n"); 192 printk(KERN_ERR "ad1980: failed to register AC97 codec\n");
diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 6276e352125f..8f726c063f42 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -581,6 +581,8 @@ static int mc13783_probe(struct snd_soc_codec *codec)
581{ 581{
582 struct mc13783_priv *priv = snd_soc_codec_get_drvdata(codec); 582 struct mc13783_priv *priv = snd_soc_codec_get_drvdata(codec);
583 583
584 codec->control_data = priv->mc13xxx;
585
584 mc13xxx_lock(priv->mc13xxx); 586 mc13xxx_lock(priv->mc13xxx);
585 587
586 /* these are the reset values */ 588 /* these are the reset values */
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 8af6a5245b18..df2f99d1d428 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -239,6 +239,7 @@ static const struct snd_soc_dapm_route sgtl5000_dapm_routes[] = {
239 {"Headphone Mux", "DAC", "DAC"}, /* dac --> hp_mux */ 239 {"Headphone Mux", "DAC", "DAC"}, /* dac --> hp_mux */
240 {"LO", NULL, "DAC"}, /* dac --> line_out */ 240 {"LO", NULL, "DAC"}, /* dac --> line_out */
241 241
242 {"LINE_IN", NULL, "VAG_POWER"},
242 {"Headphone Mux", "LINE_IN", "LINE_IN"},/* line_in --> hp_mux */ 243 {"Headphone Mux", "LINE_IN", "LINE_IN"},/* line_in --> hp_mux */
243 {"HP", NULL, "Headphone Mux"}, /* hp_mux --> hp */ 244 {"HP", NULL, "Headphone Mux"}, /* hp_mux --> hp */
244 245
@@ -1357,8 +1358,6 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)
1357 if (ret) 1358 if (ret)
1358 goto err; 1359 goto err;
1359 1360
1360 snd_soc_dapm_new_widgets(&codec->dapm);
1361
1362 return 0; 1361 return 0;
1363 1362
1364err: 1363err:
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c
index 982e437799a8..33c0f3d39c87 100644
--- a/sound/soc/codecs/stac9766.c
+++ b/sound/soc/codecs/stac9766.c
@@ -340,6 +340,7 @@ static int stac9766_codec_probe(struct snd_soc_codec *codec)
340 340
341 printk(KERN_INFO "STAC9766 SoC Audio Codec %s\n", STAC9766_VERSION); 341 printk(KERN_INFO "STAC9766 SoC Audio Codec %s\n", STAC9766_VERSION);
342 342
343 codec->control_data = codec; /* we don't use regmap! */
343 ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); 344 ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0);
344 if (ret < 0) 345 if (ret < 0)
345 goto codec_err; 346 goto codec_err;
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index eaf65863ec21..aa9ce9dd7d8a 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -2501,6 +2501,9 @@ static int wm8962_set_bias_level(struct snd_soc_codec *codec,
2501 /* VMID 2*250k */ 2501 /* VMID 2*250k */
2502 snd_soc_update_bits(codec, WM8962_PWR_MGMT_1, 2502 snd_soc_update_bits(codec, WM8962_PWR_MGMT_1,
2503 WM8962_VMID_SEL_MASK, 0x100); 2503 WM8962_VMID_SEL_MASK, 0x100);
2504
2505 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF)
2506 msleep(100);
2504 break; 2507 break;
2505 2508
2506 case SND_SOC_BIAS_OFF: 2509 case SND_SOC_BIAS_OFF:
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index bb62f4b3d563..04ef03175c51 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2649,7 +2649,7 @@ static int wm8994_hw_params(struct snd_pcm_substream *substream,
2649 return -EINVAL; 2649 return -EINVAL;
2650 } 2650 }
2651 2651
2652 bclk_rate = params_rate(params) * 2; 2652 bclk_rate = params_rate(params) * 4;
2653 switch (params_format(params)) { 2653 switch (params_format(params)) {
2654 case SNDRV_PCM_FORMAT_S16_LE: 2654 case SNDRV_PCM_FORMAT_S16_LE:
2655 bclk_rate *= 16; 2655 bclk_rate *= 16;
@@ -3253,10 +3253,13 @@ static void wm8994_mic_work(struct work_struct *work)
3253 int ret; 3253 int ret;
3254 int report; 3254 int report;
3255 3255
3256 pm_runtime_get_sync(dev);
3257
3256 ret = regmap_read(regmap, WM8994_INTERRUPT_RAW_STATUS_2, &reg); 3258 ret = regmap_read(regmap, WM8994_INTERRUPT_RAW_STATUS_2, &reg);
3257 if (ret < 0) { 3259 if (ret < 0) {
3258 dev_err(dev, "Failed to read microphone status: %d\n", 3260 dev_err(dev, "Failed to read microphone status: %d\n",
3259 ret); 3261 ret);
3262 pm_runtime_put(dev);
3260 return; 3263 return;
3261 } 3264 }
3262 3265
@@ -3299,6 +3302,8 @@ static void wm8994_mic_work(struct work_struct *work)
3299 3302
3300 snd_soc_jack_report(priv->micdet[1].jack, report, 3303 snd_soc_jack_report(priv->micdet[1].jack, report,
3301 SND_JACK_HEADSET | SND_JACK_BTN_0); 3304 SND_JACK_HEADSET | SND_JACK_BTN_0);
3305
3306 pm_runtime_put(dev);
3302} 3307}
3303 3308
3304static irqreturn_t wm8994_mic_irq(int irq, void *data) 3309static irqreturn_t wm8994_mic_irq(int irq, void *data)
@@ -3421,12 +3426,15 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
3421 int reg; 3426 int reg;
3422 bool present; 3427 bool present;
3423 3428
3429 pm_runtime_get_sync(codec->dev);
3430
3424 mutex_lock(&wm8994->accdet_lock); 3431 mutex_lock(&wm8994->accdet_lock);
3425 3432
3426 reg = snd_soc_read(codec, WM1811_JACKDET_CTRL); 3433 reg = snd_soc_read(codec, WM1811_JACKDET_CTRL);
3427 if (reg < 0) { 3434 if (reg < 0) {
3428 dev_err(codec->dev, "Failed to read jack status: %d\n", reg); 3435 dev_err(codec->dev, "Failed to read jack status: %d\n", reg);
3429 mutex_unlock(&wm8994->accdet_lock); 3436 mutex_unlock(&wm8994->accdet_lock);
3437 pm_runtime_put(codec->dev);
3430 return IRQ_NONE; 3438 return IRQ_NONE;
3431 } 3439 }
3432 3440
@@ -3491,6 +3499,7 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
3491 SND_JACK_MECHANICAL | SND_JACK_HEADSET | 3499 SND_JACK_MECHANICAL | SND_JACK_HEADSET |
3492 wm8994->btn_mask); 3500 wm8994->btn_mask);
3493 3501
3502 pm_runtime_put(codec->dev);
3494 return IRQ_HANDLED; 3503 return IRQ_HANDLED;
3495} 3504}
3496 3505
@@ -3602,6 +3611,8 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
3602 if (!(snd_soc_read(codec, WM8958_MIC_DETECT_1) & WM8958_MICD_ENA)) 3611 if (!(snd_soc_read(codec, WM8958_MIC_DETECT_1) & WM8958_MICD_ENA))
3603 return IRQ_HANDLED; 3612 return IRQ_HANDLED;
3604 3613
3614 pm_runtime_get_sync(codec->dev);
3615
3605 /* We may occasionally read a detection without an impedence 3616 /* We may occasionally read a detection without an impedence
3606 * range being provided - if that happens loop again. 3617 * range being provided - if that happens loop again.
3607 */ 3618 */
@@ -3612,6 +3623,7 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
3612 dev_err(codec->dev, 3623 dev_err(codec->dev,
3613 "Failed to read mic detect status: %d\n", 3624 "Failed to read mic detect status: %d\n",
3614 reg); 3625 reg);
3626 pm_runtime_put(codec->dev);
3615 return IRQ_NONE; 3627 return IRQ_NONE;
3616 } 3628 }
3617 3629
@@ -3639,6 +3651,7 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
3639 dev_warn(codec->dev, "Accessory detection with no callback\n"); 3651 dev_warn(codec->dev, "Accessory detection with no callback\n");
3640 3652
3641out: 3653out:
3654 pm_runtime_put(codec->dev);
3642 return IRQ_HANDLED; 3655 return IRQ_HANDLED;
3643} 3656}
3644 3657
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index 099e6ec32125..f16fb361a4eb 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -619,6 +619,7 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec)
619{ 619{
620 int ret = 0; 620 int ret = 0;
621 621
622 codec->control_data = codec; /* we don't use regmap! */
622 ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); 623 ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0);
623 if (ret < 0) { 624 if (ret < 0) {
624 printk(KERN_ERR "wm9712: failed to register AC97 codec\n"); 625 printk(KERN_ERR "wm9712: failed to register AC97 codec\n");
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
index 3eb19fb71d17..d0b8a3287a85 100644
--- a/sound/soc/codecs/wm9713.c
+++ b/sound/soc/codecs/wm9713.c
@@ -1196,6 +1196,7 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec)
1196 if (wm9713 == NULL) 1196 if (wm9713 == NULL)
1197 return -ENOMEM; 1197 return -ENOMEM;
1198 snd_soc_codec_set_drvdata(codec, wm9713); 1198 snd_soc_codec_set_drvdata(codec, wm9713);
1199 codec->control_data = wm9713; /* we don't use regmap! */
1199 1200
1200 ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); 1201 ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0);
1201 if (ret < 0) 1202 if (ret < 0)
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index aba71bfa33b1..b3030718c228 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -394,9 +394,14 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
394 struct snd_soc_dai *cpu_dai) 394 struct snd_soc_dai *cpu_dai)
395{ 395{
396 struct mxs_saif *saif = snd_soc_dai_get_drvdata(cpu_dai); 396 struct mxs_saif *saif = snd_soc_dai_get_drvdata(cpu_dai);
397 struct mxs_saif *master_saif;
397 u32 scr, stat; 398 u32 scr, stat;
398 int ret; 399 int ret;
399 400
401 master_saif = mxs_saif_get_master(saif);
402 if (!master_saif)
403 return -EINVAL;
404
400 /* mclk should already be set */ 405 /* mclk should already be set */
401 if (!saif->mclk && saif->mclk_in_use) { 406 if (!saif->mclk && saif->mclk_in_use) {
402 dev_err(cpu_dai->dev, "set mclk first\n"); 407 dev_err(cpu_dai->dev, "set mclk first\n");
@@ -420,6 +425,25 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
420 return ret; 425 return ret;
421 } 426 }
422 427
428 /* prepare clk in hw_param, enable in trigger */
429 clk_prepare(saif->clk);
430 if (saif != master_saif) {
431 /*
432 * Set an initial clock rate for the saif internal logic to work
433 * properly. This is important when working in EXTMASTER mode
434 * that uses the other saif's BITCLK&LRCLK but it still needs a
435 * basic clock which should be fast enough for the internal
436 * logic.
437 */
438 clk_enable(saif->clk);
439 ret = clk_set_rate(saif->clk, 24000000);
440 clk_disable(saif->clk);
441 if (ret)
442 return ret;
443
444 clk_prepare(master_saif->clk);
445 }
446
423 scr = __raw_readl(saif->base + SAIF_CTRL); 447 scr = __raw_readl(saif->base + SAIF_CTRL);
424 448
425 scr &= ~BM_SAIF_CTRL_WORD_LENGTH; 449 scr &= ~BM_SAIF_CTRL_WORD_LENGTH;
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 1046083e90a0..acdd3ef14e08 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -820,3 +820,4 @@ module_platform_driver(asoc_mcbsp_driver);
820MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>"); 820MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>");
821MODULE_DESCRIPTION("OMAP I2S SoC Interface"); 821MODULE_DESCRIPTION("OMAP I2S SoC Interface");
822MODULE_LICENSE("GPL"); 822MODULE_LICENSE("GPL");
823MODULE_ALIAS("platform:omap-mcbsp");
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 5a649da9122a..f0feb06615f8 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -441,3 +441,4 @@ module_platform_driver(omap_pcm_driver);
441MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>"); 441MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>");
442MODULE_DESCRIPTION("OMAP PCM DMA module"); 442MODULE_DESCRIPTION("OMAP PCM DMA module");
443MODULE_LICENSE("GPL"); 443MODULE_LICENSE("GPL");
444MODULE_ALIAS("platform:omap-pcm-audio");
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index f219b2f7ee68..f81c5976b961 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1096,7 +1096,7 @@ static int soc_probe_codec(struct snd_soc_card *card,
1096 } 1096 }
1097 1097
1098 /* If the driver didn't set I/O up try regmap */ 1098 /* If the driver didn't set I/O up try regmap */
1099 if (!codec->control_data) 1099 if (!codec->write && dev_get_regmap(codec->dev, NULL))
1100 snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP); 1100 snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
1101 1101
1102 if (driver->controls) 1102 if (driver->controls)
diff --git a/sound/soc/tegra/tegra_alc5632.c b/sound/soc/tegra/tegra_alc5632.c
index d684df294c0c..e463529b38bb 100644
--- a/sound/soc/tegra/tegra_alc5632.c
+++ b/sound/soc/tegra/tegra_alc5632.c
@@ -177,7 +177,7 @@ static __devinit int tegra_alc5632_probe(struct platform_device *pdev)
177 } 177 }
178 178
179 alc5632->gpio_hp_det = of_get_named_gpio(np, "nvidia,hp-det-gpios", 0); 179 alc5632->gpio_hp_det = of_get_named_gpio(np, "nvidia,hp-det-gpios", 0);
180 if (alc5632->gpio_hp_det == -ENODEV) 180 if (alc5632->gpio_hp_det == -EPROBE_DEFER)
181 return -EPROBE_DEFER; 181 return -EPROBE_DEFER;
182 182
183 ret = snd_soc_of_parse_card_name(card, "nvidia,model"); 183 ret = snd_soc_of_parse_card_name(card, "nvidia,model");
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
index 0c5bb33d258e..d4f14e492341 100644
--- a/sound/soc/tegra/tegra_wm8903.c
+++ b/sound/soc/tegra/tegra_wm8903.c
@@ -284,27 +284,27 @@ static __devinit int tegra_wm8903_driver_probe(struct platform_device *pdev)
284 } else if (np) { 284 } else if (np) {
285 pdata->gpio_spkr_en = of_get_named_gpio(np, 285 pdata->gpio_spkr_en = of_get_named_gpio(np,
286 "nvidia,spkr-en-gpios", 0); 286 "nvidia,spkr-en-gpios", 0);
287 if (pdata->gpio_spkr_en == -ENODEV) 287 if (pdata->gpio_spkr_en == -EPROBE_DEFER)
288 return -EPROBE_DEFER; 288 return -EPROBE_DEFER;
289 289
290 pdata->gpio_hp_mute = of_get_named_gpio(np, 290 pdata->gpio_hp_mute = of_get_named_gpio(np,
291 "nvidia,hp-mute-gpios", 0); 291 "nvidia,hp-mute-gpios", 0);
292 if (pdata->gpio_hp_mute == -ENODEV) 292 if (pdata->gpio_hp_mute == -EPROBE_DEFER)
293 return -EPROBE_DEFER; 293 return -EPROBE_DEFER;
294 294
295 pdata->gpio_hp_det = of_get_named_gpio(np, 295 pdata->gpio_hp_det = of_get_named_gpio(np,
296 "nvidia,hp-det-gpios", 0); 296 "nvidia,hp-det-gpios", 0);
297 if (pdata->gpio_hp_det == -ENODEV) 297 if (pdata->gpio_hp_det == -EPROBE_DEFER)
298 return -EPROBE_DEFER; 298 return -EPROBE_DEFER;
299 299
300 pdata->gpio_int_mic_en = of_get_named_gpio(np, 300 pdata->gpio_int_mic_en = of_get_named_gpio(np,
301 "nvidia,int-mic-en-gpios", 0); 301 "nvidia,int-mic-en-gpios", 0);
302 if (pdata->gpio_int_mic_en == -ENODEV) 302 if (pdata->gpio_int_mic_en == -EPROBE_DEFER)
303 return -EPROBE_DEFER; 303 return -EPROBE_DEFER;
304 304
305 pdata->gpio_ext_mic_en = of_get_named_gpio(np, 305 pdata->gpio_ext_mic_en = of_get_named_gpio(np,
306 "nvidia,ext-mic-en-gpios", 0); 306 "nvidia,ext-mic-en-gpios", 0);
307 if (pdata->gpio_ext_mic_en == -ENODEV) 307 if (pdata->gpio_ext_mic_en == -EPROBE_DEFER)
308 return -EPROBE_DEFER; 308 return -EPROBE_DEFER;
309 } 309 }
310 310
diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c
index 62ac0285bfaf..057e28ef770e 100644
--- a/sound/soc/ux500/ux500_msp_dai.c
+++ b/sound/soc/ux500/ux500_msp_dai.c
@@ -21,7 +21,7 @@
21#include <linux/mfd/dbx500-prcmu.h> 21#include <linux/mfd/dbx500-prcmu.h>
22 22
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <mach/board-mop500-msp.h> 24#include <mach/msp.h>
25 25
26#include <sound/soc.h> 26#include <sound/soc.h>
27#include <sound/soc-dai.h> 27#include <sound/soc-dai.h>
diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c
index ee14d2dac2f5..5c472f335a64 100644
--- a/sound/soc/ux500/ux500_msp_i2s.c
+++ b/sound/soc/ux500/ux500_msp_i2s.c
@@ -19,7 +19,7 @@
19#include <linux/slab.h> 19#include <linux/slab.h>
20 20
21#include <mach/hardware.h> 21#include <mach/hardware.h>
22#include <mach/board-mop500-msp.h> 22#include <mach/msp.h>
23 23
24#include <sound/soc.h> 24#include <sound/soc.h>
25 25
diff --git a/sound/soc/ux500/ux500_msp_i2s.h b/sound/soc/ux500/ux500_msp_i2s.h
index 7f71b4a0d4bc..2d9136da9865 100644
--- a/sound/soc/ux500/ux500_msp_i2s.h
+++ b/sound/soc/ux500/ux500_msp_i2s.h
@@ -17,7 +17,7 @@
17 17
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19 19
20#include <mach/board-mop500-msp.h> 20#include <mach/msp.h>
21 21
22#define MSP_INPUT_FREQ_APB 48000000 22#define MSP_INPUT_FREQ_APB 48000000
23 23