That does the trick. Here's a patch against 0.9.5.
I don't know if this is related, but one thing I've been puzzling over
is that half the time after I plug in the audiophile I get static
instead of sound. I have to unload alsa and plug it in again. (As I
mentioned before, I always get static if I load the alsa modules
explicitly).
Ben
On Wednesday 23 July 2003 2:17 am, Takashi Iwai wrote:
> At Wed, 23 Jul 2003 02:05:50 -0800,
>
> Ben Saylor wrote:
> > > ok, then it supports other sample rates :)
> > >
> > > about the symptom: do you mean that the playback gets too fast
> > > with the lower sample rate,
> >
> > Yes. i.e. it will play a 44100 hz or whatever stream, but playback
> > is too fast.
>
> so apparently we need some workaround (as found below line 2291 of
> usbaudio.c).
> please try to check the product and vendor id and set
> fp->attribtes |= EP_CS_ATTR_SAMPLERATE
> with that condition.
> if it works, please give me the patch.
>
>
> thanks,
>
> Takashi
--- alsa-driver-0.9.5/alsa-kernel/usb/usbaudio.c 2003-06-23 04:41:36.000000000 -0800
+++ alsa-driver-0.9.5-brs/alsa-kernel/usb/usbaudio.c 2003-07-23 12:53:19.000000000 -0800
@@ -2295,6 +2295,14 @@
*/
fp->attributes &= ~EP_CS_ATTR_SAMPLE_RATE;
}
+
+ /* workaround for M-Audio Audiophile USB */
+ if (dev->descriptor.idVendor == 0x0763 &&
+ dev->descriptor.idProduct == 0x2003) {
+ /* doesn't set the sample rate attribute, but supports it */
+ fp->attributes |= EP_CS_ATTR_SAMPLE_RATE;
+ }
+
/*
* plantronics headset and Griffin iMic have set adaptive-in
* although it's really not...
@@ -2695,11 +2703,6 @@
if (quirk && quirk->ifnum != QUIRK_ANY_INTERFACE && ifnum != quirk->ifnum)
goto __err_val;
- if (usb_set_configuration(dev, get_cfg_desc(config)->bConfigurationValue) < 0) {
- snd_printk(KERN_ERR "cannot set configuration (value 0x%x)\n", get_cfg_desc(config)->bConfigurationValue);
- goto __err_val;
- }
-
/* SB Extigy needs special boot-up sequence */
/* if more models come, this will go to the quirk list. */
if (dev->descriptor.idVendor == 0x041e && dev->descriptor.idProduct == 0x3000) {
@@ -2729,6 +2732,11 @@
/* it's a fresh one.
* now look for an empty slot and create a new card instance
*/
+ if (usb_set_configuration(dev, get_cfg_desc(config)->bConfigurationValue) < 0) {
+ snd_printk(KERN_ERR "cannot set configuration (value 0x%x)\n", get_cfg_desc(config)->bConfigurationValue);
+ goto __err_val;
+ }
+
for (i = 0; i < SNDRV_CARDS; i++)
if (enable[i] && ! usb_chip[i] &&
(vid[i] == -1 || vid[i] == dev->descriptor.idVendor) &&