Commit c21c8cf7 authored by David Henningsson's avatar David Henningsson Committed by Takashi Iwai

ALSA: hda - Add fixup_forced flag

The "fixup_forced" flag will indicate whether a specific fixup
(or nofixup) has been set by the user, to override the driver's
default.
This flag will help future patches.
Signed-off-by: default avatarDavid Henningsson <david.henningsson@canonical.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a860d95f
...@@ -852,15 +852,17 @@ void snd_hda_pick_fixup(struct hda_codec *codec, ...@@ -852,15 +852,17 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
if (codec->modelname && !strcmp(codec->modelname, "nofixup")) { if (codec->modelname && !strcmp(codec->modelname, "nofixup")) {
codec->fixup_list = NULL; codec->fixup_list = NULL;
codec->fixup_id = -1; codec->fixup_id = -1;
codec->fixup_forced = 1;
return; return;
} }
if (codec->modelname && models) { if (codec->modelname && models) {
while (models->name) { while (models->name) {
if (!strcmp(codec->modelname, models->name)) { if (!strcmp(codec->modelname, models->name)) {
id = models->id; codec->fixup_id = models->id;
name = models->name; codec->fixup_name = models->name;
break; codec->fixup_forced = 1;
return;
} }
models++; models++;
} }
...@@ -889,6 +891,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec, ...@@ -889,6 +891,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
} }
} }
codec->fixup_forced = 0;
codec->fixup_id = id; codec->fixup_id = id;
if (id >= 0) { if (id >= 0) {
codec->fixup_list = fixlist; codec->fixup_list = fixlist;
......
...@@ -402,6 +402,7 @@ struct hda_codec { ...@@ -402,6 +402,7 @@ struct hda_codec {
/* fix-up list */ /* fix-up list */
int fixup_id; int fixup_id;
unsigned int fixup_forced:1; /* fixup explicitly set by user */
const struct hda_fixup *fixup_list; const struct hda_fixup *fixup_list;
const char *fixup_name; const char *fixup_name;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment