[PATCH] - allow multiple ac97 quirks for one piece of hardware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 | [email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux