diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-05 08:05:11 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-05 08:05:11 -0400 |
commit | 75d8f2931a803b803cb4a850448460475c20f30b (patch) | |
tree | 9853b9084fa55609c8e4abbc1763bc500e05da50 /sound | |
parent | ffb690d5aa36d38d7bed7579e3f07b84ff6b3a08 (diff) | |
parent | e93c7d1bc350189511d32cec2f0af79c30e7fa47 (diff) |
Merge branch 'asoc-omap' into for-3.7
Diffstat (limited to 'sound')
38 files changed, 248 insertions, 261 deletions
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index 0d7b25e81643..4e1fda75c1c9 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c | |||
@@ -106,7 +106,7 @@ static struct pxa2xx_pcm_client pxa2xx_ac97_pcm_client = { | |||
106 | .prepare = pxa2xx_ac97_pcm_prepare, | 106 | .prepare = pxa2xx_ac97_pcm_prepare, |
107 | }; | 107 | }; |
108 | 108 | ||
109 | #ifdef CONFIG_PM | 109 | #ifdef CONFIG_PM_SLEEP |
110 | 110 | ||
111 | static int pxa2xx_ac97_do_suspend(struct snd_card *card) | 111 | static int pxa2xx_ac97_do_suspend(struct snd_card *card) |
112 | { | 112 | { |
@@ -243,7 +243,7 @@ static struct platform_driver pxa2xx_ac97_driver = { | |||
243 | .driver = { | 243 | .driver = { |
244 | .name = "pxa2xx-ac97", | 244 | .name = "pxa2xx-ac97", |
245 | .owner = THIS_MODULE, | 245 | .owner = THIS_MODULE, |
246 | #ifdef CONFIG_PM | 246 | #ifdef CONFIG_PM_SLEEP |
247 | .pm = &pxa2xx_ac97_pm_ops, | 247 | .pm = &pxa2xx_ac97_pm_ops, |
248 | #endif | 248 | #endif |
249 | }, | 249 | }, |
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c index eb4ceb71123e..277ebce23a45 100644 --- a/sound/atmel/abdac.c +++ b/sound/atmel/abdac.c | |||
@@ -452,6 +452,7 @@ static int __devinit atmel_abdac_probe(struct platform_device *pdev) | |||
452 | dac->regs = ioremap(regs->start, resource_size(regs)); | 452 | dac->regs = ioremap(regs->start, resource_size(regs)); |
453 | if (!dac->regs) { | 453 | if (!dac->regs) { |
454 | dev_dbg(&pdev->dev, "could not remap register memory\n"); | 454 | dev_dbg(&pdev->dev, "could not remap register memory\n"); |
455 | retval = -ENOMEM; | ||
455 | goto out_free_card; | 456 | goto out_free_card; |
456 | } | 457 | } |
457 | 458 | ||
@@ -534,7 +535,7 @@ out_put_pclk: | |||
534 | return retval; | 535 | return retval; |
535 | } | 536 | } |
536 | 537 | ||
537 | #ifdef CONFIG_PM | 538 | #ifdef CONFIG_PM_SLEEP |
538 | static int atmel_abdac_suspend(struct device *pdev) | 539 | static int atmel_abdac_suspend(struct device *pdev) |
539 | { | 540 | { |
540 | struct snd_card *card = dev_get_drvdata(pdev); | 541 | struct snd_card *card = dev_get_drvdata(pdev); |
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index bf47025bdf45..9052aff37f64 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c | |||
@@ -278,14 +278,9 @@ static int atmel_ac97c_capture_hw_params(struct snd_pcm_substream *substream, | |||
278 | if (retval < 0) | 278 | if (retval < 0) |
279 | return retval; | 279 | return retval; |
280 | /* snd_pcm_lib_malloc_pages returns 1 if buffer is changed. */ | 280 | /* snd_pcm_lib_malloc_pages returns 1 if buffer is changed. */ |
281 | if (cpu_is_at32ap7000()) { | 281 | if (cpu_is_at32ap7000() && retval == 1) |
282 | if (retval < 0) | 282 | if (test_and_clear_bit(DMA_RX_READY, &chip->flags)) |
283 | return retval; | 283 | dw_dma_cyclic_free(chip->dma.rx_chan); |
284 | /* snd_pcm_lib_malloc_pages returns 1 if buffer is changed. */ | ||
285 | if (retval == 1) | ||
286 | if (test_and_clear_bit(DMA_RX_READY, &chip->flags)) | ||
287 | dw_dma_cyclic_free(chip->dma.rx_chan); | ||
288 | } | ||
289 | 284 | ||
290 | /* Set restrictions to params. */ | 285 | /* Set restrictions to params. */ |
291 | mutex_lock(&opened_mutex); | 286 | mutex_lock(&opened_mutex); |
@@ -980,6 +975,7 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev) | |||
980 | 975 | ||
981 | if (!chip->regs) { | 976 | if (!chip->regs) { |
982 | dev_dbg(&pdev->dev, "could not remap register memory\n"); | 977 | dev_dbg(&pdev->dev, "could not remap register memory\n"); |
978 | retval = -ENOMEM; | ||
983 | goto err_ioremap; | 979 | goto err_ioremap; |
984 | } | 980 | } |
985 | 981 | ||
@@ -1134,7 +1130,7 @@ err_snd_card_new: | |||
1134 | return retval; | 1130 | return retval; |
1135 | } | 1131 | } |
1136 | 1132 | ||
1137 | #ifdef CONFIG_PM | 1133 | #ifdef CONFIG_PM_SLEEP |
1138 | static int atmel_ac97c_suspend(struct device *pdev) | 1134 | static int atmel_ac97c_suspend(struct device *pdev) |
1139 | { | 1135 | { |
1140 | struct snd_card *card = dev_get_drvdata(pdev); | 1136 | struct snd_card *card = dev_get_drvdata(pdev); |
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c index 1128b35b2b05..5a34355e78e8 100644 --- a/sound/drivers/aloop.c +++ b/sound/drivers/aloop.c | |||
@@ -1176,7 +1176,7 @@ static int __devexit loopback_remove(struct platform_device *devptr) | |||
1176 | return 0; | 1176 | return 0; |
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | #ifdef CONFIG_PM | 1179 | #ifdef CONFIG_PM_SLEEP |
1180 | static int loopback_suspend(struct device *pdev) | 1180 | static int loopback_suspend(struct device *pdev) |
1181 | { | 1181 | { |
1182 | struct snd_card *card = dev_get_drvdata(pdev); | 1182 | struct snd_card *card = dev_get_drvdata(pdev); |
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index f7d3bfc6bca8..54bb6644a598 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c | |||
@@ -1064,7 +1064,7 @@ static int __devexit snd_dummy_remove(struct platform_device *devptr) | |||
1064 | return 0; | 1064 | return 0; |
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | #ifdef CONFIG_PM | 1067 | #ifdef CONFIG_PM_SLEEP |
1068 | static int snd_dummy_suspend(struct device *pdev) | 1068 | static int snd_dummy_suspend(struct device *pdev) |
1069 | { | 1069 | { |
1070 | struct snd_card *card = dev_get_drvdata(pdev); | 1070 | struct snd_card *card = dev_get_drvdata(pdev); |
diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c index 6ca59fc6dcb9..ef171295f6d4 100644 --- a/sound/drivers/pcsp/pcsp.c +++ b/sound/drivers/pcsp/pcsp.c | |||
@@ -199,7 +199,7 @@ static void pcsp_stop_beep(struct snd_pcsp *chip) | |||
199 | pcspkr_stop_sound(); | 199 | pcspkr_stop_sound(); |
200 | } | 200 | } |
201 | 201 | ||
202 | #ifdef CONFIG_PM | 202 | #ifdef CONFIG_PM_SLEEP |
203 | static int pcsp_suspend(struct device *dev) | 203 | static int pcsp_suspend(struct device *dev) |
204 | { | 204 | { |
205 | struct snd_pcsp *chip = dev_get_drvdata(dev); | 205 | struct snd_pcsp *chip = dev_get_drvdata(dev); |
@@ -212,7 +212,7 @@ static SIMPLE_DEV_PM_OPS(pcsp_pm, pcsp_suspend, NULL); | |||
212 | #define PCSP_PM_OPS &pcsp_pm | 212 | #define PCSP_PM_OPS &pcsp_pm |
213 | #else | 213 | #else |
214 | #define PCSP_PM_OPS NULL | 214 | #define PCSP_PM_OPS NULL |
215 | #endif /* CONFIG_PM */ | 215 | #endif /* CONFIG_PM_SLEEP */ |
216 | 216 | ||
217 | static void pcsp_shutdown(struct platform_device *dev) | 217 | static void pcsp_shutdown(struct platform_device *dev) |
218 | { | 218 | { |
diff --git a/sound/isa/als100.c b/sound/isa/als100.c index 2d67c78c9f4b..f7cdaf51512d 100644 --- a/sound/isa/als100.c +++ b/sound/isa/als100.c | |||
@@ -233,7 +233,7 @@ static int __devinit snd_card_als100_probe(int dev, | |||
233 | irq[dev], dma8[dev], dma16[dev]); | 233 | irq[dev], dma8[dev], dma16[dev]); |
234 | } | 234 | } |
235 | 235 | ||
236 | if ((error = snd_sb16dsp_pcm(chip, 0, NULL)) < 0) { | 236 | if ((error = snd_sb16dsp_pcm(chip, 0, &chip->pcm)) < 0) { |
237 | snd_card_free(card); | 237 | snd_card_free(card); |
238 | return error; | 238 | return error; |
239 | } | 239 | } |
diff --git a/sound/oss/sb_audio.c b/sound/oss/sb_audio.c index 733b014ec7d1..b2b3c014221a 100644 --- a/sound/oss/sb_audio.c +++ b/sound/oss/sb_audio.c | |||
@@ -575,13 +575,15 @@ static int jazz16_audio_set_speed(int dev, int speed) | |||
575 | if (speed > 0) | 575 | if (speed > 0) |
576 | { | 576 | { |
577 | int tmp; | 577 | int tmp; |
578 | int s = speed * devc->channels; | 578 | int s; |
579 | 579 | ||
580 | if (speed < 5000) | 580 | if (speed < 5000) |
581 | speed = 5000; | 581 | speed = 5000; |
582 | if (speed > 44100) | 582 | if (speed > 44100) |
583 | speed = 44100; | 583 | speed = 44100; |
584 | 584 | ||
585 | s = speed * devc->channels; | ||
586 | |||
585 | devc->tconst = (256 - ((1000000 + s / 2) / s)) & 0xff; | 587 | devc->tconst = (256 - ((1000000 + s / 2) / s)) & 0xff; |
586 | 588 | ||
587 | tmp = 256 - devc->tconst; | 589 | tmp = 256 - devc->tconst; |
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index f75f5ffdfdfb..a71d1c14a0f6 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c | |||
@@ -94,7 +94,7 @@ static unsigned short snd_cs46xx_codec_read(struct snd_cs46xx *chip, | |||
94 | 94 | ||
95 | if (snd_BUG_ON(codec_index != CS46XX_PRIMARY_CODEC_INDEX && | 95 | if (snd_BUG_ON(codec_index != CS46XX_PRIMARY_CODEC_INDEX && |
96 | codec_index != CS46XX_SECONDARY_CODEC_INDEX)) | 96 | codec_index != CS46XX_SECONDARY_CODEC_INDEX)) |
97 | return -EINVAL; | 97 | return 0xffff; |
98 | 98 | ||
99 | chip->active_ctrl(chip, 1); | 99 | chip->active_ctrl(chip, 1); |
100 | 100 | ||
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index 8e40262d4117..2f6e9c762d3f 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c | |||
@@ -1725,8 +1725,10 @@ int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci, | |||
1725 | atc_connect_resources(atc); | 1725 | atc_connect_resources(atc); |
1726 | 1726 | ||
1727 | atc->timer = ct_timer_new(atc); | 1727 | atc->timer = ct_timer_new(atc); |
1728 | if (!atc->timer) | 1728 | if (!atc->timer) { |
1729 | err = -ENOMEM; | ||
1729 | goto error1; | 1730 | goto error1; |
1731 | } | ||
1730 | 1732 | ||
1731 | err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, atc, &ops); | 1733 | err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, atc, &ops); |
1732 | if (err < 0) | 1734 | if (err < 0) |
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index 0bc2315b181d..0849aac449f2 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c | |||
@@ -231,16 +231,22 @@ void snd_hda_detach_beep_device(struct hda_codec *codec) | |||
231 | } | 231 | } |
232 | EXPORT_SYMBOL_HDA(snd_hda_detach_beep_device); | 232 | EXPORT_SYMBOL_HDA(snd_hda_detach_beep_device); |
233 | 233 | ||
234 | static bool ctl_has_mute(struct snd_kcontrol *kcontrol) | ||
235 | { | ||
236 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | ||
237 | return query_amp_caps(codec, get_amp_nid(kcontrol), | ||
238 | get_amp_direction(kcontrol)) & AC_AMPCAP_MUTE; | ||
239 | } | ||
240 | |||
234 | /* get/put callbacks for beep mute mixer switches */ | 241 | /* get/put callbacks for beep mute mixer switches */ |
235 | int snd_hda_mixer_amp_switch_get_beep(struct snd_kcontrol *kcontrol, | 242 | int snd_hda_mixer_amp_switch_get_beep(struct snd_kcontrol *kcontrol, |
236 | struct snd_ctl_elem_value *ucontrol) | 243 | struct snd_ctl_elem_value *ucontrol) |
237 | { | 244 | { |
238 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | 245 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); |
239 | struct hda_beep *beep = codec->beep; | 246 | struct hda_beep *beep = codec->beep; |
240 | if (beep) { | 247 | if (beep && (!beep->enabled || !ctl_has_mute(kcontrol))) { |
241 | ucontrol->value.integer.value[0] = | 248 | ucontrol->value.integer.value[0] = |
242 | ucontrol->value.integer.value[1] = | 249 | ucontrol->value.integer.value[1] = beep->enabled; |
243 | beep->enabled; | ||
244 | return 0; | 250 | return 0; |
245 | } | 251 | } |
246 | return snd_hda_mixer_amp_switch_get(kcontrol, ucontrol); | 252 | return snd_hda_mixer_amp_switch_get(kcontrol, ucontrol); |
@@ -252,9 +258,20 @@ int snd_hda_mixer_amp_switch_put_beep(struct snd_kcontrol *kcontrol, | |||
252 | { | 258 | { |
253 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | 259 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); |
254 | struct hda_beep *beep = codec->beep; | 260 | struct hda_beep *beep = codec->beep; |
255 | if (beep) | 261 | if (beep) { |
256 | snd_hda_enable_beep_device(codec, | 262 | u8 chs = get_amp_channels(kcontrol); |
257 | *ucontrol->value.integer.value); | 263 | int enable = 0; |
264 | long *valp = ucontrol->value.integer.value; | ||
265 | if (chs & 1) { | ||
266 | enable |= *valp; | ||
267 | valp++; | ||
268 | } | ||
269 | if (chs & 2) | ||
270 | enable |= *valp; | ||
271 | snd_hda_enable_beep_device(codec, enable); | ||
272 | } | ||
273 | if (!ctl_has_mute(kcontrol)) | ||
274 | return 0; | ||
258 | return snd_hda_mixer_amp_switch_put(kcontrol, ucontrol); | 275 | return snd_hda_mixer_amp_switch_put(kcontrol, ucontrol); |
259 | } | 276 | } |
260 | EXPORT_SYMBOL_HDA(snd_hda_mixer_amp_switch_put_beep); | 277 | EXPORT_SYMBOL_HDA(snd_hda_mixer_amp_switch_put_beep); |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 88a9c20eb7a2..f560051a949e 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1386,6 +1386,44 @@ int snd_hda_codec_configure(struct hda_codec *codec) | |||
1386 | } | 1386 | } |
1387 | EXPORT_SYMBOL_HDA(snd_hda_codec_configure); | 1387 | EXPORT_SYMBOL_HDA(snd_hda_codec_configure); |
1388 | 1388 | ||
1389 | /* update the stream-id if changed */ | ||
1390 | static void update_pcm_stream_id(struct hda_codec *codec, | ||
1391 | struct hda_cvt_setup *p, hda_nid_t nid, | ||
1392 | u32 stream_tag, int channel_id) | ||
1393 | { | ||
1394 | unsigned int oldval, newval; | ||
1395 | |||
1396 | if (p->stream_tag != stream_tag || p->channel_id != channel_id) { | ||
1397 | oldval = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); | ||
1398 | newval = (stream_tag << 4) | channel_id; | ||
1399 | if (oldval != newval) | ||
1400 | snd_hda_codec_write(codec, nid, 0, | ||
1401 | AC_VERB_SET_CHANNEL_STREAMID, | ||
1402 | newval); | ||
1403 | p->stream_tag = stream_tag; | ||
1404 | p->channel_id = channel_id; | ||
1405 | } | ||
1406 | } | ||
1407 | |||
1408 | /* update the format-id if changed */ | ||
1409 | static void update_pcm_format(struct hda_codec *codec, struct hda_cvt_setup *p, | ||
1410 | hda_nid_t nid, int format) | ||
1411 | { | ||
1412 | unsigned int oldval; | ||
1413 | |||
1414 | if (p->format_id != format) { | ||
1415 | oldval = snd_hda_codec_read(codec, nid, 0, | ||
1416 | AC_VERB_GET_STREAM_FORMAT, 0); | ||
1417 | if (oldval != format) { | ||
1418 | msleep(1); | ||
1419 | snd_hda_codec_write(codec, nid, 0, | ||
1420 | AC_VERB_SET_STREAM_FORMAT, | ||
1421 | format); | ||
1422 | } | ||
1423 | p->format_id = format; | ||
1424 | } | ||
1425 | } | ||
1426 | |||
1389 | /** | 1427 | /** |
1390 | * snd_hda_codec_setup_stream - set up the codec for streaming | 1428 | * snd_hda_codec_setup_stream - set up the codec for streaming |
1391 | * @codec: the CODEC to set up | 1429 | * @codec: the CODEC to set up |
@@ -1400,7 +1438,6 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid, | |||
1400 | { | 1438 | { |
1401 | struct hda_codec *c; | 1439 | struct hda_codec *c; |
1402 | struct hda_cvt_setup *p; | 1440 | struct hda_cvt_setup *p; |
1403 | unsigned int oldval, newval; | ||
1404 | int type; | 1441 | int type; |
1405 | int i; | 1442 | int i; |
1406 | 1443 | ||
@@ -1413,29 +1450,13 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid, | |||
1413 | p = get_hda_cvt_setup(codec, nid); | 1450 | p = get_hda_cvt_setup(codec, nid); |
1414 | if (!p) | 1451 | if (!p) |
1415 | return; | 1452 | return; |
1416 | /* update the stream-id if changed */ | 1453 | |
1417 | if (p->stream_tag != stream_tag || p->channel_id != channel_id) { | 1454 | if (codec->pcm_format_first) |
1418 | oldval = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); | 1455 | update_pcm_format(codec, p, nid, format); |
1419 | newval = (stream_tag << 4) | channel_id; | 1456 | update_pcm_stream_id(codec, p, nid, stream_tag, channel_id); |
1420 | if (oldval != newval) | 1457 | if (!codec->pcm_format_first) |
1421 | snd_hda_codec_write(codec, nid, 0, | 1458 | update_pcm_format(codec, p, nid, format); |
1422 | AC_VERB_SET_CHANNEL_STREAMID, | 1459 | |
1423 | newval); | ||
1424 | p->stream_tag = stream_tag; | ||
1425 | p->channel_id = channel_id; | ||
1426 | } | ||
1427 | /* update the format-id if changed */ | ||
1428 | if (p->format_id != format) { | ||
1429 | oldval = snd_hda_codec_read(codec, nid, 0, | ||
1430 | AC_VERB_GET_STREAM_FORMAT, 0); | ||
1431 | if (oldval != format) { | ||
1432 | msleep(1); | ||
1433 | snd_hda_codec_write(codec, nid, 0, | ||
1434 | AC_VERB_SET_STREAM_FORMAT, | ||
1435 | format); | ||
1436 | } | ||
1437 | p->format_id = format; | ||
1438 | } | ||
1439 | p->active = 1; | 1460 | p->active = 1; |
1440 | p->dirty = 0; | 1461 | p->dirty = 0; |
1441 | 1462 | ||
@@ -3497,7 +3518,7 @@ static bool snd_hda_codec_get_supported_ps(struct hda_codec *codec, hda_nid_t fg | |||
3497 | { | 3518 | { |
3498 | int sup = snd_hda_param_read(codec, fg, AC_PAR_POWER_STATE); | 3519 | int sup = snd_hda_param_read(codec, fg, AC_PAR_POWER_STATE); |
3499 | 3520 | ||
3500 | if (sup < 0) | 3521 | if (sup == -1) |
3501 | return false; | 3522 | return false; |
3502 | if (sup & power_state) | 3523 | if (sup & power_state) |
3503 | return true; | 3524 | return true; |
@@ -4433,6 +4454,8 @@ static void __snd_hda_power_up(struct hda_codec *codec, bool wait_power_down) | |||
4433 | * then there is no need to go through power up here. | 4454 | * then there is no need to go through power up here. |
4434 | */ | 4455 | */ |
4435 | if (codec->power_on) { | 4456 | if (codec->power_on) { |
4457 | if (codec->power_transition < 0) | ||
4458 | codec->power_transition = 0; | ||
4436 | spin_unlock(&codec->power_lock); | 4459 | spin_unlock(&codec->power_lock); |
4437 | return; | 4460 | return; |
4438 | } | 4461 | } |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index c422d330ca54..7fbc1bcaf1a9 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -861,6 +861,7 @@ struct hda_codec { | |||
861 | unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */ | 861 | unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */ |
862 | unsigned int ignore_misc_bit:1; /* ignore MISC_NO_PRESENCE bit */ | 862 | unsigned int ignore_misc_bit:1; /* ignore MISC_NO_PRESENCE bit */ |
863 | unsigned int no_jack_detect:1; /* Machine has no jack-detection */ | 863 | unsigned int no_jack_detect:1; /* Machine has no jack-detection */ |
864 | unsigned int pcm_format_first:1; /* PCM format must be set first */ | ||
864 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 865 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
865 | unsigned int power_on :1; /* current (global) power-state */ | 866 | unsigned int power_on :1; /* current (global) power-state */ |
866 | int power_transition; /* power-state in transition */ | 867 | int power_transition; /* power-state in transition */ |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index c8aced182fd1..60882c62f180 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -151,6 +151,7 @@ MODULE_SUPPORTED_DEVICE("{{Intel, ICH6}," | |||
151 | "{Intel, CPT}," | 151 | "{Intel, CPT}," |
152 | "{Intel, PPT}," | 152 | "{Intel, PPT}," |
153 | "{Intel, LPT}," | 153 | "{Intel, LPT}," |
154 | "{Intel, LPT_LP}," | ||
154 | "{Intel, HPT}," | 155 | "{Intel, HPT}," |
155 | "{Intel, PBG}," | 156 | "{Intel, PBG}," |
156 | "{Intel, SCH}," | 157 | "{Intel, SCH}," |
@@ -3270,6 +3271,14 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { | |||
3270 | { PCI_DEVICE(0x8086, 0x8c20), | 3271 | { PCI_DEVICE(0x8086, 0x8c20), |
3271 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | 3272 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | |
3272 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO }, | 3273 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO }, |
3274 | /* Lynx Point-LP */ | ||
3275 | { PCI_DEVICE(0x8086, 0x9c20), | ||
3276 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | ||
3277 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO }, | ||
3278 | /* Lynx Point-LP */ | ||
3279 | { PCI_DEVICE(0x8086, 0x9c21), | ||
3280 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | ||
3281 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO }, | ||
3273 | /* Haswell */ | 3282 | /* Haswell */ |
3274 | { PCI_DEVICE(0x8086, 0x0c0c), | 3283 | { PCI_DEVICE(0x8086, 0x0c0c), |
3275 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | | 3284 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | |
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 7e46258fc700..6894ec66258c 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -412,7 +412,7 @@ static void print_digital_conv(struct snd_info_buffer *buffer, | |||
412 | if (digi1 & AC_DIG1_EMPHASIS) | 412 | if (digi1 & AC_DIG1_EMPHASIS) |
413 | snd_iprintf(buffer, " Preemphasis"); | 413 | snd_iprintf(buffer, " Preemphasis"); |
414 | if (digi1 & AC_DIG1_COPYRIGHT) | 414 | if (digi1 & AC_DIG1_COPYRIGHT) |
415 | snd_iprintf(buffer, " Copyright"); | 415 | snd_iprintf(buffer, " Non-Copyright"); |
416 | if (digi1 & AC_DIG1_NONAUDIO) | 416 | if (digi1 & AC_DIG1_NONAUDIO) |
417 | snd_iprintf(buffer, " Non-Audio"); | 417 | snd_iprintf(buffer, " Non-Audio"); |
418 | if (digi1 & AC_DIG1_PROFESSIONAL) | 418 | if (digi1 & AC_DIG1_PROFESSIONAL) |
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index d0d3540e39e7..49750a96d649 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c | |||
@@ -246,7 +246,7 @@ static void init_output(struct hda_codec *codec, hda_nid_t pin, hda_nid_t dac) | |||
246 | AC_VERB_SET_AMP_GAIN_MUTE, | 246 | AC_VERB_SET_AMP_GAIN_MUTE, |
247 | AMP_OUT_UNMUTE); | 247 | AMP_OUT_UNMUTE); |
248 | } | 248 | } |
249 | if (dac) | 249 | if (dac && (get_wcaps(codec, dac) & AC_WCAP_OUT_AMP)) |
250 | snd_hda_codec_write(codec, dac, 0, | 250 | snd_hda_codec_write(codec, dac, 0, |
251 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO); | 251 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO); |
252 | } | 252 | } |
@@ -261,7 +261,7 @@ static void init_input(struct hda_codec *codec, hda_nid_t pin, hda_nid_t adc) | |||
261 | AC_VERB_SET_AMP_GAIN_MUTE, | 261 | AC_VERB_SET_AMP_GAIN_MUTE, |
262 | AMP_IN_UNMUTE(0)); | 262 | AMP_IN_UNMUTE(0)); |
263 | } | 263 | } |
264 | if (adc) | 264 | if (adc && (get_wcaps(codec, adc) & AC_WCAP_IN_AMP)) |
265 | snd_hda_codec_write(codec, adc, 0, AC_VERB_SET_AMP_GAIN_MUTE, | 265 | snd_hda_codec_write(codec, adc, 0, AC_VERB_SET_AMP_GAIN_MUTE, |
266 | AMP_IN_UNMUTE(0)); | 266 | AMP_IN_UNMUTE(0)); |
267 | } | 267 | } |
@@ -275,6 +275,10 @@ static int _add_switch(struct hda_codec *codec, hda_nid_t nid, const char *pfx, | |||
275 | int type = dir ? HDA_INPUT : HDA_OUTPUT; | 275 | int type = dir ? HDA_INPUT : HDA_OUTPUT; |
276 | struct snd_kcontrol_new knew = | 276 | struct snd_kcontrol_new knew = |
277 | HDA_CODEC_MUTE_MONO(namestr, nid, chan, 0, type); | 277 | HDA_CODEC_MUTE_MONO(namestr, nid, chan, 0, type); |
278 | if ((query_amp_caps(codec, nid, type) & AC_AMPCAP_MUTE) == 0) { | ||
279 | snd_printdd("Skipping '%s %s Switch' (no mute on node 0x%x)\n", pfx, dirstr[dir], nid); | ||
280 | return 0; | ||
281 | } | ||
278 | sprintf(namestr, "%s %s Switch", pfx, dirstr[dir]); | 282 | sprintf(namestr, "%s %s Switch", pfx, dirstr[dir]); |
279 | return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec)); | 283 | return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec)); |
280 | } | 284 | } |
@@ -286,6 +290,10 @@ static int _add_volume(struct hda_codec *codec, hda_nid_t nid, const char *pfx, | |||
286 | int type = dir ? HDA_INPUT : HDA_OUTPUT; | 290 | int type = dir ? HDA_INPUT : HDA_OUTPUT; |
287 | struct snd_kcontrol_new knew = | 291 | struct snd_kcontrol_new knew = |
288 | HDA_CODEC_VOLUME_MONO(namestr, nid, chan, 0, type); | 292 | HDA_CODEC_VOLUME_MONO(namestr, nid, chan, 0, type); |
293 | if ((query_amp_caps(codec, nid, type) & AC_AMPCAP_NUM_STEPS) == 0) { | ||
294 | snd_printdd("Skipping '%s %s Volume' (no amp on node 0x%x)\n", pfx, dirstr[dir], nid); | ||
295 | return 0; | ||
296 | } | ||
289 | sprintf(namestr, "%s %s Volume", pfx, dirstr[dir]); | 297 | sprintf(namestr, "%s %s Volume", pfx, dirstr[dir]); |
290 | return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec)); | 298 | return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec)); |
291 | } | 299 | } |
@@ -464,50 +472,17 @@ exit: | |||
464 | } | 472 | } |
465 | 473 | ||
466 | /* | 474 | /* |
467 | * PCM stuffs | 475 | * PCM callbacks |
468 | */ | 476 | */ |
469 | static void ca0132_setup_stream(struct hda_codec *codec, hda_nid_t nid, | 477 | static int ca0132_playback_pcm_open(struct hda_pcm_stream *hinfo, |
470 | u32 stream_tag, | 478 | struct hda_codec *codec, |
471 | int channel_id, int format) | 479 | struct snd_pcm_substream *substream) |
472 | { | 480 | { |
473 | unsigned int oldval, newval; | 481 | struct ca0132_spec *spec = codec->spec; |
474 | 482 | return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream, | |
475 | if (!nid) | 483 | hinfo); |
476 | return; | ||
477 | |||
478 | snd_printdd("ca0132_setup_stream: " | ||
479 | "NID=0x%x, stream=0x%x, channel=%d, format=0x%x\n", | ||
480 | nid, stream_tag, channel_id, format); | ||
481 | |||
482 | /* update the format-id if changed */ | ||
483 | oldval = snd_hda_codec_read(codec, nid, 0, | ||
484 | AC_VERB_GET_STREAM_FORMAT, | ||
485 | 0); | ||
486 | if (oldval != format) { | ||
487 | msleep(20); | ||
488 | snd_hda_codec_write(codec, nid, 0, | ||
489 | AC_VERB_SET_STREAM_FORMAT, | ||
490 | format); | ||
491 | } | ||
492 | |||
493 | oldval = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); | ||
494 | newval = (stream_tag << 4) | channel_id; | ||
495 | if (oldval != newval) { | ||
496 | snd_hda_codec_write(codec, nid, 0, | ||
497 | AC_VERB_SET_CHANNEL_STREAMID, | ||
498 | newval); | ||
499 | } | ||
500 | } | ||
501 | |||
502 | static void ca0132_cleanup_stream(struct hda_codec *codec, hda_nid_t nid) | ||
503 | { | ||
504 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_STREAM_FORMAT, 0); | ||
505 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CHANNEL_STREAMID, 0); | ||
506 | } | 484 | } |
507 | 485 | ||
508 | /* | ||
509 | * PCM callbacks | ||
510 | */ | ||
511 | static int ca0132_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | 486 | static int ca0132_playback_pcm_prepare(struct hda_pcm_stream *hinfo, |
512 | struct hda_codec *codec, | 487 | struct hda_codec *codec, |
513 | unsigned int stream_tag, | 488 | unsigned int stream_tag, |
@@ -515,10 +490,8 @@ static int ca0132_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
515 | struct snd_pcm_substream *substream) | 490 | struct snd_pcm_substream *substream) |
516 | { | 491 | { |
517 | struct ca0132_spec *spec = codec->spec; | 492 | struct ca0132_spec *spec = codec->spec; |
518 | 493 | return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, | |
519 | ca0132_setup_stream(codec, spec->dacs[0], stream_tag, 0, format); | 494 | stream_tag, format, substream); |
520 | |||
521 | return 0; | ||
522 | } | 495 | } |
523 | 496 | ||
524 | static int ca0132_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | 497 | static int ca0132_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, |
@@ -526,92 +499,45 @@ static int ca0132_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | |||
526 | struct snd_pcm_substream *substream) | 499 | struct snd_pcm_substream *substream) |
527 | { | 500 | { |
528 | struct ca0132_spec *spec = codec->spec; | 501 | struct ca0132_spec *spec = codec->spec; |
529 | 502 | return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout); | |
530 | ca0132_cleanup_stream(codec, spec->dacs[0]); | ||
531 | |||
532 | return 0; | ||
533 | } | 503 | } |
534 | 504 | ||
535 | /* | 505 | /* |
536 | * Digital out | 506 | * Digital out |
537 | */ | 507 | */ |
538 | static int ca0132_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | 508 | static int ca0132_dig_playback_pcm_open(struct hda_pcm_stream *hinfo, |
539 | struct hda_codec *codec, | 509 | struct hda_codec *codec, |
540 | unsigned int stream_tag, | 510 | struct snd_pcm_substream *substream) |
541 | unsigned int format, | ||
542 | struct snd_pcm_substream *substream) | ||
543 | { | 511 | { |
544 | struct ca0132_spec *spec = codec->spec; | 512 | struct ca0132_spec *spec = codec->spec; |
545 | 513 | return snd_hda_multi_out_dig_open(codec, &spec->multiout); | |
546 | ca0132_setup_stream(codec, spec->dig_out, stream_tag, 0, format); | ||
547 | |||
548 | return 0; | ||
549 | } | 514 | } |
550 | 515 | ||
551 | static int ca0132_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | 516 | static int ca0132_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo, |
552 | struct hda_codec *codec, | ||
553 | struct snd_pcm_substream *substream) | ||
554 | { | ||
555 | struct ca0132_spec *spec = codec->spec; | ||
556 | |||
557 | ca0132_cleanup_stream(codec, spec->dig_out); | ||
558 | |||
559 | return 0; | ||
560 | } | ||
561 | |||
562 | /* | ||
563 | * Analog capture | ||
564 | */ | ||
565 | static int ca0132_capture_pcm_prepare(struct hda_pcm_stream *hinfo, | ||
566 | struct hda_codec *codec, | 517 | struct hda_codec *codec, |
567 | unsigned int stream_tag, | 518 | unsigned int stream_tag, |
568 | unsigned int format, | 519 | unsigned int format, |
569 | struct snd_pcm_substream *substream) | 520 | struct snd_pcm_substream *substream) |
570 | { | 521 | { |
571 | struct ca0132_spec *spec = codec->spec; | 522 | struct ca0132_spec *spec = codec->spec; |
572 | 523 | return snd_hda_multi_out_dig_prepare(codec, &spec->multiout, | |
573 | ca0132_setup_stream(codec, spec->adcs[substream->number], | 524 | stream_tag, format, substream); |
574 | stream_tag, 0, format); | ||
575 | |||
576 | return 0; | ||
577 | } | 525 | } |
578 | 526 | ||
579 | static int ca0132_capture_pcm_cleanup(struct hda_pcm_stream *hinfo, | 527 | static int ca0132_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, |
580 | struct hda_codec *codec, | 528 | struct hda_codec *codec, |
581 | struct snd_pcm_substream *substream) | 529 | struct snd_pcm_substream *substream) |
582 | { | 530 | { |
583 | struct ca0132_spec *spec = codec->spec; | 531 | struct ca0132_spec *spec = codec->spec; |
584 | 532 | return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout); | |
585 | ca0132_cleanup_stream(codec, spec->adcs[substream->number]); | ||
586 | |||
587 | return 0; | ||
588 | } | 533 | } |
589 | 534 | ||
590 | /* | 535 | static int ca0132_dig_playback_pcm_close(struct hda_pcm_stream *hinfo, |
591 | * Digital capture | 536 | struct hda_codec *codec, |
592 | */ | 537 | struct snd_pcm_substream *substream) |
593 | static int ca0132_dig_capture_pcm_prepare(struct hda_pcm_stream *hinfo, | ||
594 | struct hda_codec *codec, | ||
595 | unsigned int stream_tag, | ||
596 | unsigned int format, | ||
597 | struct snd_pcm_substream *substream) | ||
598 | { | 538 | { |
599 | struct ca0132_spec *spec = codec->spec; | 539 | struct ca0132_spec *spec = codec->spec; |
600 | 540 | return snd_hda_multi_out_dig_close(codec, &spec->multiout); | |
601 | ca0132_setup_stream(codec, spec->dig_in, stream_tag, 0, format); | ||
602 | |||
603 | return 0; | ||
604 | } | ||
605 | |||
606 | static int ca0132_dig_capture_pcm_cleanup(struct hda_pcm_stream *hinfo, | ||
607 | struct hda_codec *codec, | ||
608 | struct snd_pcm_substream *substream) | ||
609 | { | ||
610 | struct ca0132_spec *spec = codec->spec; | ||
611 | |||
612 | ca0132_cleanup_stream(codec, spec->dig_in); | ||
613 | |||
614 | return 0; | ||
615 | } | 541 | } |
616 | 542 | ||
617 | /* | 543 | /* |
@@ -621,6 +547,7 @@ static struct hda_pcm_stream ca0132_pcm_analog_playback = { | |||
621 | .channels_min = 2, | 547 | .channels_min = 2, |
622 | .channels_max = 2, | 548 | .channels_max = 2, |
623 | .ops = { | 549 | .ops = { |
550 | .open = ca0132_playback_pcm_open, | ||
624 | .prepare = ca0132_playback_pcm_prepare, | 551 | .prepare = ca0132_playback_pcm_prepare, |
625 | .cleanup = ca0132_playback_pcm_cleanup | 552 | .cleanup = ca0132_playback_pcm_cleanup |
626 | }, | 553 | }, |
@@ -630,10 +557,6 @@ static struct hda_pcm_stream ca0132_pcm_analog_capture = { | |||
630 | .substreams = 1, | 557 | .substreams = 1, |
631 | .channels_min = 2, | 558 | .channels_min = 2, |
632 | .channels_max = 2, | 559 | .channels_max = 2, |
633 | .ops = { | ||
634 | .prepare = ca0132_capture_pcm_prepare, | ||
635 | .cleanup = ca0132_capture_pcm_cleanup | ||
636 | }, | ||
637 | }; | 560 | }; |
638 | 561 | ||
639 | static struct hda_pcm_stream ca0132_pcm_digital_playback = { | 562 | static struct hda_pcm_stream ca0132_pcm_digital_playback = { |
@@ -641,6 +564,8 @@ static struct hda_pcm_stream ca0132_pcm_digital_playback = { | |||
641 | .channels_min = 2, | 564 | .channels_min = 2, |
642 | .channels_max = 2, | 565 | .channels_max = 2, |
643 | .ops = { | 566 | .ops = { |
567 | .open = ca0132_dig_playback_pcm_open, | ||
568 | .close = ca0132_dig_playback_pcm_close, | ||
644 | .prepare = ca0132_dig_playback_pcm_prepare, | 569 | .prepare = ca0132_dig_playback_pcm_prepare, |
645 | .cleanup = ca0132_dig_playback_pcm_cleanup | 570 | .cleanup = ca0132_dig_playback_pcm_cleanup |
646 | }, | 571 | }, |
@@ -650,10 +575,6 @@ static struct hda_pcm_stream ca0132_pcm_digital_capture = { | |||
650 | .substreams = 1, | 575 | .substreams = 1, |
651 | .channels_min = 2, | 576 | .channels_min = 2, |
652 | .channels_max = 2, | 577 | .channels_max = 2, |
653 | .ops = { | ||
654 | .prepare = ca0132_dig_capture_pcm_prepare, | ||
655 | .cleanup = ca0132_dig_capture_pcm_cleanup | ||
656 | }, | ||
657 | }; | 578 | }; |
658 | 579 | ||
659 | static int ca0132_build_pcms(struct hda_codec *codec) | 580 | static int ca0132_build_pcms(struct hda_codec *codec) |
@@ -928,18 +849,16 @@ static int ca0132_build_controls(struct hda_codec *codec) | |||
928 | spec->dig_out); | 849 | spec->dig_out); |
929 | if (err < 0) | 850 | if (err < 0) |
930 | return err; | 851 | return err; |
931 | err = add_out_volume(codec, spec->dig_out, "IEC958"); | 852 | err = snd_hda_create_spdif_share_sw(codec, &spec->multiout); |
932 | if (err < 0) | 853 | if (err < 0) |
933 | return err; | 854 | return err; |
855 | /* spec->multiout.share_spdif = 1; */ | ||
934 | } | 856 | } |
935 | 857 | ||
936 | if (spec->dig_in) { | 858 | if (spec->dig_in) { |
937 | err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in); | 859 | err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in); |
938 | if (err < 0) | 860 | if (err < 0) |
939 | return err; | 861 | return err; |
940 | err = add_in_volume(codec, spec->dig_in, "IEC958"); | ||
941 | if (err < 0) | ||
942 | return err; | ||
943 | } | 862 | } |
944 | return 0; | 863 | return 0; |
945 | } | 864 | } |
@@ -961,6 +880,9 @@ static void ca0132_config(struct hda_codec *codec) | |||
961 | struct ca0132_spec *spec = codec->spec; | 880 | struct ca0132_spec *spec = codec->spec; |
962 | struct auto_pin_cfg *cfg = &spec->autocfg; | 881 | struct auto_pin_cfg *cfg = &spec->autocfg; |
963 | 882 | ||
883 | codec->pcm_format_first = 1; | ||
884 | codec->no_sticky_stream = 1; | ||
885 | |||
964 | /* line-outs */ | 886 | /* line-outs */ |
965 | cfg->line_outs = 1; | 887 | cfg->line_outs = 1; |
966 | cfg->line_out_pins[0] = 0x0b; /* front */ | 888 | cfg->line_out_pins[0] = 0x0b; /* front */ |
@@ -988,14 +910,24 @@ static void ca0132_config(struct hda_codec *codec) | |||
988 | 910 | ||
989 | /* Mic-in */ | 911 | /* Mic-in */ |
990 | spec->input_pins[0] = 0x12; | 912 | spec->input_pins[0] = 0x12; |
991 | spec->input_labels[0] = "Mic-In"; | 913 | spec->input_labels[0] = "Mic"; |
992 | spec->adcs[0] = 0x07; | 914 | spec->adcs[0] = 0x07; |
993 | 915 | ||
994 | /* Line-In */ | 916 | /* Line-In */ |
995 | spec->input_pins[1] = 0x11; | 917 | spec->input_pins[1] = 0x11; |
996 | spec->input_labels[1] = "Line-In"; | 918 | spec->input_labels[1] = "Line"; |
997 | spec->adcs[1] = 0x08; | 919 | spec->adcs[1] = 0x08; |
998 | spec->num_inputs = 2; | 920 | spec->num_inputs = 2; |
921 | |||
922 | /* SPDIF I/O */ | ||
923 | spec->dig_out = 0x05; | ||
924 | spec->multiout.dig_out_nid = spec->dig_out; | ||
925 | cfg->dig_out_pins[0] = 0x0c; | ||
926 | cfg->dig_outs = 1; | ||
927 | cfg->dig_out_type[0] = HDA_PCM_TYPE_SPDIF; | ||
928 | spec->dig_in = 0x09; | ||
929 | cfg->dig_in_pin = 0x0e; | ||
930 | cfg->dig_in_type = HDA_PCM_TYPE_SPDIF; | ||
999 | } | 931 | } |
1000 | 932 | ||
1001 | static void ca0132_init_chip(struct hda_codec *codec) | 933 | static void ca0132_init_chip(struct hda_codec *codec) |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 94040ccf8e8f..ea5775a1a7db 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -4272,7 +4272,8 @@ static int stac92xx_init(struct hda_codec *codec) | |||
4272 | unsigned int gpio; | 4272 | unsigned int gpio; |
4273 | int i; | 4273 | int i; |
4274 | 4274 | ||
4275 | snd_hda_sequence_write(codec, spec->init); | 4275 | if (spec->init) |
4276 | snd_hda_sequence_write(codec, spec->init); | ||
4276 | 4277 | ||
4277 | /* power down adcs initially */ | 4278 | /* power down adcs initially */ |
4278 | if (spec->powerdown_adcs) | 4279 | if (spec->powerdown_adcs) |
@@ -5748,7 +5749,6 @@ again: | |||
5748 | /* fallthru */ | 5749 | /* fallthru */ |
5749 | case 0x111d76b4: /* 6 Port without Analog Mixer */ | 5750 | case 0x111d76b4: /* 6 Port without Analog Mixer */ |
5750 | case 0x111d76b5: | 5751 | case 0x111d76b5: |
5751 | spec->init = stac92hd71bxx_core_init; | ||
5752 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; | 5752 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; |
5753 | spec->num_dmics = stac92xx_connected_ports(codec, | 5753 | spec->num_dmics = stac92xx_connected_ports(codec, |
5754 | stac92hd71bxx_dmic_nids, | 5754 | stac92hd71bxx_dmic_nids, |
@@ -5773,7 +5773,6 @@ again: | |||
5773 | spec->stream_delay = 40; /* 40 milliseconds */ | 5773 | spec->stream_delay = 40; /* 40 milliseconds */ |
5774 | 5774 | ||
5775 | /* disable VSW */ | 5775 | /* disable VSW */ |
5776 | spec->init = stac92hd71bxx_core_init; | ||
5777 | unmute_init++; | 5776 | unmute_init++; |
5778 | snd_hda_codec_set_pincfg(codec, 0x0f, 0x40f000f0); | 5777 | snd_hda_codec_set_pincfg(codec, 0x0f, 0x40f000f0); |
5779 | snd_hda_codec_set_pincfg(codec, 0x19, 0x40f000f3); | 5778 | snd_hda_codec_set_pincfg(codec, 0x19, 0x40f000f3); |
@@ -5788,7 +5787,6 @@ again: | |||
5788 | 5787 | ||
5789 | /* fallthru */ | 5788 | /* fallthru */ |
5790 | default: | 5789 | default: |
5791 | spec->init = stac92hd71bxx_core_init; | ||
5792 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; | 5790 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; |
5793 | spec->num_dmics = stac92xx_connected_ports(codec, | 5791 | spec->num_dmics = stac92xx_connected_ports(codec, |
5794 | stac92hd71bxx_dmic_nids, | 5792 | stac92hd71bxx_dmic_nids, |
@@ -5796,6 +5794,9 @@ again: | |||
5796 | break; | 5794 | break; |
5797 | } | 5795 | } |
5798 | 5796 | ||
5797 | if (get_wcaps_type(get_wcaps(codec, 0x28)) == AC_WID_VOL_KNB) | ||
5798 | spec->init = stac92hd71bxx_core_init; | ||
5799 | |||
5799 | if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP) | 5800 | if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP) |
5800 | snd_hda_sequence_write_cache(codec, unmute_init); | 5801 | snd_hda_sequence_write_cache(codec, unmute_init); |
5801 | 5802 | ||
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 80d90cb42853..430771776915 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -1752,6 +1752,14 @@ static int via_suspend(struct hda_codec *codec) | |||
1752 | { | 1752 | { |
1753 | struct via_spec *spec = codec->spec; | 1753 | struct via_spec *spec = codec->spec; |
1754 | vt1708_stop_hp_work(spec); | 1754 | vt1708_stop_hp_work(spec); |
1755 | |||
1756 | if (spec->codec_type == VT1802) { | ||
1757 | /* Fix pop noise on headphones */ | ||
1758 | int i; | ||
1759 | for (i = 0; i < spec->autocfg.hp_outs; i++) | ||
1760 | snd_hda_set_pin_ctl(codec, spec->autocfg.hp_pins[i], 0); | ||
1761 | } | ||
1762 | |||
1755 | return 0; | 1763 | return 0; |
1756 | } | 1764 | } |
1757 | #endif | 1765 | #endif |
diff --git a/sound/pci/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c index d1ab43706735..5579b08bb35b 100644 --- a/sound/pci/lx6464es/lx6464es.c +++ b/sound/pci/lx6464es/lx6464es.c | |||
@@ -851,6 +851,8 @@ static int __devinit lx_pcm_create(struct lx6464es *chip) | |||
851 | /* hardcoded device name & channel count */ | 851 | /* hardcoded device name & channel count */ |
852 | err = snd_pcm_new(chip->card, (char *)card_name, 0, | 852 | err = snd_pcm_new(chip->card, (char *)card_name, 0, |
853 | 1, 1, &pcm); | 853 | 1, 1, &pcm); |
854 | if (err < 0) | ||
855 | return err; | ||
854 | 856 | ||
855 | pcm->private_data = chip; | 857 | pcm->private_data = chip; |
856 | 858 | ||
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index b8ac8710f47f..b12308b5ba2a 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -6585,7 +6585,7 @@ static int __devinit snd_hdspm_create(struct snd_card *card, | |||
6585 | snd_printk(KERN_ERR "HDSPM: " | 6585 | snd_printk(KERN_ERR "HDSPM: " |
6586 | "unable to kmalloc Mixer memory of %d Bytes\n", | 6586 | "unable to kmalloc Mixer memory of %d Bytes\n", |
6587 | (int)sizeof(struct hdspm_mixer)); | 6587 | (int)sizeof(struct hdspm_mixer)); |
6588 | return err; | 6588 | return -ENOMEM; |
6589 | } | 6589 | } |
6590 | 6590 | ||
6591 | hdspm->port_names_in = NULL; | 6591 | hdspm->port_names_in = NULL; |
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c index 512434efcc31..805ab6e9a78f 100644 --- a/sound/pci/sis7019.c +++ b/sound/pci/sis7019.c | |||
@@ -1377,8 +1377,9 @@ static int __devinit sis_chip_create(struct snd_card *card, | |||
1377 | if (rc) | 1377 | if (rc) |
1378 | goto error_out_cleanup; | 1378 | goto error_out_cleanup; |
1379 | 1379 | ||
1380 | if (request_irq(pci->irq, sis_interrupt, IRQF_SHARED, KBUILD_MODNAME, | 1380 | rc = request_irq(pci->irq, sis_interrupt, IRQF_SHARED, KBUILD_MODNAME, |
1381 | sis)) { | 1381 | sis); |
1382 | if (rc) { | ||
1382 | dev_err(&pci->dev, "unable to allocate irq %d\n", sis->irq); | 1383 | dev_err(&pci->dev, "unable to allocate irq %d\n", sis->irq); |
1383 | goto error_out_cleanup; | 1384 | goto error_out_cleanup; |
1384 | } | 1385 | } |
diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c index f5ceb6f282de..210cafe04890 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c | |||
@@ -143,7 +143,7 @@ static int __devexit snd_pmac_remove(struct platform_device *devptr) | |||
143 | return 0; | 143 | return 0; |
144 | } | 144 | } |
145 | 145 | ||
146 | #ifdef CONFIG_PM | 146 | #ifdef CONFIG_PM_SLEEP |
147 | static int snd_pmac_driver_suspend(struct device *dev) | 147 | static int snd_pmac_driver_suspend(struct device *dev) |
148 | { | 148 | { |
149 | struct snd_card *card = dev_get_drvdata(dev); | 149 | struct snd_card *card = dev_get_drvdata(dev); |
diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c index 1aa52eff526a..9b18b5243a56 100644 --- a/sound/ppc/snd_ps3.c +++ b/sound/ppc/snd_ps3.c | |||
@@ -1040,6 +1040,7 @@ static int __devinit snd_ps3_driver_probe(struct ps3_system_bus_device *dev) | |||
1040 | GFP_KERNEL); | 1040 | GFP_KERNEL); |
1041 | if (!the_card.null_buffer_start_vaddr) { | 1041 | if (!the_card.null_buffer_start_vaddr) { |
1042 | pr_info("%s: nullbuffer alloc failed\n", __func__); | 1042 | pr_info("%s: nullbuffer alloc failed\n", __func__); |
1043 | ret = -ENOMEM; | ||
1043 | goto clean_preallocate; | 1044 | goto clean_preallocate; |
1044 | } | 1045 | } |
1045 | pr_debug("%s: null vaddr=%p dma=%#llx\n", __func__, | 1046 | pr_debug("%s: null vaddr=%p dma=%#llx\n", __func__, |
diff --git a/sound/soc/blackfin/bf6xx-sport.c b/sound/soc/blackfin/bf6xx-sport.c index 318c5ba5360f..dfb744381c42 100644 --- a/sound/soc/blackfin/bf6xx-sport.c +++ b/sound/soc/blackfin/bf6xx-sport.c | |||
@@ -413,7 +413,14 @@ EXPORT_SYMBOL(sport_create); | |||
413 | 413 | ||
414 | void sport_delete(struct sport_device *sport) | 414 | void sport_delete(struct sport_device *sport) |
415 | { | 415 | { |
416 | if (sport->tx_desc) | ||
417 | dma_free_coherent(NULL, sport->tx_desc_size, | ||
418 | sport->tx_desc, 0); | ||
419 | if (sport->rx_desc) | ||
420 | dma_free_coherent(NULL, sport->rx_desc_size, | ||
421 | sport->rx_desc, 0); | ||
416 | sport_free_resource(sport); | 422 | sport_free_resource(sport); |
423 | kfree(sport); | ||
417 | } | 424 | } |
418 | EXPORT_SYMBOL(sport_delete); | 425 | EXPORT_SYMBOL(sport_delete); |
419 | 426 | ||
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index 2e6f1ffc9fd4..e2fb07ee68a7 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c | |||
@@ -128,13 +128,9 @@ SOC_SINGLE_TLV("EQ4 B5 Volume", ARIZONA_EQ4_2, ARIZONA_EQ4_B5_GAIN_SHIFT, | |||
128 | 128 | ||
129 | ARIZONA_MIXER_CONTROLS("DRC1L", ARIZONA_DRC1LMIX_INPUT_1_SOURCE), | 129 | ARIZONA_MIXER_CONTROLS("DRC1L", ARIZONA_DRC1LMIX_INPUT_1_SOURCE), |
130 | ARIZONA_MIXER_CONTROLS("DRC1R", ARIZONA_DRC1RMIX_INPUT_1_SOURCE), | 130 | ARIZONA_MIXER_CONTROLS("DRC1R", ARIZONA_DRC1RMIX_INPUT_1_SOURCE), |
131 | ARIZONA_MIXER_CONTROLS("DRC2L", ARIZONA_DRC2LMIX_INPUT_1_SOURCE), | ||
132 | ARIZONA_MIXER_CONTROLS("DRC2R", ARIZONA_DRC2RMIX_INPUT_1_SOURCE), | ||
133 | 131 | ||
134 | SND_SOC_BYTES_MASK("DRC1", ARIZONA_DRC1_CTRL1, 5, | 132 | SND_SOC_BYTES_MASK("DRC1", ARIZONA_DRC1_CTRL1, 5, |
135 | ARIZONA_DRC1R_ENA | ARIZONA_DRC1L_ENA), | 133 | ARIZONA_DRC1R_ENA | ARIZONA_DRC1L_ENA), |
136 | SND_SOC_BYTES_MASK("DRC2", ARIZONA_DRC2_CTRL1, 5, | ||
137 | ARIZONA_DRC2R_ENA | ARIZONA_DRC2L_ENA), | ||
138 | 134 | ||
139 | ARIZONA_MIXER_CONTROLS("LHPF1", ARIZONA_HPLP1MIX_INPUT_1_SOURCE), | 135 | ARIZONA_MIXER_CONTROLS("LHPF1", ARIZONA_HPLP1MIX_INPUT_1_SOURCE), |
140 | ARIZONA_MIXER_CONTROLS("LHPF2", ARIZONA_HPLP2MIX_INPUT_1_SOURCE), | 136 | ARIZONA_MIXER_CONTROLS("LHPF2", ARIZONA_HPLP2MIX_INPUT_1_SOURCE), |
@@ -236,8 +232,6 @@ ARIZONA_MIXER_ENUMS(EQ4, ARIZONA_EQ4MIX_INPUT_1_SOURCE); | |||
236 | 232 | ||
237 | ARIZONA_MIXER_ENUMS(DRC1L, ARIZONA_DRC1LMIX_INPUT_1_SOURCE); | 233 | ARIZONA_MIXER_ENUMS(DRC1L, ARIZONA_DRC1LMIX_INPUT_1_SOURCE); |
238 | ARIZONA_MIXER_ENUMS(DRC1R, ARIZONA_DRC1RMIX_INPUT_1_SOURCE); | 234 | ARIZONA_MIXER_ENUMS(DRC1R, ARIZONA_DRC1RMIX_INPUT_1_SOURCE); |
239 | ARIZONA_MIXER_ENUMS(DRC2L, ARIZONA_DRC2LMIX_INPUT_1_SOURCE); | ||
240 | ARIZONA_MIXER_ENUMS(DRC2R, ARIZONA_DRC2RMIX_INPUT_1_SOURCE); | ||
241 | 235 | ||
242 | ARIZONA_MIXER_ENUMS(LHPF1, ARIZONA_HPLP1MIX_INPUT_1_SOURCE); | 236 | ARIZONA_MIXER_ENUMS(LHPF1, ARIZONA_HPLP1MIX_INPUT_1_SOURCE); |
243 | ARIZONA_MIXER_ENUMS(LHPF2, ARIZONA_HPLP2MIX_INPUT_1_SOURCE); | 237 | ARIZONA_MIXER_ENUMS(LHPF2, ARIZONA_HPLP2MIX_INPUT_1_SOURCE); |
@@ -374,10 +368,6 @@ SND_SOC_DAPM_PGA("DRC1L", ARIZONA_DRC1_CTRL1, ARIZONA_DRC1L_ENA_SHIFT, 0, | |||
374 | NULL, 0), | 368 | NULL, 0), |
375 | SND_SOC_DAPM_PGA("DRC1R", ARIZONA_DRC1_CTRL1, ARIZONA_DRC1R_ENA_SHIFT, 0, | 369 | SND_SOC_DAPM_PGA("DRC1R", ARIZONA_DRC1_CTRL1, ARIZONA_DRC1R_ENA_SHIFT, 0, |
376 | NULL, 0), | 370 | NULL, 0), |
377 | SND_SOC_DAPM_PGA("DRC2L", ARIZONA_DRC2_CTRL1, ARIZONA_DRC2L_ENA_SHIFT, 0, | ||
378 | NULL, 0), | ||
379 | SND_SOC_DAPM_PGA("DRC2R", ARIZONA_DRC2_CTRL1, ARIZONA_DRC2R_ENA_SHIFT, 0, | ||
380 | NULL, 0), | ||
381 | 371 | ||
382 | SND_SOC_DAPM_PGA("LHPF1", ARIZONA_HPLPF1_1, ARIZONA_LHPF1_ENA_SHIFT, 0, | 372 | SND_SOC_DAPM_PGA("LHPF1", ARIZONA_HPLPF1_1, ARIZONA_LHPF1_ENA_SHIFT, 0, |
383 | NULL, 0), | 373 | NULL, 0), |
@@ -494,8 +484,6 @@ ARIZONA_MIXER_WIDGETS(EQ4, "EQ4"), | |||
494 | 484 | ||
495 | ARIZONA_MIXER_WIDGETS(DRC1L, "DRC1L"), | 485 | ARIZONA_MIXER_WIDGETS(DRC1L, "DRC1L"), |
496 | ARIZONA_MIXER_WIDGETS(DRC1R, "DRC1R"), | 486 | ARIZONA_MIXER_WIDGETS(DRC1R, "DRC1R"), |
497 | ARIZONA_MIXER_WIDGETS(DRC2L, "DRC2L"), | ||
498 | ARIZONA_MIXER_WIDGETS(DRC2R, "DRC2R"), | ||
499 | 487 | ||
500 | ARIZONA_MIXER_WIDGETS(LHPF1, "LHPF1"), | 488 | ARIZONA_MIXER_WIDGETS(LHPF1, "LHPF1"), |
501 | ARIZONA_MIXER_WIDGETS(LHPF2, "LHPF2"), | 489 | ARIZONA_MIXER_WIDGETS(LHPF2, "LHPF2"), |
@@ -582,8 +570,6 @@ SND_SOC_DAPM_OUTPUT("SPKDAT1R"), | |||
582 | { name, "EQ4", "EQ4" }, \ | 570 | { name, "EQ4", "EQ4" }, \ |
583 | { name, "DRC1L", "DRC1L" }, \ | 571 | { name, "DRC1L", "DRC1L" }, \ |
584 | { name, "DRC1R", "DRC1R" }, \ | 572 | { name, "DRC1R", "DRC1R" }, \ |
585 | { name, "DRC2L", "DRC2L" }, \ | ||
586 | { name, "DRC2R", "DRC2R" }, \ | ||
587 | { name, "LHPF1", "LHPF1" }, \ | 573 | { name, "LHPF1", "LHPF1" }, \ |
588 | { name, "LHPF2", "LHPF2" }, \ | 574 | { name, "LHPF2", "LHPF2" }, \ |
589 | { name, "LHPF3", "LHPF3" }, \ | 575 | { name, "LHPF3", "LHPF3" }, \ |
@@ -668,6 +654,15 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = { | |||
668 | { "AIF2 Capture", NULL, "SYSCLK" }, | 654 | { "AIF2 Capture", NULL, "SYSCLK" }, |
669 | { "AIF3 Capture", NULL, "SYSCLK" }, | 655 | { "AIF3 Capture", NULL, "SYSCLK" }, |
670 | 656 | ||
657 | { "IN1L PGA", NULL, "IN1L" }, | ||
658 | { "IN1R PGA", NULL, "IN1R" }, | ||
659 | |||
660 | { "IN2L PGA", NULL, "IN2L" }, | ||
661 | { "IN2R PGA", NULL, "IN2R" }, | ||
662 | |||
663 | { "IN3L PGA", NULL, "IN3L" }, | ||
664 | { "IN3R PGA", NULL, "IN3R" }, | ||
665 | |||
671 | ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"), | 666 | ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"), |
672 | ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"), | 667 | ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"), |
673 | ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"), | 668 | ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"), |
@@ -704,8 +699,6 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = { | |||
704 | 699 | ||
705 | ARIZONA_MIXER_ROUTES("DRC1L", "DRC1L"), | 700 | ARIZONA_MIXER_ROUTES("DRC1L", "DRC1L"), |
706 | ARIZONA_MIXER_ROUTES("DRC1R", "DRC1R"), | 701 | ARIZONA_MIXER_ROUTES("DRC1R", "DRC1R"), |
707 | ARIZONA_MIXER_ROUTES("DRC2L", "DRC2L"), | ||
708 | ARIZONA_MIXER_ROUTES("DRC2R", "DRC2R"), | ||
709 | 702 | ||
710 | ARIZONA_MIXER_ROUTES("LHPF1", "LHPF1"), | 703 | ARIZONA_MIXER_ROUTES("LHPF1", "LHPF1"), |
711 | ARIZONA_MIXER_ROUTES("LHPF2", "LHPF2"), | 704 | ARIZONA_MIXER_ROUTES("LHPF2", "LHPF2"), |
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 3db6e6e7a591..57c7d9c0aadb 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c | |||
@@ -685,6 +685,18 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = { | |||
685 | { "AIF2 Capture", NULL, "SYSCLK" }, | 685 | { "AIF2 Capture", NULL, "SYSCLK" }, |
686 | { "AIF3 Capture", NULL, "SYSCLK" }, | 686 | { "AIF3 Capture", NULL, "SYSCLK" }, |
687 | 687 | ||
688 | { "IN1L PGA", NULL, "IN1L" }, | ||
689 | { "IN1R PGA", NULL, "IN1R" }, | ||
690 | |||
691 | { "IN2L PGA", NULL, "IN2L" }, | ||
692 | { "IN2R PGA", NULL, "IN2R" }, | ||
693 | |||
694 | { "IN3L PGA", NULL, "IN3L" }, | ||
695 | { "IN3R PGA", NULL, "IN3R" }, | ||
696 | |||
697 | { "IN4L PGA", NULL, "IN4L" }, | ||
698 | { "IN4R PGA", NULL, "IN4R" }, | ||
699 | |||
688 | ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"), | 700 | ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"), |
689 | ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"), | 701 | ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"), |
690 | ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"), | 702 | ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"), |
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index aa9ce9dd7d8a..ce6720073798 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -3733,21 +3733,6 @@ static int wm8962_runtime_resume(struct device *dev) | |||
3733 | 3733 | ||
3734 | regcache_sync(wm8962->regmap); | 3734 | regcache_sync(wm8962->regmap); |
3735 | 3735 | ||
3736 | regmap_update_bits(wm8962->regmap, WM8962_ANTI_POP, | ||
3737 | WM8962_STARTUP_BIAS_ENA | WM8962_VMID_BUF_ENA, | ||
3738 | WM8962_STARTUP_BIAS_ENA | WM8962_VMID_BUF_ENA); | ||
3739 | |||
3740 | /* Bias enable at 2*50k for ramp */ | ||
3741 | regmap_update_bits(wm8962->regmap, WM8962_PWR_MGMT_1, | ||
3742 | WM8962_VMID_SEL_MASK | WM8962_BIAS_ENA, | ||
3743 | WM8962_BIAS_ENA | 0x180); | ||
3744 | |||
3745 | msleep(5); | ||
3746 | |||
3747 | /* VMID back to 2x250k for standby */ | ||
3748 | regmap_update_bits(wm8962->regmap, WM8962_PWR_MGMT_1, | ||
3749 | WM8962_VMID_SEL_MASK, 0x100); | ||
3750 | |||
3751 | return 0; | 3736 | return 0; |
3752 | } | 3737 | } |
3753 | 3738 | ||
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 890b582b40f3..2b2dadc54dac 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -4108,6 +4108,8 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) | |||
4108 | break; | 4108 | break; |
4109 | case WM8958: | 4109 | case WM8958: |
4110 | if (wm8994->revision < 1) { | 4110 | if (wm8994->revision < 1) { |
4111 | snd_soc_dapm_add_routes(dapm, wm8994_intercon, | ||
4112 | ARRAY_SIZE(wm8994_intercon)); | ||
4111 | snd_soc_dapm_add_routes(dapm, wm8994_revd_intercon, | 4113 | snd_soc_dapm_add_routes(dapm, wm8994_revd_intercon, |
4112 | ARRAY_SIZE(wm8994_revd_intercon)); | 4114 | ARRAY_SIZE(wm8994_revd_intercon)); |
4113 | snd_soc_dapm_add_routes(dapm, wm8994_lateclk_revd_intercon, | 4115 | snd_soc_dapm_add_routes(dapm, wm8994_lateclk_revd_intercon, |
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 6aa1bf8c6897..1992a6295a16 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
@@ -149,7 +149,7 @@ SOC_SINGLE("Treble Volume", AC97_MASTER_TONE, 0, 15, 1), | |||
149 | 149 | ||
150 | SOC_SINGLE("Capture Switch", AC97_REC_GAIN, 15, 1, 1), | 150 | SOC_SINGLE("Capture Switch", AC97_REC_GAIN, 15, 1, 1), |
151 | SOC_ENUM("Capture Volume Steps", wm9712_enum[6]), | 151 | SOC_ENUM("Capture Volume Steps", wm9712_enum[6]), |
152 | SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 1), | 152 | SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 0), |
153 | SOC_SINGLE("Capture ZC Switch", AC97_REC_GAIN, 7, 1, 0), | 153 | SOC_SINGLE("Capture ZC Switch", AC97_REC_GAIN, 7, 1, 0), |
154 | 154 | ||
155 | SOC_SINGLE_TLV("Mic 1 Volume", AC97_MIC, 8, 31, 1, main_tlv), | 155 | SOC_SINGLE_TLV("Mic 1 Volume", AC97_MIC, 8, 31, 1, main_tlv), |
@@ -273,7 +273,7 @@ SOC_DAPM_ENUM("Route", wm9712_enum[9]); | |||
273 | 273 | ||
274 | /* Mic select */ | 274 | /* Mic select */ |
275 | static const struct snd_kcontrol_new wm9712_mic_src_controls = | 275 | static const struct snd_kcontrol_new wm9712_mic_src_controls = |
276 | SOC_DAPM_ENUM("Route", wm9712_enum[7]); | 276 | SOC_DAPM_ENUM("Mic Source Select", wm9712_enum[7]); |
277 | 277 | ||
278 | /* diff select */ | 278 | /* diff select */ |
279 | static const struct snd_kcontrol_new wm9712_diff_sel_controls = | 279 | static const struct snd_kcontrol_new wm9712_diff_sel_controls = |
@@ -292,7 +292,9 @@ SND_SOC_DAPM_MUX("Left Capture Select", SND_SOC_NOPM, 0, 0, | |||
292 | &wm9712_capture_selectl_controls), | 292 | &wm9712_capture_selectl_controls), |
293 | SND_SOC_DAPM_MUX("Right Capture Select", SND_SOC_NOPM, 0, 0, | 293 | SND_SOC_DAPM_MUX("Right Capture Select", SND_SOC_NOPM, 0, 0, |
294 | &wm9712_capture_selectr_controls), | 294 | &wm9712_capture_selectr_controls), |
295 | SND_SOC_DAPM_MUX("Mic Select Source", SND_SOC_NOPM, 0, 0, | 295 | SND_SOC_DAPM_MUX("Left Mic Select Source", SND_SOC_NOPM, 0, 0, |
296 | &wm9712_mic_src_controls), | ||
297 | SND_SOC_DAPM_MUX("Right Mic Select Source", SND_SOC_NOPM, 0, 0, | ||
296 | &wm9712_mic_src_controls), | 298 | &wm9712_mic_src_controls), |
297 | SND_SOC_DAPM_MUX("Differential Source", SND_SOC_NOPM, 0, 0, | 299 | SND_SOC_DAPM_MUX("Differential Source", SND_SOC_NOPM, 0, 0, |
298 | &wm9712_diff_sel_controls), | 300 | &wm9712_diff_sel_controls), |
@@ -320,6 +322,7 @@ SND_SOC_DAPM_PGA("Out 3 PGA", AC97_INT_PAGING, 5, 1, NULL, 0), | |||
320 | SND_SOC_DAPM_PGA("Line PGA", AC97_INT_PAGING, 2, 1, NULL, 0), | 322 | SND_SOC_DAPM_PGA("Line PGA", AC97_INT_PAGING, 2, 1, NULL, 0), |
321 | SND_SOC_DAPM_PGA("Phone PGA", AC97_INT_PAGING, 1, 1, NULL, 0), | 323 | SND_SOC_DAPM_PGA("Phone PGA", AC97_INT_PAGING, 1, 1, NULL, 0), |
322 | SND_SOC_DAPM_PGA("Mic PGA", AC97_INT_PAGING, 0, 1, NULL, 0), | 324 | SND_SOC_DAPM_PGA("Mic PGA", AC97_INT_PAGING, 0, 1, NULL, 0), |
325 | SND_SOC_DAPM_PGA("Differential Mic", SND_SOC_NOPM, 0, 0, NULL, 0), | ||
323 | SND_SOC_DAPM_MICBIAS("Mic Bias", AC97_INT_PAGING, 10, 1), | 326 | SND_SOC_DAPM_MICBIAS("Mic Bias", AC97_INT_PAGING, 10, 1), |
324 | SND_SOC_DAPM_OUTPUT("MONOOUT"), | 327 | SND_SOC_DAPM_OUTPUT("MONOOUT"), |
325 | SND_SOC_DAPM_OUTPUT("HPOUTL"), | 328 | SND_SOC_DAPM_OUTPUT("HPOUTL"), |
@@ -380,6 +383,18 @@ static const struct snd_soc_dapm_route wm9712_audio_map[] = { | |||
380 | {"Mic PGA", NULL, "MIC1"}, | 383 | {"Mic PGA", NULL, "MIC1"}, |
381 | {"Mic PGA", NULL, "MIC2"}, | 384 | {"Mic PGA", NULL, "MIC2"}, |
382 | 385 | ||
386 | /* microphones */ | ||
387 | {"Differential Mic", NULL, "MIC1"}, | ||
388 | {"Differential Mic", NULL, "MIC2"}, | ||
389 | {"Left Mic Select Source", "Mic 1", "MIC1"}, | ||
390 | {"Left Mic Select Source", "Mic 2", "MIC2"}, | ||
391 | {"Left Mic Select Source", "Stereo", "MIC1"}, | ||
392 | {"Left Mic Select Source", "Differential", "Differential Mic"}, | ||
393 | {"Right Mic Select Source", "Mic 1", "MIC1"}, | ||
394 | {"Right Mic Select Source", "Mic 2", "MIC2"}, | ||
395 | {"Right Mic Select Source", "Stereo", "MIC2"}, | ||
396 | {"Right Mic Select Source", "Differential", "Differential Mic"}, | ||
397 | |||
383 | /* left capture selector */ | 398 | /* left capture selector */ |
384 | {"Left Capture Select", "Mic", "MIC1"}, | 399 | {"Left Capture Select", "Mic", "MIC1"}, |
385 | {"Left Capture Select", "Speaker Mixer", "Speaker Mixer"}, | 400 | {"Left Capture Select", "Speaker Mixer", "Speaker Mixer"}, |
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 7ecf19dfb07c..c3eae1d8e077 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c | |||
@@ -383,14 +383,20 @@ static void mcasp_start_tx(struct davinci_audio_dev *dev) | |||
383 | static void davinci_mcasp_start(struct davinci_audio_dev *dev, int stream) | 383 | static void davinci_mcasp_start(struct davinci_audio_dev *dev, int stream) |
384 | { | 384 | { |
385 | if (stream == SNDRV_PCM_STREAM_PLAYBACK) { | 385 | if (stream == SNDRV_PCM_STREAM_PLAYBACK) { |
386 | if (dev->txnumevt) /* enable FIFO */ | 386 | if (dev->txnumevt) { /* enable FIFO */ |
387 | mcasp_clr_bits(dev->base + DAVINCI_MCASP_WFIFOCTL, | ||
388 | FIFO_ENABLE); | ||
387 | mcasp_set_bits(dev->base + DAVINCI_MCASP_WFIFOCTL, | 389 | mcasp_set_bits(dev->base + DAVINCI_MCASP_WFIFOCTL, |
388 | FIFO_ENABLE); | 390 | FIFO_ENABLE); |
391 | } | ||
389 | mcasp_start_tx(dev); | 392 | mcasp_start_tx(dev); |
390 | } else { | 393 | } else { |
391 | if (dev->rxnumevt) /* enable FIFO */ | 394 | if (dev->rxnumevt) { /* enable FIFO */ |
395 | mcasp_clr_bits(dev->base + DAVINCI_MCASP_RFIFOCTL, | ||
396 | FIFO_ENABLE); | ||
392 | mcasp_set_bits(dev->base + DAVINCI_MCASP_RFIFOCTL, | 397 | mcasp_set_bits(dev->base + DAVINCI_MCASP_RFIFOCTL, |
393 | FIFO_ENABLE); | 398 | FIFO_ENABLE); |
399 | } | ||
394 | mcasp_start_rx(dev); | 400 | mcasp_start_rx(dev); |
395 | } | 401 | } |
396 | } | 402 | } |
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c index 3c520c46fa4a..7074ae689984 100644 --- a/sound/soc/fsl/imx-ssi.c +++ b/sound/soc/fsl/imx-ssi.c | |||
@@ -380,13 +380,14 @@ static int imx_ssi_dai_probe(struct snd_soc_dai *dai) | |||
380 | static struct snd_soc_dai_driver imx_ssi_dai = { | 380 | static struct snd_soc_dai_driver imx_ssi_dai = { |
381 | .probe = imx_ssi_dai_probe, | 381 | .probe = imx_ssi_dai_probe, |
382 | .playback = { | 382 | .playback = { |
383 | .channels_min = 1, | 383 | /* The SSI does not support monaural audio. */ |
384 | .channels_min = 2, | ||
384 | .channels_max = 2, | 385 | .channels_max = 2, |
385 | .rates = SNDRV_PCM_RATE_8000_96000, | 386 | .rates = SNDRV_PCM_RATE_8000_96000, |
386 | .formats = SNDRV_PCM_FMTBIT_S16_LE, | 387 | .formats = SNDRV_PCM_FMTBIT_S16_LE, |
387 | }, | 388 | }, |
388 | .capture = { | 389 | .capture = { |
389 | .channels_min = 1, | 390 | .channels_min = 2, |
390 | .channels_max = 2, | 391 | .channels_max = 2, |
391 | .rates = SNDRV_PCM_RATE_8000_96000, | 392 | .rates = SNDRV_PCM_RATE_8000_96000, |
392 | .formats = SNDRV_PCM_FMTBIT_S16_LE, | 393 | .formats = SNDRV_PCM_FMTBIT_S16_LE, |
diff --git a/sound/soc/mxs/Kconfig b/sound/soc/mxs/Kconfig index 99a997f19bb9..b6fa77678d97 100644 --- a/sound/soc/mxs/Kconfig +++ b/sound/soc/mxs/Kconfig | |||
@@ -10,7 +10,7 @@ menuconfig SND_MXS_SOC | |||
10 | if SND_MXS_SOC | 10 | if SND_MXS_SOC |
11 | 11 | ||
12 | config SND_SOC_MXS_SGTL5000 | 12 | config SND_SOC_MXS_SGTL5000 |
13 | tristate "SoC Audio support for i.MX boards with sgtl5000" | 13 | tristate "SoC Audio support for MXS boards with sgtl5000" |
14 | depends on I2C | 14 | depends on I2C |
15 | select SND_SOC_SGTL5000 | 15 | select SND_SOC_SGTL5000 |
16 | help | 16 | help |
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c index 6afbc26cef70..bc06175e6367 100644 --- a/sound/soc/omap/mcbsp.c +++ b/sound/soc/omap/mcbsp.c | |||
@@ -762,37 +762,6 @@ int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id) | |||
762 | 762 | ||
763 | } | 763 | } |
764 | 764 | ||
765 | int omap_mcbsp_6pin_src_mux(struct omap_mcbsp *mcbsp, u8 mux) | ||
766 | { | ||
767 | const char *signal, *src; | ||
768 | |||
769 | if (mcbsp->pdata->mux_signal) | ||
770 | return -EINVAL; | ||
771 | |||
772 | switch (mux) { | ||
773 | case CLKR_SRC_CLKR: | ||
774 | signal = "clkr"; | ||
775 | src = "clkr"; | ||
776 | break; | ||
777 | case CLKR_SRC_CLKX: | ||
778 | signal = "clkr"; | ||
779 | src = "clkx"; | ||
780 | break; | ||
781 | case FSR_SRC_FSR: | ||
782 | signal = "fsr"; | ||
783 | src = "fsr"; | ||
784 | break; | ||
785 | case FSR_SRC_FSX: | ||
786 | signal = "fsr"; | ||
787 | src = "fsx"; | ||
788 | break; | ||
789 | default: | ||
790 | return -EINVAL; | ||
791 | } | ||
792 | |||
793 | return mcbsp->pdata->mux_signal(mcbsp->dev, signal, src); | ||
794 | } | ||
795 | |||
796 | #define max_thres(m) (mcbsp->pdata->buffer_size) | 765 | #define max_thres(m) (mcbsp->pdata->buffer_size) |
797 | #define valid_threshold(m, val) ((val) <= max_thres(m)) | 766 | #define valid_threshold(m, val) ((val) <= max_thres(m)) |
798 | #define THRESHOLD_PROP_BUILDER(prop) \ | 767 | #define THRESHOLD_PROP_BUILDER(prop) \ |
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index b7b2a1f91425..89b064650f14 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <sound/pcm_params.h> | 20 | #include <sound/pcm_params.h> |
21 | 21 | ||
22 | #include <plat/audio.h> | 22 | #include <plat/audio.h> |
23 | #include <plat/dma.h> | 23 | #include <mach/dma.h> |
24 | 24 | ||
25 | #include "dma.h" | 25 | #include "dma.h" |
26 | #include "pcm.h" | 26 | #include "pcm.h" |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index c7a00fd8cc66..b95d1fb388a1 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -826,7 +826,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num) | |||
826 | } | 826 | } |
827 | 827 | ||
828 | if (!rtd->cpu_dai) { | 828 | if (!rtd->cpu_dai) { |
829 | dev_dbg(card->dev, "CPU DAI %s not registered\n", | 829 | dev_err(card->dev, "CPU DAI %s not registered\n", |
830 | dai_link->cpu_dai_name); | 830 | dai_link->cpu_dai_name); |
831 | return -EPROBE_DEFER; | 831 | return -EPROBE_DEFER; |
832 | } | 832 | } |
@@ -857,14 +857,14 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num) | |||
857 | } | 857 | } |
858 | 858 | ||
859 | if (!rtd->codec_dai) { | 859 | if (!rtd->codec_dai) { |
860 | dev_dbg(card->dev, "CODEC DAI %s not registered\n", | 860 | dev_err(card->dev, "CODEC DAI %s not registered\n", |
861 | dai_link->codec_dai_name); | 861 | dai_link->codec_dai_name); |
862 | return -EPROBE_DEFER; | 862 | return -EPROBE_DEFER; |
863 | } | 863 | } |
864 | } | 864 | } |
865 | 865 | ||
866 | if (!rtd->codec) { | 866 | if (!rtd->codec) { |
867 | dev_dbg(card->dev, "CODEC %s not registered\n", | 867 | dev_err(card->dev, "CODEC %s not registered\n", |
868 | dai_link->codec_name); | 868 | dai_link->codec_name); |
869 | return -EPROBE_DEFER; | 869 | return -EPROBE_DEFER; |
870 | } | 870 | } |
@@ -888,7 +888,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num) | |||
888 | rtd->platform = platform; | 888 | rtd->platform = platform; |
889 | } | 889 | } |
890 | if (!rtd->platform) { | 890 | if (!rtd->platform) { |
891 | dev_dbg(card->dev, "platform %s not registered\n", | 891 | dev_err(card->dev, "platform %s not registered\n", |
892 | dai_link->platform_name); | 892 | dai_link->platform_name); |
893 | return -EPROBE_DEFER; | 893 | return -EPROBE_DEFER; |
894 | } | 894 | } |
@@ -1492,6 +1492,8 @@ static int soc_check_aux_dev(struct snd_soc_card *card, int num) | |||
1492 | return 0; | 1492 | return 0; |
1493 | } | 1493 | } |
1494 | 1494 | ||
1495 | dev_err(card->dev, "%s not registered\n", aux_dev->codec_name); | ||
1496 | |||
1495 | return -EPROBE_DEFER; | 1497 | return -EPROBE_DEFER; |
1496 | } | 1498 | } |
1497 | 1499 | ||
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 2ca3c734a288..fa0fd8ddae90 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c | |||
@@ -98,7 +98,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) | |||
98 | } | 98 | } |
99 | 99 | ||
100 | /* Report before the DAPM sync to help users updating micbias status */ | 100 | /* Report before the DAPM sync to help users updating micbias status */ |
101 | blocking_notifier_call_chain(&jack->notifier, status, jack); | 101 | blocking_notifier_call_chain(&jack->notifier, jack->status, jack); |
102 | 102 | ||
103 | snd_soc_dapm_sync(dapm); | 103 | snd_soc_dapm_sync(dapm); |
104 | 104 | ||
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index 0f647d22cb4a..c41181202688 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c | |||
@@ -821,10 +821,6 @@ int snd_usb_endpoint_start(struct snd_usb_endpoint *ep) | |||
821 | if (++ep->use_count != 1) | 821 | if (++ep->use_count != 1) |
822 | return 0; | 822 | return 0; |
823 | 823 | ||
824 | /* just to be sure */ | ||
825 | deactivate_urbs(ep, 0, 1); | ||
826 | wait_clear_urbs(ep); | ||
827 | |||
828 | ep->active_mask = 0; | 824 | ep->active_mask = 0; |
829 | ep->unlink_mask = 0; | 825 | ep->unlink_mask = 0; |
830 | ep->phase = 0; | 826 | ep->phase = 0; |
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index a1298f379428..62ec808ed792 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c | |||
@@ -544,6 +544,9 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream) | |||
544 | subs->last_frame_number = 0; | 544 | subs->last_frame_number = 0; |
545 | runtime->delay = 0; | 545 | runtime->delay = 0; |
546 | 546 | ||
547 | /* clear the pending deactivation on the target EPs */ | ||
548 | deactivate_endpoints(subs); | ||
549 | |||
547 | /* for playback, submit the URBs now; otherwise, the first hwptr_done | 550 | /* for playback, submit the URBs now; otherwise, the first hwptr_done |
548 | * updates for all URBs would happen at the same time when starting */ | 551 | * updates for all URBs would happen at the same time when starting */ |
549 | if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK) | 552 | if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK) |