Date: Thu, 10 Oct 2013 08:35:58 +0200 From: Hans Petter Selasky <hps@bitfrost.no> To: Bertrand Petit <elrond@phoe.frmug.org> Cc: freebsd-usb@freebsd.org Subject: Re: Using a C-Media multichannel USB DAC Message-ID: <52564ACE.30401@bitfrost.no> In-Reply-To: <20131010031324.GM3765@memo2.memo.frmug.org> References: <20131010031324.GM3765@memo2.memo.frmug.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52564ACE.30401>