diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 4a4e7b2..c9b0211 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -748,10 +748,24 @@ struct hda_codec *codec; struct delayed_work unsol_hp_work; + const struct snd_pci_quirk *quirk; #ifdef ENABLE_TUNING_CONTROLS long cur_ctl_vals[TUNING_CTLS_COUNT]; #endif +}; + +/* + * CA0132 quirks table + */ +enum { + QUIRK_NONE, + QUIRK_ALIENWARE, +}; + +static const struct snd_pci_quirk ca0132_quirks[] = { + SND_PCI_QUIRK(0x1028, 0x0685, "Alienware 15", QUIRK_ALIENWARE), + {} }; /* @@ -4653,6 +4667,7 @@ return -ENOMEM; codec->spec = spec; spec->codec = codec; + spec->quirk = snd_pci_quirk_lookup(codec->bus->pci, ca0132_quirks); spec->dsp_state = DSP_DOWNLOAD_INIT; spec->num_mixers = 1; @@ -4670,6 +4685,12 @@ ca0132_config(codec); + /* Apply detected quirks */ + if (spec->quirk->value == QUIRK_ALIENWARE) { + codec_dbg(codec, "QUIRK_ALIENWARE applied.\n\n"); + spec->out_pins[1] = 0x0f; + } + err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, NULL); if (err < 0) return err;