Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] ALSA: hda - Add fixup_forced flag
@ 2014-05-26  8:22 Hui Wang
  2014-05-26  8:22 ` [PATCH 2/5] ALSA: hda - Add a new quirk match based on default pin configuration Hui Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Hui Wang @ 2014-05-26  8:22 UTC (permalink / raw)
  To: tiwai, alsa-devel; +Cc: hui.wang, david.henningsson

From: David Henningsson <david.henningsson@canonical.com>

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>
---
 sound/pci/hda/hda_auto_parser.c | 9 ++++++---
 sound/pci/hda/hda_codec.h       | 1 +
 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 90d2fda..36961ab 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,
 	if (codec->modelname && !strcmp(codec->modelname, "nofixup")) {
 		codec->fixup_list = NULL;
 		codec->fixup_id = -1;
+		codec->fixup_forced = 1;
 		return;
 	}
 
 	if (codec->modelname && models) {
 		while (models->name) {
 			if (!strcmp(codec->modelname, models->name)) {
-				id = models->id;
-				name = models->name;
-				break;
+				codec->fixup_id = models->id;
+				codec->fixup_name = models->name;
+				codec->fixup_forced = 1;
+				return;
 			}
 			models++;
 		}
@@ -889,6 +891,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
 		}
 	}
 
+	codec->fixup_forced = 0;
 	codec->fixup_id = id;
 	if (id >= 0) {
 		codec->fixup_list = fixlist;
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index a423313..5825aa1 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -402,6 +402,7 @@ struct hda_codec {
 
 	/* fix-up list */
 	int fixup_id;
+	unsigned int fixup_forced:1; /* fixup explicitly set by user */
 	const struct hda_fixup *fixup_list;
 	const char *fixup_name;
 
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-05-27  9:24 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26  8:22 [PATCH 1/5] ALSA: hda - Add fixup_forced flag Hui Wang
2014-05-26  8:22 ` [PATCH 2/5] ALSA: hda - Add a new quirk match based on default pin configuration Hui Wang
2014-05-26  8:22 ` [PATCH 3/5] ALSA: hda - get subvendor from codec rather than pci_dev Hui Wang
2014-05-26  8:22 ` [PATCH 4/5] ALSA: hda - drop def association and sequence from pinconf comparing Hui Wang
2014-05-26 10:11   ` David Henningsson
2014-05-27  2:25     ` Alex Hung
2014-05-27  4:41       ` David Henningsson
2014-05-27  6:40         ` Hui Wang
2014-05-27  6:47           ` David Henningsson
2014-05-27  6:53             ` Takashi Iwai
2014-05-27  6:55               ` Hui Wang
2014-05-27  9:24               ` Hui Wang
2014-05-26  8:22 ` [PATCH 5/5] ALSA: hda - add an instance to use snd_hda_pick_pin_fixup Hui Wang
2014-05-26 10:14   ` David Henningsson
2014-05-27  0:31     ` Hui Wang
2014-05-26  9:10 ` [PATCH 1/5] ALSA: hda - Add fixup_forced flag Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox