public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] - allow multiple ac97 quirks for one piece of hardware
@ 2005-09-13 14:52 Matthew Garrett
  2005-09-14 10:27 ` [Alsa-devel] " Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Garrett @ 2005-09-13 14:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: alsa-devel

snd_ac97_tune_hardware currently exits after applying a single ac97 
quirk. There are bits of hardware (current HPs, for instance) that 
probably want two - MUTE_LED and HP_ONLY. The following trivial patch 
only exits if a quirk fails to apply. I'll send patches adding the 
quirks when I've made sure they work as expected on these machines.

--- sound/pci/ac97/ac97_codec.c.orig	2005-09-13 15:45:35.000000000 +0100
+++ linux/sound/pci/ac97/ac97_codec.c	2005-09-13 15:46:05.000000000 +0100
@@ -2551,9 +2551,10 @@ int snd_ac97_tune_hardware(ac97_t *ac97,
 				continue;
 			snd_printdd("ac97 quirk for %s (%04x:%04x)\n", quirk->name, ac97->subsystem_vendor, ac97->subsystem_device);
 			result = apply_quirk(ac97, quirk->type);
-			if (result < 0)
+			if (result < 0) {
 				snd_printk(KERN_ERR "applying quirk type %d for %s failed (%d)\n", quirk->type, quirk->name, result);
-			return result;
+				return result;
+			}
 		}
 	}
 	return 0;

-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

* Re: [Alsa-devel] [PATCH] - allow multiple ac97 quirks for one piece of hardware
  2005-09-13 14:52 [PATCH] - allow multiple ac97 quirks for one piece of hardware Matthew Garrett
@ 2005-09-14 10:27 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2005-09-14 10:27 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-kernel, alsa-devel

At Tue, 13 Sep 2005 15:52:47 +0100,
Matthew Garrett wrote:
> 
> snd_ac97_tune_hardware currently exits after applying a single ac97 
> quirk. There are bits of hardware (current HPs, for instance) that 
> probably want two - MUTE_LED and HP_ONLY. The following trivial patch 
> only exits if a quirk fails to apply. I'll send patches adding the 
> quirks when I've made sure they work as expected on these machines.

Thanks, the patch looks OK (and Andrew already took it :)

But how about a bit flag, AC97_TUNE_CONTINUE, to indicate to continue
the quirk-parsing, instead of always continueing?


Takashi

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

end of thread, other threads:[~2005-09-14 10:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-13 14:52 [PATCH] - allow multiple ac97 quirks for one piece of hardware Matthew Garrett
2005-09-14 10:27 ` [Alsa-devel] " Takashi Iwai

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