summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_cirrus.c
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2014-07-22 12:09:34 (GMT)
committerTakashi Iwai <tiwai@suse.de>2014-07-22 12:26:50 (GMT)
commitf5662e1cbf3f0939a6e033a00c542be4a0c2edee (patch)
tree5838be80537428235822d74a665a8b9f35d2bbcc /sound/pci/hda/patch_cirrus.c
parent9dc12862da9d56ef4da646ba540c4f58b78738fc (diff)
downloadlinux-f5662e1cbf3f0939a6e033a00c542be4a0c2edee.tar.xz
ALSA: hda - Refactor quirk picking and change quirk priority
Previously, calling one quirk function first and another later would make the latter one take priority, this is now changed to make the former take priority. By adding two special values for fixup_id we can also get rid of the fixup_forced flag. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_cirrus.c')
-rw-r--r--sound/pci/hda/patch_cirrus.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index 387f0b5..3db724e 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -657,8 +657,10 @@ static void cs4208_fixup_mac(struct hda_codec *codec,
{
if (action != HDA_FIXUP_ACT_PRE_PROBE)
return;
+
+ codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
snd_hda_pick_fixup(codec, NULL, cs4208_mac_fixup_tbl, cs4208_fixups);
- if (codec->fixup_id < 0 || codec->fixup_id == CS4208_MAC_AUTO)
+ if (codec->fixup_id == HDA_FIXUP_ID_NOT_SET)
codec->fixup_id = CS4208_GPIO0; /* default fixup */
snd_hda_apply_fixup(codec, action);
}