summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorAlexey Fisher <bug-track@fisher-privat.net>2010-06-23 14:17:09 +0200
committerTakashi Iwai <tiwai@suse.de>2010-06-23 16:02:07 +0200
commita5c7d797dcce3be5e77cd6ea62cc4920ededc32b (patch)
tree52b55db9773470112fbbcb35d58541674074f0c3 /sound
parent272cbc98cfbdd30cff37a35f8ad8f1b737288e88 (diff)
downloadlinux-a5c7d797dcce3be5e77cd6ea62cc4920ededc32b.tar.bz2
ALSA: usb-audio - Add volume resolution quirk for some Logitech webcams
Some programs like Skype trying to set capture volume automatically. Normally it will tray, carefully step by step lover or higher, set the volume. In real word it work not really well, because devises and vendors lie about real audio settings. For example most Logitech webcams have 6400 or 3500 steps for capture volume. They do not tell that actual resolution is 384. So we have only 7 or 18 real steps. In this patch I set real resolution only for tested devices. Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/mixer.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 6939d0f517d9..736d134cc03c 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1107,6 +1107,19 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
}
break;
+ case USB_ID(0x046d, 0x0809):
+ case USB_ID(0x046d, 0x0991):
+ /* Most audio usb devices lie about volume resolution.
+ * Most Logitech webcams have res = 384.
+ * Proboly there is some logitech magic behind this number --fishor
+ */
+ if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
+ snd_printk(KERN_INFO
+ "set resolution quirk: cval->res = 384\n");
+ cval->res = 384;
+ }
+ break;
+
}
snd_printdd(KERN_INFO "[%d] FU [%s] ch = %d, val = %d/%d/%d\n",