* [PATCH] Add volume resolution quirk for some logitech webcams
@ 2010-06-23 9:34 Alexey Fisher
2010-06-23 11:46 ` Daniel Mack
0 siblings, 1 reply; 5+ messages in thread
From: Alexey Fisher @ 2010-06-23 9:34 UTC (permalink / raw)
To: alsa-devel, Takashi Iwai; +Cc: Alexey Fisher
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@fisher-privat.net>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Add volume resolution quirk for some logitech webcams
2010-06-23 9:34 [PATCH] Add volume resolution quirk for some logitech webcams Alexey Fisher
@ 2010-06-23 11:46 ` Daniel Mack
2010-06-23 12:08 ` Alexey Fisher
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Mack @ 2010-06-23 11:46 UTC (permalink / raw)
To: Alexey Fisher; +Cc: Takashi Iwai, alsa-devel
On Wed, Jun 23, 2010 at 11:34:47AM +0200, Alexey Fisher wrote:
> 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@fisher-privat.net>
> ---
> 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. */
While the change itself is acceptable, there are too many typos in this
comment ;) Can you please fix them up, please?
Thanks,
Daniel
> + 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@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Add volume resolution quirk for some logitech webcams
2010-06-23 11:46 ` Daniel Mack
@ 2010-06-23 12:08 ` Alexey Fisher
0 siblings, 0 replies; 5+ messages in thread
From: Alexey Fisher @ 2010-06-23 12:08 UTC (permalink / raw)
To: Daniel Mack; +Cc: Takashi Iwai, alsa-devel
Am Mittwoch, den 23.06.2010, 13:46 +0200 schrieb Daniel Mack:
> On Wed, Jun 23, 2010 at 11:34:47AM +0200, Alexey Fisher wrote:
> > 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@fisher-privat.net>
> > ---
> > 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. */
>
> While the change itself is acceptable, there are too many typos in this
> comment ;) Can you please fix them up, please?
shame on me.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Add volume resolution quirk for some Logitech webcams.
@ 2010-06-23 12:17 Alexey Fisher
2010-06-23 14:03 ` Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Alexey Fisher @ 2010-06-23 12:17 UTC (permalink / raw)
To: Daniel Mack, alsa-devel, Takashi Iwai; +Cc: Alexey Fisher
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>
---
sound/usb/mixer.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 6939d0f..736d134 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",
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Add volume resolution quirk for some Logitech webcams.
2010-06-23 12:17 [PATCH] Add volume resolution quirk for some Logitech webcams Alexey Fisher
@ 2010-06-23 14:03 ` Takashi Iwai
0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2010-06-23 14:03 UTC (permalink / raw)
To: Alexey Fisher; +Cc: alsa-devel
At Wed, 23 Jun 2010 14:17:09 +0200,
Alexey Fisher wrote:
>
> 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>
Applied now. Thanks.
Takashi
> ---
> sound/usb/mixer.c | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
> index 6939d0f..736d134 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",
> --
> 1.7.0.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-23 14:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-23 9:34 [PATCH] Add volume resolution quirk for some logitech webcams Alexey Fisher
2010-06-23 11:46 ` Daniel Mack
2010-06-23 12:08 ` Alexey Fisher
-- strict thread matches above, loose matches on Subject: below --
2010-06-23 12:17 [PATCH] Add volume resolution quirk for some Logitech webcams Alexey Fisher
2010-06-23 14:03 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.