All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usbaudio: Fix wrong bitrate for Creative Creative VF0470 Live Cam
@ 2010-03-02 11:52 Arseniy Lartsev
  2010-03-02 12:06 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Arseniy Lartsev @ 2010-03-02 11:52 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linux-kernel

This patch works around misbehaviour of Creative Creative VF0470 Live Cam
which reports 16 kHz sample rate for audio capture while actually producing
8 kHz stream.

Signed-off-by: Arseniy Lartsev <arseniy@fizlesh.ru>

--
diff -rup linux-2.6.33-rc8-orig/sound/usb/usbaudio.c linux-2.6.33-
rc8/sound/usb/usbaudio.c
--- linux-2.6.33-rc8-orig/sound/usb/usbaudio.c
+++ linux-2.6.33-rc8/sound/usb/usbaudio.c
@@ -2513,6 +2513,9 @@ static int parse_audio_format_rates(stru
 			     chip->usb_id == USB_ID(0x0d8c, 0x0102)) &&
 			    fp->altsetting == 5 && fp->maxpacksize == 392)
 				rate = 96000;
+			/* Creative VF0470 Live Cam reports 16 kHz instead of 8 */
+			if ((rate == 16000) && (chip->usb_id == USB_ID(0x041e, 0x4068)))
+				rate = 8000;
 			fp->rate_table[fp->nr_rates] = rate;
 			if (!fp->rate_min || rate < fp->rate_min)
 				fp->rate_min = rate;

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

* Re: [PATCH] usbaudio: Fix wrong bitrate for Creative Creative VF0470 Live Cam
  2010-03-02 11:52 [PATCH] usbaudio: Fix wrong bitrate for Creative Creative VF0470 Live Cam Arseniy Lartsev
@ 2010-03-02 12:06 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2010-03-02 12:06 UTC (permalink / raw)
  To: Arseniy Lartsev; +Cc: linux-kernel

At Tue, 2 Mar 2010 14:52:28 +0300,
Arseniy Lartsev wrote:
> 
> This patch works around misbehaviour of Creative Creative VF0470 Live Cam
> which reports 16 kHz sample rate for audio capture while actually producing
> 8 kHz stream.
> 
> Signed-off-by: Arseniy Lartsev <arseniy@fizlesh.ru>

Thanks.  Applied now with minor coding-style fixes.


Takashi

> --
> diff -rup linux-2.6.33-rc8-orig/sound/usb/usbaudio.c linux-2.6.33-
> rc8/sound/usb/usbaudio.c
> --- linux-2.6.33-rc8-orig/sound/usb/usbaudio.c
> +++ linux-2.6.33-rc8/sound/usb/usbaudio.c
> @@ -2513,6 +2513,9 @@ static int parse_audio_format_rates(stru
>  			     chip->usb_id == USB_ID(0x0d8c, 0x0102)) &&
>  			    fp->altsetting == 5 && fp->maxpacksize == 392)
>  				rate = 96000;
> +			/* Creative VF0470 Live Cam reports 16 kHz instead of 8 */
> +			if ((rate == 16000) && (chip->usb_id == USB_ID(0x041e, 0x4068)))
> +				rate = 8000;
>  			fp->rate_table[fp->nr_rates] = rate;
>  			if (!fp->rate_min || rate < fp->rate_min)
>  				fp->rate_min = rate;
> 

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

end of thread, other threads:[~2010-03-02 12:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-02 11:52 [PATCH] usbaudio: Fix wrong bitrate for Creative Creative VF0470 Live Cam Arseniy Lartsev
2010-03-02 12:06 ` 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.