Re: Sound Devices USBPre2, UAC2 status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----- Mail original -----
> De: "alexander" <axeldenstore@xxxxxxxxx>
> À: linux-audio-user@xxxxxxxxxxxxxxxxxxxx
> Envoyé: Lundi 21 Janvier 2013 15:58:55
> Objet: Re:  Sound Devices USBPre2, UAC2 status
> Oliver check your SD thread
> http://forum.sounddevices.com/showthread.php?3785-Linux-status-for-usbPre2&highlight=linux
> Paul Isaacs of Sound Devices has posted a potentially helpful reply!


Hi,

I have some succes on UAC2 support for the USBPRe2.

Like indicated by Paul form Sound Devices, the sound card recognize that the OS is a Windows and so only have one configuration descriptor in the device desciptor : the UAC1 descriptor. The used method is on the STANDARD_REQUEST_GET_DESCRIPTOR if the wLength is 64 the OS is supposed to be Windows.

But Linux have taken the same behavior like of Windows and take also the 64 value.
In  driver/usb/core/hub.c : #define GET_DESCRIPTOR_BUFSIZE 64

If you put another value (like 65) the device descriptor have now 2 configuration descriptor (UAC1 and UAC2).
It seems mandatory to have a unplug/plug of the sound card (the first "get_descriptor" seems to determine the sound card behavior).


My "lsusb -v -d 0926:" : http://pastebin.com/nFTN2E04


First step is OK.
Nevertheless, the sound card remains in UAC1. 
The kernel choose the first valid configuration descriptor and the UAC1 is OK so....

I have test a ugly patch.
At the end of the function usb_choose_configuration() (in file driver/usb/core/generic.c) , I changed the behavior like this:
if(udev->product != NULL)
  if(strlen(udev->product) >= 7)  
   if(strncmp(udev->product,"USBPre2",7) == 0)
    {
    i++;
    printk("USBPre2: overwrite the choosen configuration to the follower :%d\n",i);
   }
return i;

And that all, now the USBPRe2 is view as a UAC2 sound card.

I have played a 24bit/192khz music.
This is the status of the sound card:

$ cat /proc/asound/USBPre2/stream0 
Sound Devices USBPre2 at usb-0000:00:1d.0-1.3, high speed : USB Audio

Playback:
Status: Running
Interface = 1
Altset = 2
Packet Size = 156
Momentary freq = 192000 Hz (0x18.0000)
Feedback Format = 8.16
Packet Size = 0
Momentary freq = 192000 Hz (0x18.0000)
Interface 1
Altset 1
Format: S16_LE
Channels: 2
Endpoint: 6 OUT (ASYNC)
Rates: 8000, 16000, 24000, 32000, 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us
Interface 1
Altset 2
Format: S24_3LE
Channels: 2
Endpoint: 6 OUT (ASYNC)
Rates: 8000, 16000, 24000, 32000, 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us


Jackd is OK with "/usr/bin/jackd -P10 -p128 -dalsa -dhw:0 -r192000 -p2048 -n3 -m -H -M -P"

It's remains a problem : I am not able to performs a capture....

So, I hope that this information will permit to find a way to have a easy and complete UAC2 support for this sound card.

Bye
Olivier
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user



[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux