At Fri, 24 Nov 2006 15:26:42 -0500, Pavel Polischouk wrote: > > Re-send, "hg export" format Thanks, this time the patch is intact. > [2 maudio.patch <text/plain (7bit)>] > # HG changeset patch > # User Pavel Polischouk <pavelvp@xxxxxxxx> > # Date 1164392350 18000 > # Node ID d447f5a178f0d40ec98c4cde2e3d6e4d012a7f65 > # Parent 6f81f7397f82b392e40c582e48a02a7c1cbd7c3e > This patch adds the following capabilities to usbaudio.c: > - Merges support for M-Audio FastTrack USB > - Adds proper support for M-Audio Quattro USB > - Adds hot-reload support for all Audiophile, FastTrack and Quattro. > - FastTrack "select configuration #2" quirk is present but #ifdef'd out > pending inclusion of "usb_driver_set_configuration" function in mainline > kernel. This quirk could possibly be handled in user space anyway. usb_driver_set_configuration() is already in mainline (2.6.19). So, no need to disable it. If you need to disable it for older version, modify usbaudio.patch in alsa-driver tree, or add a dummy wrapper in alsa-driver/include/adriver.h. > diff -r 6f81f7397f82 -r d447f5a178f0 usb/usbaudio.c > --- a/usb/usbaudio.c Fri Nov 24 11:50:29 2006 -0500 > +++ b/usb/usbaudio.c Fri Nov 24 13:19:10 2006 -0500 > @@ -2346,11 +2346,16 @@ static int is_big_endian_format(struct s > { > switch (chip->usb_id) { > case USB_ID(0x0763, 0x2001): /* M-Audio Quattro: captured data only */ > - if (fp->endpoint & USB_DIR_IN) > - return 1; > - break; > case USB_ID(0x0763, 0x2003): /* M-Audio Audiophile USB */ > return 1; > + > + case USB_ID(0x0763, 0x2012): /* M-Audio Fast Track Pro */ > + /* it depends on altsetting wether the device is big-endian or not */ > + if(fp->altsetting==2 || fp->altsetting==3 || > + fp->altsetting==5 || fp->altsetting==6) > + return 1; Minor coding-style fixes: Put a space between if and (. Also, put spaces around '==', too. > @@ -3175,44 +3195,140 @@ static int snd_usb_cm106_boot_quirk(stru > return snd_usb_cm106_write_int_reg(dev, 2, 0x8004); > } > > +static int snd_usb_fasttrackpro_boot_quirk(struct usb_device *dev, int ifnum) > +{ > +#if 0 > + int err; > + > + if(dev->actconfig->desc.bConfigurationValue==1) { > + if(ifnum==0) { > + snd_printk(KERN_INFO "Switching to config #2\n"); > + /* This function has to be available by the usb core module. > + if it is not avialable the boot quirk has to be left out and the > + configuration has to be set by udev or hotplug rules */ > + err=usb_driver_set_configuration(dev,2); > + if(err < 0) { > + snd_printdd("error usb_driver_set_configuration: %d\n", err); > + return -ENODEV; > + } > + } > + } else { > + snd_printk(KERN_INFO "Fast Track Pro config OK\n"); > + } Please use indent level 8. Otherwise, the patch looks fine to me. Thibault, does it work for your device (at least no regression)? thanks, Takashi ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel