aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorMatthew Ranostay <mranostay@embeddedalley.com>2008-03-14 03:46:51 -0400
committerTakashi Iwai <tiwai@suse.de>2008-04-24 06:00:24 -0400
commitd654a660355f9dc30d3a6bf1493d32363bde8570 (patch)
tree86a6a75decc6978a1bda3115573d8a145ce3ce24 /sound/pci/hda/patch_sigmatel.c
parent1bc1f30565b561bafc51725fce336aec59029437 (diff)
[ALSA] hda: 92HD73xxx distortion fix
Fixed issue on some laptops that if the Master mixer and DAC mixers are turned all the way up that will cause distortion. This is fixed by limiting the max volume with the volume knob nid. Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index bf6142f54539..b75bf3475653 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -534,6 +534,25 @@ static struct hda_verb stac92hd73xx_6ch_core_init[] = {
534 {} 534 {}
535}; 535};
536 536
537static struct hda_verb dell_eq_core_init[] = {
538 /* set master volume to max value without distortion
539 * and direct control */
540 { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xec},
541 /* setup audio connections */
542 { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00},
543 { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
544 { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x02},
545 /* setup adcs to point to mixer */
546 { 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b},
547 { 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b},
548 /* setup import muxs */
549 { 0x28, AC_VERB_SET_CONNECT_SEL, 0x01},
550 { 0x29, AC_VERB_SET_CONNECT_SEL, 0x01},
551 { 0x2a, AC_VERB_SET_CONNECT_SEL, 0x01},
552 { 0x2b, AC_VERB_SET_CONNECT_SEL, 0x00},
553 {}
554};
555
537static struct hda_verb dell_m6_core_init[] = { 556static struct hda_verb dell_m6_core_init[] = {
538 /* set master volume and direct control */ 557 /* set master volume and direct control */
539 { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, 558 { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
@@ -3460,17 +3479,19 @@ again:
3460 3479
3461 switch (spec->board_config) { 3480 switch (spec->board_config) {
3462 case STAC_DELL_M6: 3481 case STAC_DELL_M6:
3463 spec->init = dell_m6_core_init; 3482 spec->init = dell_eq_core_init;
3464 switch (codec->subsystem_id) { 3483 switch (codec->subsystem_id) {
3465 case 0x1028025e: /* Analog Mics */ 3484 case 0x1028025e: /* Analog Mics */
3466 case 0x1028025f: 3485 case 0x1028025f:
3467 stac92xx_set_config_reg(codec, 0x0b, 0x90A70170); 3486 stac92xx_set_config_reg(codec, 0x0b, 0x90A70170);
3468 spec->num_dmics = 0; 3487 spec->num_dmics = 0;
3469 break; 3488 break;
3470 case 0x10280254: /* Digital Mics */ 3489 case 0x10280271: /* Digital Mics */
3471 case 0x10280255:
3472 case 0x10280271:
3473 case 0x10280272: 3490 case 0x10280272:
3491 spec->init = dell_m6_core_init;
3492 /* fall-through */
3493 case 0x10280254:
3494 case 0x10280255:
3474 stac92xx_set_config_reg(codec, 0x13, 0x90A60160); 3495 stac92xx_set_config_reg(codec, 0x13, 0x90A60160);
3475 spec->num_dmics = 1; 3496 spec->num_dmics = 1;
3476 break; 3497 break;