aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-06-08 08:48:49 -0400
committerJaroslav Kysela <perex@suse.cz>2005-06-22 06:28:30 -0400
commit41e41f1f3495c6a7443977d2842d6911e3dcf31c (patch)
treec5a85192c5381f45a76abb7f3700c120fccb5974 /sound
parentead9b7c39984f509dc42d81200109c01a0b689c2 (diff)
[ALSA] Fix the analog loopback volumes of ALC codecs
HDA Codec driver Fix the analog loopback volumes of ALC codecs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c122
1 files changed, 97 insertions, 25 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index ee1c4cd7f00a..0ca5151908d7 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -78,6 +78,8 @@ struct alc_spec {
78 78
79 /* PCM information */ 79 /* PCM information */
80 struct hda_pcm pcm_rec[2]; 80 struct hda_pcm pcm_rec[2];
81
82 struct semaphore bind_mutex;
81}; 83};
82 84
83/* DAC/ADC assignment */ 85/* DAC/ADC assignment */
@@ -363,6 +365,73 @@ static int alc880_ch_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
363 365
364 366
365/* 367/*
368 * bound volume controls
369 *
370 * bind multiple volumes (# indices, from 0)
371 */
372
373#define AMP_VAL_IDX_SHIFT 19
374#define AMP_VAL_IDX_MASK (0x0f<<19)
375
376static int alc_bind_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
377{
378 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
379 struct alc_spec *spec = codec->spec;
380 unsigned long pval;
381
382 down(&spec->bind_mutex);
383 pval = kcontrol->private_value;
384 kcontrol->private_value = pval & ~AMP_VAL_IDX_MASK; /* index 0 */
385 snd_hda_mixer_amp_volume_info(kcontrol, uinfo);
386 kcontrol->private_value = pval;
387 up(&spec->bind_mutex);
388 return 0;
389}
390
391static int alc_bind_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
392{
393 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
394 struct alc_spec *spec = codec->spec;
395 unsigned long pval;
396
397 down(&spec->bind_mutex);
398 pval = kcontrol->private_value;
399 kcontrol->private_value = pval & ~AMP_VAL_IDX_MASK; /* index 0 */
400 snd_hda_mixer_amp_volume_get(kcontrol, ucontrol);
401 kcontrol->private_value = pval;
402 up(&spec->bind_mutex);
403 return 0;
404}
405
406static int alc_bind_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
407{
408 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
409 struct alc_spec *spec = codec->spec;
410 unsigned long pval;
411 int i, indices, change = 0;
412
413 down(&spec->bind_mutex);
414 pval = kcontrol->private_value;
415 indices = (pval & AMP_VAL_IDX_MASK) >> AMP_VAL_IDX_SHIFT;
416 for (i = 0; i < indices; i++) {
417 kcontrol->private_value = (pval & ~AMP_VAL_IDX_MASK) | (i << AMP_VAL_IDX_SHIFT);
418 change |= snd_hda_mixer_amp_volume_put(kcontrol, ucontrol);
419 }
420 kcontrol->private_value = pval;
421 up(&spec->bind_mutex);
422 return change;
423}
424
425#define ALC_BIND_VOL_MONO(xname, nid, channel, indices, direction) \
426 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = 0, \
427 .info = alc_bind_vol_info, \
428 .get = alc_bind_vol_get, \
429 .put = alc_bind_vol_put, \
430 .private_value = HDA_COMPOSE_AMP_VAL(nid, channel, indices, direction) }
431
432#define ALC_BIND_VOL(xname,nid,indices,dir) ALC_BIND_VOL_MONO(xname,nid,3,indices,dir)
433
434/*
366 */ 435 */
367 436
368/* 3-stack mode 437/* 3-stack mode
@@ -370,12 +439,12 @@ static int alc880_ch_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
370 * HP=0x19 439 * HP=0x19
371 */ 440 */
372static snd_kcontrol_new_t alc880_base_mixer[] = { 441static snd_kcontrol_new_t alc880_base_mixer[] = {
373 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 442 ALC_BIND_VOL("Front Playback Volume", 0x0c, 2, HDA_OUTPUT),
374 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), 443 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT),
375 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0f, 0x0, HDA_OUTPUT), 444 ALC_BIND_VOL("Surround Playback Volume", 0x0f, 2, HDA_OUTPUT),
376 HDA_CODEC_MUTE("Surround Playback Switch", 0x1a, 0x0, HDA_OUTPUT), 445 HDA_CODEC_MUTE("Surround Playback Switch", 0x1a, 0x0, HDA_OUTPUT),
377 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), 446 ALC_BIND_VOL_MONO("Center Playback Volume", 0x0e, 1, 2, HDA_OUTPUT),
378 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), 447 ALC_BIND_VOL_MONO("LFE Playback Volume", 0x0e, 2, 2, HDA_OUTPUT),
379 HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x18, 1, 0x0, HDA_OUTPUT), 448 HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x18, 1, 0x0, HDA_OUTPUT),
380 HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x18, 2, 0x0, HDA_OUTPUT), 449 HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x18, 2, 0x0, HDA_OUTPUT),
381 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), 450 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
@@ -388,7 +457,7 @@ static snd_kcontrol_new_t alc880_base_mixer[] = {
388 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x3, HDA_INPUT), 457 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x3, HDA_INPUT),
389 HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), 458 HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT),
390 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), 459 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
391 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 460 ALC_BIND_VOL("Headphone Playback Volume", 0x0d, 2, HDA_OUTPUT),
392 HDA_CODEC_MUTE("Headphone Playback Switch", 0x19, 0x0, HDA_OUTPUT), 461 HDA_CODEC_MUTE("Headphone Playback Switch", 0x19, 0x0, HDA_OUTPUT),
393 /* We don't use NID 0x07 - see above */ 462 /* We don't use NID 0x07 - see above */
394 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), 463 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
@@ -423,15 +492,15 @@ static snd_kcontrol_new_t alc880_base_mixer[] = {
423 * Line-In/Side=0x1a, Mic=0x18, F-Mic=0x1b, HP=0x19 492 * Line-In/Side=0x1a, Mic=0x18, F-Mic=0x1b, HP=0x19
424 */ 493 */
425static snd_kcontrol_new_t alc880_five_stack_mixer[] = { 494static snd_kcontrol_new_t alc880_five_stack_mixer[] = {
426 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 495 ALC_BIND_VOL("Front Playback Volume", 0x0c, 2, HDA_OUTPUT),
427 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), 496 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT),
428 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0f, 0x0, HDA_OUTPUT), 497 ALC_BIND_VOL("Surround Playback Volume", 0x0f, 2, HDA_OUTPUT),
429 HDA_CODEC_MUTE("Surround Playback Switch", 0x17, 0x0, HDA_OUTPUT), 498 HDA_CODEC_MUTE("Surround Playback Switch", 0x17, 0x0, HDA_OUTPUT),
430 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), 499 ALC_BIND_VOL_MONO("Center Playback Volume", 0x0e, 1, 2, HDA_OUTPUT),
431 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), 500 ALC_BIND_VOL_MONO("LFE Playback Volume", 0x0e, 2, 2, HDA_OUTPUT),
432 HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x16, 1, 0x0, HDA_OUTPUT), 501 HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x16, 1, 0x0, HDA_OUTPUT),
433 HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT), 502 HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT),
434 HDA_CODEC_VOLUME("Side Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 503 ALC_BIND_VOL("Side Playback Volume", 0x0d, 2, HDA_OUTPUT),
435 HDA_CODEC_MUTE("Side Playback Switch", 0x1a, 0x0, HDA_OUTPUT), 504 HDA_CODEC_MUTE("Side Playback Switch", 0x1a, 0x0, HDA_OUTPUT),
436 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), 505 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
437 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), 506 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
@@ -443,7 +512,7 @@ static snd_kcontrol_new_t alc880_five_stack_mixer[] = {
443 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x3, HDA_INPUT), 512 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x3, HDA_INPUT),
444 HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), 513 HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT),
445 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), 514 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
446 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 515 /* HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT), */
447 HDA_CODEC_MUTE("Headphone Playback Switch", 0x19, 0x0, HDA_OUTPUT), 516 HDA_CODEC_MUTE("Headphone Playback Switch", 0x19, 0x0, HDA_OUTPUT),
448 /* We don't use NID 0x07 - see above */ 517 /* We don't use NID 0x07 - see above */
449 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), 518 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
@@ -506,9 +575,9 @@ static snd_kcontrol_new_t alc880_w810_base_mixer[] = {
506}; 575};
507 576
508static snd_kcontrol_new_t alc880_z71v_mixer[] = { 577static snd_kcontrol_new_t alc880_z71v_mixer[] = {
509 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 578 ALC_BIND_VOL("Front Playback Volume", 0x0c, 2, HDA_OUTPUT),
510 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), 579 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT),
511 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 580 ALC_BIND_VOL("Headphone Playback Volume", 0x0d, 2, HDA_OUTPUT),
512 HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), 581 HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
513 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), 582 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
514 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), 583 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
@@ -1215,10 +1284,10 @@ static int alc_test_pin_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
1215 } 1284 }
1216 1285
1217static snd_kcontrol_new_t alc880_test_mixer[] = { 1286static snd_kcontrol_new_t alc880_test_mixer[] = {
1218 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 1287 ALC_BIND_VOL("Front Playback Volume", 0x0c, 2, HDA_OUTPUT),
1219 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 1288 ALC_BIND_VOL("Surround Playback Volume", 0x0d, 2, HDA_OUTPUT),
1220 HDA_CODEC_VOLUME("CLFE Playback Volume", 0x0e, 0x0, HDA_OUTPUT), 1289 ALC_BIND_VOL("CLFE Playback Volume", 0x0e, 2, HDA_OUTPUT),
1221 HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), 1290 ALC_BIND_VOL("Side Playback Volume", 0x0f, 2, HDA_OUTPUT),
1222 PIN_CTL_TEST("Front Pin Mode", 0x14), 1291 PIN_CTL_TEST("Front Pin Mode", 0x14),
1223 PIN_CTL_TEST("Surround Pin Mode", 0x15), 1292 PIN_CTL_TEST("Surround Pin Mode", 0x15),
1224 PIN_CTL_TEST("CLFE Pin Mode", 0x16), 1293 PIN_CTL_TEST("CLFE Pin Mode", 0x16),
@@ -1402,6 +1471,7 @@ static int patch_alc880(struct hda_codec *codec)
1402 if (spec == NULL) 1471 if (spec == NULL)
1403 return -ENOMEM; 1472 return -ENOMEM;
1404 1473
1474 init_MUTEX(&spec->bind_mutex);
1405 codec->spec = spec; 1475 codec->spec = spec;
1406 1476
1407 board_config = snd_hda_check_board_config(codec, alc880_cfg_tbl); 1477 board_config = snd_hda_check_board_config(codec, alc880_cfg_tbl);
@@ -1551,7 +1621,7 @@ static struct alc_channel_mode alc260_modes[1] = {
1551}; 1621};
1552 1622
1553snd_kcontrol_new_t alc260_base_mixer[] = { 1623snd_kcontrol_new_t alc260_base_mixer[] = {
1554 HDA_CODEC_VOLUME("Front Playback Volume", 0x08, 0x0, HDA_OUTPUT), 1624 ALC_BIND_VOL("Front Playback Volume", 0x08, 2, HDA_OUTPUT),
1555 /* use LINE2 for the output */ 1625 /* use LINE2 for the output */
1556 /* HDA_CODEC_MUTE("Front Playback Switch", 0x0f, 0x0, HDA_OUTPUT), */ 1626 /* HDA_CODEC_MUTE("Front Playback Switch", 0x0f, 0x0, HDA_OUTPUT), */
1557 HDA_CODEC_MUTE("Front Playback Switch", 0x15, 0x0, HDA_OUTPUT), 1627 HDA_CODEC_MUTE("Front Playback Switch", 0x15, 0x0, HDA_OUTPUT),
@@ -1565,9 +1635,9 @@ snd_kcontrol_new_t alc260_base_mixer[] = {
1565 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x07, 0x01, HDA_INPUT), 1635 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x07, 0x01, HDA_INPUT),
1566 HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x07, 0x05, HDA_INPUT), 1636 HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x07, 0x05, HDA_INPUT),
1567 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x07, 0x05, HDA_INPUT), 1637 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x07, 0x05, HDA_INPUT),
1568 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x09, 0x0, HDA_OUTPUT), 1638 ALC_BIND_VOL("Headphone Playback Volume", 0x09, 2, HDA_OUTPUT),
1569 HDA_CODEC_MUTE("Headphone Playback Switch", 0x10, 0x0, HDA_OUTPUT), 1639 HDA_CODEC_MUTE("Headphone Playback Switch", 0x10, 0x0, HDA_OUTPUT),
1570 HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), 1640 ALC_BIND_VOL_MONO("Mono Playback Volume", 0x0a, 1, 2, HDA_OUTPUT),
1571 HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x11, 1, 0x0, HDA_OUTPUT), 1641 HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x11, 1, 0x0, HDA_OUTPUT),
1572 HDA_CODEC_VOLUME("Capture Volume", 0x04, 0x0, HDA_INPUT), 1642 HDA_CODEC_VOLUME("Capture Volume", 0x04, 0x0, HDA_INPUT),
1573 HDA_CODEC_MUTE("Capture Switch", 0x04, 0x0, HDA_INPUT), 1643 HDA_CODEC_MUTE("Capture Switch", 0x04, 0x0, HDA_INPUT),
@@ -1660,6 +1730,7 @@ static int patch_alc260(struct hda_codec *codec)
1660 if (spec == NULL) 1730 if (spec == NULL)
1661 return -ENOMEM; 1731 return -ENOMEM;
1662 1732
1733 init_MUTEX(&spec->bind_mutex);
1663 codec->spec = spec; 1734 codec->spec = spec;
1664 1735
1665 spec->mixers[spec->num_mixers] = alc260_base_mixer; 1736 spec->mixers[spec->num_mixers] = alc260_base_mixer;
@@ -1757,15 +1828,15 @@ static int alc882_mux_enum_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u
1757 * Mic=0x18, Front Mic=0x19, Line-In=0x1a, HP=0x1b 1828 * Mic=0x18, Front Mic=0x19, Line-In=0x1a, HP=0x1b
1758 */ 1829 */
1759static snd_kcontrol_new_t alc882_base_mixer[] = { 1830static snd_kcontrol_new_t alc882_base_mixer[] = {
1760 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 1831 ALC_BIND_VOL("Front Playback Volume", 0x0c, 2, HDA_OUTPUT),
1761 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), 1832 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT),
1762 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 1833 ALC_BIND_VOL("Surround Playback Volume", 0x0d, 2, HDA_OUTPUT),
1763 HDA_CODEC_MUTE("Surround Playback Switch", 0x15, 0x0, HDA_OUTPUT), 1834 HDA_CODEC_MUTE("Surround Playback Switch", 0x15, 0x0, HDA_OUTPUT),
1764 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), 1835 ALC_BIND_VOL_MONO("Center Playback Volume", 0x0e, 1, 2, HDA_OUTPUT),
1765 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), 1836 ALC_BIND_VOL_MONO("LFE Playback Volume", 0x0e, 2, 2, HDA_OUTPUT),
1766 HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x16, 1, 0x0, HDA_OUTPUT), 1837 HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x16, 1, 0x0, HDA_OUTPUT),
1767 HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT), 1838 HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT),
1768 HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), 1839 ALC_BIND_VOL("Side Playback Volume", 0x0f, 2, HDA_OUTPUT),
1769 HDA_CODEC_MUTE("Side Playback Switch", 0x17, 0x0, HDA_OUTPUT), 1840 HDA_CODEC_MUTE("Side Playback Switch", 0x17, 0x0, HDA_OUTPUT),
1770 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), 1841 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
1771 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), 1842 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
@@ -1895,6 +1966,7 @@ static int patch_alc882(struct hda_codec *codec)
1895 if (spec == NULL) 1966 if (spec == NULL)
1896 return -ENOMEM; 1967 return -ENOMEM;
1897 1968
1969 init_MUTEX(&spec->bind_mutex);
1898 codec->spec = spec; 1970 codec->spec = spec;
1899 1971
1900 spec->mixers[spec->num_mixers] = alc882_base_mixer; 1972 spec->mixers[spec->num_mixers] = alc882_base_mixer;