From: Daniel Mack <zonque@gmail.com>
To: Gordon Dilan <gordon.dilan@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Usb audio - unsuported sampling rates
Date: Thu, 12 Jul 2012 09:44:34 +0200 [thread overview]
Message-ID: <4FFE8062.5040101@gmail.com> (raw)
In-Reply-To: <4FFC9F8E.6090004@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1517 bytes --]
On 10.07.2012 23:33, Daniel Mack wrote:
> Hi Gordon,
>
> On 10.07.2012 20:57, Gordon Dilan wrote:
> 0
>> Interface Descriptor:
>> bLength 9
>> bDescriptorType 4
>> bInterfaceNumber 2
>> bAlternateSetting 1
>> bNumEndpoints 1
>> bInterfaceClass 1 Audio
>> bInterfaceSubClass 2 Streaming
>> bInterfaceProtocol 0
>> iInterface 0
>> AudioStreaming Interface Descriptor:
>> bLength 7
>> bDescriptorType 36
>> bDescriptorSubtype 1 (AS_GENERAL)
>> bTerminalLink 2
>> bDelay 1 frames
>> wFormatTag 1 PCM
>> AudioStreaming Interface Descriptor:
>> bLength 11
>> bDescriptorType 36
>> bDescriptorSubtype 2 (FORMAT_TYPE)
>> bFormatType 1 (FORMAT_TYPE_I)
>> bNrChannels 4
>> bSubframeSize 2
>> bBitResolution 16
>> bSamFreqType 1 Discrete
>> tSamFreq[ 0] 16000
>
> The interface only reports this single sample rate. If the vendor claims
> that there are in fact more, it would be good to know which ones.
>
> Then we can add a quirk to parse_audio_format_rates_v1() in
> sound/usb/format.c - that shouldn't be too hard.
Something like the patch below could help. Can you try this?
Daniel
[-- Attachment #2: playstation-eye-samplerates.diff --]
[-- Type: text/x-patch, Size: 622 bytes --]
diff --git a/sound/usb/format.c b/sound/usb/format.c
index ddfef57..ce64a5b 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -158,6 +158,17 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof
return -1;
}
+ /*
+ * Sony's "Playstation Eye" microphone only reports one sample rate,
+ * but can in fact handle more.
+ */
+ if (chip->usb_id == USB_ID(0x1415, 0x2000) && fp->altsetting == 1) {
+ fp->rates = SNDRV_PCM_RATE_CONTINUOUS;
+ fp->rate_min = 16000;
+ fp->rate_min = 48000;
+ return 0;
+ }
+
if (nr_rates) {
/*
* build the rate table and bitmap flags
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2012-07-12 7:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-10 5:25 Usb audio - unsuported sampling rates Gordon Dilan
2012-07-10 6:53 ` Daniel Mack
2012-07-10 18:57 ` Gordon Dilan
2012-07-10 21:33 ` Daniel Mack
2012-07-12 7:44 ` Daniel Mack [this message]
2012-07-14 9:01 ` Gordon Dilan
2016-02-12 13:59 ` Jacobson
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=4FFE8062.5040101@gmail.com \
--to=zonque@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=gordon.dilan@gmail.com \
/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