Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Dec 2018 15:07:02 +0100
From:      Florian Walpen <dev@submerge.ch>
To:        freebsd-usb@freebsd.org
Subject:   SPL Crimson (rev 1) and snd_uaudio
Message-ID:  <1898371.YXp4yczo3S@z800>

next in thread | raw e-mail | index | archive | help
Hello all,

this is my first post here, so apologies if this isn't the most appropriate 
list - but i thought this topic is more related to USB than to multimedia.

I treated myself to an SPL Crimson (rev 1), which is a well-built USB audio 
interface for musicians (4 in 4 out + SPDIF) that hits the second hand market 
here now for around 200$. See
https://spl.audio/studio/crimson/?lang=en

It is indeed USB 2.0 Audio Class compliant as advertised, but still made me 
jump quite some hurdles before i got it to work with FreeBSD.
For the records:

1. This device is a shape-shifter and will present different USB descriptors 
to Windows and macOS. A USB 1.0 Audio Class compliant header is always there 
and works (2 in 2 out at 48000), but the USB 2.0 configuration is hidden in 
Windows and only appears in macOS. Moreover, the Crimson keeps that state 
between power cycles, so my solution was to plug it into macOS once and never 
into Windows again.

2. The USB 2.0 header is in the second USB configuration, which is easy enough 
to fix with a quirk added to /boot/loader.conf:

hw.usb.quirk.0="0x0a4a 0xc150 0x0000 0xffff UQ_CFG_INDEX_1"

3. Still, there are no play and record channels detected and uaudio takes 
minutes to attach to the device. As it turns out, the Crimson chokes on the 
sample rate request messages, resulting in USB timeouts. The implementation in 
FreeBSD is somewhat simplistic in this regard, and i have a patch now for 
12.0-RELEASE which mimics the more subtle behaviour of macOS.

This gave me a working audio device with 6 in 6 out channels and sample rates 
up to 96000. Output seems to work fine, i didn't test recording yet since i 
don't have my gear here at home.


Now my questions would be:
a) What about adding the quirk permanently to FreeBSD?
I'm unsure because it could make a Crimson in crippled Windows mode unusable, 
even though the device is not too useful in that state anyway. Maybe i should 
investigate what triggers the shape-shifting first, i do have USB dumps from 
macOS.

b) Regarding the patch for issue 3., how would i post it for discussion and 
inclusion into FreeBSD?
Should i file a PR or just post it here on the list, inline (~30 lines) or in 
an attachment? I couldn't find any policy on that for the mailing lists.

Mimicking the behaviour of macOS could be beneficial in general, i see a lot 
of new class compliant audio interfaces coming out that are explicitly tested 
with apple software (iPad compatible).


Thanks & best regards

Florian Walpen






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1898371.YXp4yczo3S>