Using a C-Media multichannel USB DAC

Hans Petter Selasky hps at bitfrost.no
Thu Oct 10 06:34:44 UTC 2013


On 10/10/13 05:13, Bertrand Petit wrote:
>
> 	Here on my desktop lies a new cheap multichannel brand-less USB DAC. I
> suppose it is based on a C-Media CM6206 chip. [1] From what I read in the
> datasheet [2] signals must properly be routed using HID requests before
> anything goes out of the connectors. How could this be done? My use case is to
> use four channels consisting of independent stereo signals. One pair is to be
> routed either to a jack or the S/PDIF output while the second pair is to be
> routed to a headphone.
>
> 	When plugged-in snd_uaudio recognises this device only a as stereo
> one:
>
> ugen1.2: <vendor 0x0d8c> at usbus1
> uaudio0: <vendor 0x0d8c USB Sound Device, class 0/0, rev 1.10/0.10, addr 2> on usbus1
> uaudio0: Play: 48000 Hz, 2 ch, 16-bit S-LE PCM format
> uaudio0: Record: 48000 Hz, 2 ch, 16-bit S-LE PCM format
> uaudio0: No midi sequencer
> pcm1: <USB audio> on uaudio0
> uhid0: <vendor 0x0d8c USB Sound Device, class 0/0, rev 1.10/0.10, addr 2> on usbus1
>
> I've not yet managed to understand how the 8 channels of the device can be
> exposed to userland. Could this be done? How? If it helps I've attached the
> output produced by lsusb on this device.

Hi,

Your device is a FULL speed device, and 8 channels is on the edge of 
what full-speed can do, so 2-channels is selected over 8-channels.

Run this before plugging:

sysctl hw.usb.uaudio.default_channels=8

The uaudio.c driver has support for talking directly to the USB HID 
interface for USB audio devices (/dev/uhid0) if you need to do some 
special programming for your device. Typically this is used for volume 
controls and such. "find /usr/src/sys/dev -name uaudio.c"

--HPS


>
>
> [1] <URL:http://www.daqarta.com/dw_ggnn.htm>
> [2] <URL:http://www.steila.com/USB4IO/CMedia/CM6206+datasheet+1.7.pdf>



More information about the freebsd-usb mailing list