Re: [LAU] Sound Devices USBPre2, UAC2 status

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: <shal@...>
To: <linux-audio-user@...>
Date: Thursday, January 24, 2013 - 9:40 pm

----- Mail original -----

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@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAU] Sound Devices USBPre2, UAC2 status, alexander, (Mon Jan 21, 3:00 pm)
Re: [LAU] Sound Devices USBPre2, UAC2 status, , (Thu Jan 24, 9:40 pm)
Re: [LAU] Sound Devices USBPre2, UAC2 status, alexander, (Fri Jan 25, 10:37 pm)
Re: [LAU] USB2 Audio, PreSonus Audiobox 1818VSL, Robin Gareus, (Tue Jan 15, 8:34 pm)
Re: [LAU] USB2 Audio, PreSonus Audiobox 1818VSL, Louis Gorenfeld, (Tue Jan 15, 10:44 pm)
Re: [LAU] Sound Devices USBPre2, UAC2 status, alexander, (Mon Jan 7, 5:28 pm)
Re: [LAU] Sound Devices USBPre2, UAC2 status, Hans Wilmers, (Thu Jan 10, 12:24 pm)
Re: [LAU] Sound Devices USBPre2, UAC2 status, Hans Wilmers, (Thu Jan 10, 9:11 pm)
Re: [LAU] Sound Devices USBPre2, UAC2 status, Hans Wilmers, (Thu Jan 10, 10:24 pm)
Re: [LAU] Sound Devices USBPre2, UAC2 status, alexander, (Mon Jan 14, 9:20 pm)