aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2014-05-26 04:22:40 -0400
committerTakashi Iwai <tiwai@suse.de>2014-05-26 05:03:38 -0400
commitc21c8cf77f47e234b5724d24dd133dc034351327 (patch)
tree2f9db257f0501ed01a6bfaca9f12633b27a4ac54 /sound/pci
parenta860d95f74025c6badbbdab6154c4ca15171927e (diff)
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: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_auto_parser.c9
-rw-r--r--sound/pci/hda/hda_codec.h1
2 files changed, 7 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c
index 90d2fda6c8f9..36961ab3b81d 100644
--- a/sound/pci/hda/hda_auto_parser.c
+++ b/sound/pci/hda/hda_auto_parser.c
@@ -852,15 +852,17 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
852 if (codec->modelname && !strcmp(codec->modelname, "nofixup")) { 852 if (codec->modelname && !strcmp(codec->modelname, "nofixup")) {
853 codec->fixup_list = NULL; 853 codec->fixup_list = NULL;
854 codec->fixup_id = -1; 854 codec->fixup_id = -1;
855 codec->fixup_forced = 1;
855 return; 856 return;
856 } 857 }
857 858
858 if (codec->modelname && models) { 859 if (codec->modelname && models) {
859 while (models->name) { 860 while (models->name) {
860 if (!strcmp(codec->modelname, models->name)) { 861 if (!strcmp(codec->modelname, models->name)) {
861 id = models->id; 862 codec->fixup_id = models->id;
862 name = models->name; 863 codec->fixup_name = models->name;
863 break; 864 codec->fixup_forced = 1;
865 return;
864 } 866 }
865 models++; 867 models++;
866 } 868 }
@@ -889,6 +891,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
889 } 891 }
890 } 892 }
891 893
894 codec->fixup_forced = 0;
892 codec->fixup_id = id; 895 codec->fixup_id = id;
893 if (id >= 0) { 896 if (id >= 0) {
894 codec->fixup_list = fixlist; 897 codec->fixup_list = fixlist;
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index a4233136cb93..5825aa17d8e3 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -402,6 +402,7 @@ struct hda_codec {
402 402
403 /* fix-up list */ 403 /* fix-up list */
404 int fixup_id; 404 int fixup_id;
405 unsigned int fixup_forced:1; /* fixup explicitly set by user */
405 const struct hda_fixup *fixup_list; 406 const struct hda_fixup *fixup_list;
406 const char *fixup_name; 407 const char *fixup_name;
407 408