mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arseniy Lartsev <arseniy@fizlesh.ru>
To: Takashi Iwai <tiwai@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] usbaudio: Fix wrong bitrate for Creative Creative VF0470 Live Cam
Date: Tue, 2 Mar 2010 14:52:28 +0300	[thread overview]
Message-ID: <201003021452.28716.arseniy@fizlesh.ru> (raw)

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;

             reply	other threads:[~2010-03-02 12:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02 11:52 Arseniy Lartsev [this message]
2010-03-02 12:06 ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201003021452.28716.arseniy@fizlesh.ru \
    --to=arseniy@fizlesh.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®