Skip to content

Commit

Permalink
ALSA: hda - Add fixup name lookup for CX5051 and 5066 codecs
Browse files Browse the repository at this point in the history
Like other codecs, apply a specific fixup given by a model string.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jan 30, 2014
1 parent e7729a4 commit a2dd933
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions sound/pci/hda/patch_conexant.c
Original file line number Diff line number Diff line change
Expand Up @@ -3407,6 +3407,11 @@ static const struct snd_pci_quirk cxt5051_fixups[] = {
{}
};

static const struct hda_model_fixup cxt5051_fixup_models[] = {
{ .id = CXT_PINCFG_LENOVO_X200, .name = "lenovo-x200" },
{}
};

static const struct snd_pci_quirk cxt5066_fixups[] = {
SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC),
SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_GPIO1),
Expand All @@ -3427,6 +3432,16 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
{}
};

static const struct hda_model_fixup cxt5066_fixup_models[] = {
{ .id = CXT_FIXUP_STEREO_DMIC, .name = "stereo-dmic" },
{ .id = CXT_FIXUP_GPIO1, .name = "gpio1" },
{ .id = CXT_FIXUP_HEADPHONE_MIC_PIN, .name = "headphone-mic-pin" },
{ .id = CXT_PINCFG_LENOVO_TP410, .name = "tp410" },
{ .id = CXT_FIXUP_THINKPAD_ACPI, .name = "thinkpad" },
{ .id = CXT_PINCFG_LEMOTE_A1004, .name = "lemote-a1004" },
{}
};

/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches
* can be created (bko#42825)
*/
Expand Down Expand Up @@ -3474,11 +3489,13 @@ static int patch_conexant_auto(struct hda_codec *codec)
case 0x14f15051:
add_cx5051_fake_mutes(codec);
codec->pin_amp_workaround = 1;
snd_hda_pick_fixup(codec, NULL, cxt5051_fixups, cxt_fixups);
snd_hda_pick_fixup(codec, cxt5051_fixup_models,
cxt5051_fixups, cxt_fixups);
break;
default:
codec->pin_amp_workaround = 1;
snd_hda_pick_fixup(codec, NULL, cxt5066_fixups, cxt_fixups);
snd_hda_pick_fixup(codec, cxt5066_fixup_models,
cxt5066_fixups, cxt_fixups);
break;
}

Expand Down

0 comments on commit a2dd933

Please sign in to comment.