diff options
| -rw-r--r-- | Documentation/sound/alsa/HD-Audio-Models.txt | 5 | ||||
| -rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 58 |
2 files changed, 62 insertions, 1 deletions
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index 85c362d8ea34..d1ab5e17eb13 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
| @@ -286,6 +286,11 @@ STAC92HD83* | |||
| 286 | hp-inv-led HP with broken BIOS for inverted mute LED | 286 | hp-inv-led HP with broken BIOS for inverted mute LED |
| 287 | auto BIOS setup (default) | 287 | auto BIOS setup (default) |
| 288 | 288 | ||
| 289 | STAC92HD95 | ||
| 290 | ========== | ||
| 291 | hp-led LED support for HP laptops | ||
| 292 | hp-bass Bass HPF setup for HP Spectre 13 | ||
| 293 | |||
| 289 | STAC9872 | 294 | STAC9872 |
| 290 | ======== | 295 | ======== |
| 291 | vaio VAIO laptop without SPDIF | 296 | vaio VAIO laptop without SPDIF |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 7f40a150899c..3744ea4e843d 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
| @@ -122,6 +122,12 @@ enum { | |||
| 122 | }; | 122 | }; |
| 123 | 123 | ||
| 124 | enum { | 124 | enum { |
| 125 | STAC_92HD95_HP_LED, | ||
| 126 | STAC_92HD95_HP_BASS, | ||
| 127 | STAC_92HD95_MODELS | ||
| 128 | }; | ||
| 129 | |||
| 130 | enum { | ||
| 125 | STAC_925x_REF, | 131 | STAC_925x_REF, |
| 126 | STAC_M1, | 132 | STAC_M1, |
| 127 | STAC_M1_2, | 133 | STAC_M1_2, |
| @@ -4128,6 +4134,48 @@ static const struct snd_pci_quirk stac9205_fixup_tbl[] = { | |||
| 4128 | {} /* terminator */ | 4134 | {} /* terminator */ |
| 4129 | }; | 4135 | }; |
| 4130 | 4136 | ||
| 4137 | static void stac92hd95_fixup_hp_led(struct hda_codec *codec, | ||
| 4138 | const struct hda_fixup *fix, int action) | ||
| 4139 | { | ||
| 4140 | struct sigmatel_spec *spec = codec->spec; | ||
| 4141 | |||
| 4142 | if (action != HDA_FIXUP_ACT_PRE_PROBE) | ||
| 4143 | return; | ||
| 4144 | |||
| 4145 | if (find_mute_led_cfg(codec, spec->default_polarity)) | ||
| 4146 | codec_dbg(codec, "mute LED gpio %d polarity %d\n", | ||
| 4147 | spec->gpio_led, | ||
| 4148 | spec->gpio_led_polarity); | ||
| 4149 | } | ||
| 4150 | |||
| 4151 | static const struct hda_fixup stac92hd95_fixups[] = { | ||
| 4152 | [STAC_92HD95_HP_LED] = { | ||
| 4153 | .type = HDA_FIXUP_FUNC, | ||
| 4154 | .v.func = stac92hd95_fixup_hp_led, | ||
| 4155 | }, | ||
| 4156 | [STAC_92HD95_HP_BASS] = { | ||
| 4157 | .type = HDA_FIXUP_VERBS, | ||
| 4158 | .v.verbs = (const struct hda_verb[]) { | ||
| 4159 | {0x1a, 0x795, 0x00}, /* HPF to 100Hz */ | ||
| 4160 | {} | ||
| 4161 | }, | ||
| 4162 | .chained = true, | ||
| 4163 | .chain_id = STAC_92HD95_HP_LED, | ||
| 4164 | }, | ||
| 4165 | }; | ||
| 4166 | |||
| 4167 | static const struct snd_pci_quirk stac92hd95_fixup_tbl[] = { | ||
| 4168 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1911, "HP Spectre 13", STAC_92HD95_HP_BASS), | ||
| 4169 | {} /* terminator */ | ||
| 4170 | }; | ||
| 4171 | |||
| 4172 | static const struct hda_model_fixup stac92hd95_models[] = { | ||
| 4173 | { .id = STAC_92HD95_HP_LED, .name = "hp-led" }, | ||
| 4174 | { .id = STAC_92HD95_HP_BASS, .name = "hp-bass" }, | ||
| 4175 | {} | ||
| 4176 | }; | ||
| 4177 | |||
| 4178 | |||
| 4131 | static int stac_parse_auto_config(struct hda_codec *codec) | 4179 | static int stac_parse_auto_config(struct hda_codec *codec) |
| 4132 | { | 4180 | { |
| 4133 | struct sigmatel_spec *spec = codec->spec; | 4181 | struct sigmatel_spec *spec = codec->spec; |
| @@ -4580,10 +4628,16 @@ static int patch_stac92hd95(struct hda_codec *codec) | |||
| 4580 | spec->gen.beep_nid = 0x19; /* digital beep */ | 4628 | spec->gen.beep_nid = 0x19; /* digital beep */ |
| 4581 | spec->pwr_nids = stac92hd95_pwr_nids; | 4629 | spec->pwr_nids = stac92hd95_pwr_nids; |
| 4582 | spec->num_pwrs = ARRAY_SIZE(stac92hd95_pwr_nids); | 4630 | spec->num_pwrs = ARRAY_SIZE(stac92hd95_pwr_nids); |
| 4583 | spec->default_polarity = -1; /* no default cfg */ | 4631 | spec->default_polarity = 0; |
| 4584 | 4632 | ||
| 4585 | codec->patch_ops = stac_patch_ops; | 4633 | codec->patch_ops = stac_patch_ops; |
| 4586 | 4634 | ||
| 4635 | snd_hda_pick_fixup(codec, stac92hd95_models, stac92hd95_fixup_tbl, | ||
| 4636 | stac92hd95_fixups); | ||
| 4637 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); | ||
| 4638 | |||
| 4639 | stac_setup_gpio(codec); | ||
| 4640 | |||
| 4587 | err = stac_parse_auto_config(codec); | 4641 | err = stac_parse_auto_config(codec); |
| 4588 | if (err < 0) { | 4642 | if (err < 0) { |
| 4589 | stac_free(codec); | 4643 | stac_free(codec); |
| @@ -4592,6 +4646,8 @@ static int patch_stac92hd95(struct hda_codec *codec) | |||
| 4592 | 4646 | ||
| 4593 | codec->proc_widget_hook = stac92hd_proc_hook; | 4647 | codec->proc_widget_hook = stac92hd_proc_hook; |
| 4594 | 4648 | ||
| 4649 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); | ||
| 4650 | |||
| 4595 | return 0; | 4651 | return 0; |
| 4596 | } | 4652 | } |
| 4597 | 4653 | ||
