ALSA: hda - Add fixup name lookup for CX5051 and 5066 codecs
authorTakashi Iwai <tiwai@suse.de>
Mon, 27 Jan 2014 15:24:00 +0000 (16:24 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 30 Jan 2014 11:39:11 +0000 (12:39 +0100)
Like other codecs, apply a specific fixup given by a model string.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_conexant.c

index 4e0ec146553dadebda31c7ea996a4583dc296764..b103908c63d7d041d07e9eded38758c91152f488 100644 (file)
@@ -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),
@@ -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)
  */
@@ -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;
        }