ALSA: hda: make a STAC_DELL_EQ option

Add support for explicitly enabling the EQ distortion hack for
systems without software biquad support.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by Matthew Ranostay and committed by Takashi Iwai 6b3ab21e 69e50282

+10 -6
+10 -6
sound/pci/hda/patch_sigmatel.c
··· 69 enum { 70 STAC_92HD73XX_REF, 71 STAC_DELL_M6, 72 STAC_92HD73XX_MODELS 73 }; 74 ··· 774 }; 775 776 static struct hda_verb dell_m6_core_init[] = { 777 - /* set master volume to max value without distortion 778 - * and direct control */ 779 - { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xec}, 780 /* setup audio connections */ 781 { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00}, 782 { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, ··· 1599 static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = { 1600 [STAC_92HD73XX_REF] = ref92hd73xx_pin_configs, 1601 [STAC_DELL_M6] = dell_m6_pin_configs, 1602 }; 1603 1604 static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = { 1605 [STAC_92HD73XX_REF] = "ref", 1606 [STAC_DELL_M6] = "dell-m6", 1607 }; 1608 1609 static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { ··· 4132 sizeof(stac92hd73xx_dmux)); 4133 4134 switch (spec->board_config) { 4135 - case STAC_DELL_M6: 4136 spec->init = dell_eq_core_init; 4137 spec->num_smuxes = 0; 4138 spec->mixer = &stac92hd73xx_6ch_mixer[DELL_M6_MIXER]; 4139 spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP]; 4140 spec->num_amps = 1; 4141 switch (codec->subsystem_id) { 4142 case 0x1028025e: /* Analog Mics */ 4143 case 0x1028025f: ··· 4152 break; 4153 case 0x10280271: /* Digital Mics */ 4154 case 0x10280272: 4155 - spec->init = dell_m6_core_init; 4156 - /* fall-through */ 4157 case 0x10280254: 4158 case 0x10280255: 4159 stac92xx_set_config_reg(codec, 0x13, 0x90A60160);
··· 69 enum { 70 STAC_92HD73XX_REF, 71 STAC_DELL_M6, 72 + STAC_DELL_EQ, 73 STAC_92HD73XX_MODELS 74 }; 75 ··· 773 }; 774 775 static struct hda_verb dell_m6_core_init[] = { 776 + { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, 777 /* setup audio connections */ 778 { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00}, 779 { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, ··· 1600 static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = { 1601 [STAC_92HD73XX_REF] = ref92hd73xx_pin_configs, 1602 [STAC_DELL_M6] = dell_m6_pin_configs, 1603 + [STAC_DELL_EQ] = dell_m6_pin_configs, 1604 }; 1605 1606 static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = { 1607 [STAC_92HD73XX_REF] = "ref", 1608 [STAC_DELL_M6] = "dell-m6", 1609 + [STAC_DELL_EQ] = "dell-eq", 1610 }; 1611 1612 static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { ··· 4131 sizeof(stac92hd73xx_dmux)); 4132 4133 switch (spec->board_config) { 4134 + case STAC_DELL_EQ: 4135 spec->init = dell_eq_core_init; 4136 + /* fallthru */ 4137 + case STAC_DELL_M6: 4138 spec->num_smuxes = 0; 4139 spec->mixer = &stac92hd73xx_6ch_mixer[DELL_M6_MIXER]; 4140 spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP]; 4141 spec->num_amps = 1; 4142 + 4143 + if (!spec->init) 4144 + spec->init = dell_m6_core_init; 4145 switch (codec->subsystem_id) { 4146 case 0x1028025e: /* Analog Mics */ 4147 case 0x1028025f: ··· 4146 break; 4147 case 0x10280271: /* Digital Mics */ 4148 case 0x10280272: 4149 case 0x10280254: 4150 case 0x10280255: 4151 stac92xx_set_config_reg(codec, 0x13, 0x90A60160);