[PATCH] Add volume resolution quirk for some logitech webcams

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

 



Some programs like Skype trying to set capture volume automatically.
Normally it will tray carefully, step by step lover or higher 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@xxxxxxxxxxxxxxxxx>
---
 sound/usb/mixer.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 6939d0f..fd9f377 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1107,6 +1107,18 @@ 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 divise lighe about volume resolution.
+	 * most of them have res = 384. Proboly there is some magick behind
+	 * this number. */
+		if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
+			snd_printk(KERN_INFO
+				"set volume quirk: cval->res = 384\n");
+			cval->res = 384;
+		}
+		break;
+
 	}
 
 	snd_printdd(KERN_INFO "[%d] FU [%s] ch = %d, val = %d/%d/%d\n",
-- 
1.7.0.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux