Re: Using a C-Media multichannel USB DAC
On Thu, Oct 10, 2013 at 08:35:58AM +0200, Hans Petter Selasky wrote: > > sysctl hw.usb.uaudio.default_channels=8 Thank you, I was not aware of this sysctl, it has the intended effect. > 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 I think I will try the userland libusb way first as it may prove handy to allow the user to dynamically change signals routing. -- %!PS -- Bertrand Petit /D{def}def/E{exch}D/G{get}D/I{2 div}D/U{dup}D/L{roll}D/Y{setgray}D/N{newpath}D /O{N 0 0 moveto}D/P{pop}D/T{translate}D currentpagedevice/PageSize G U 0 G/w E D 1 G /h E D w I h I T 0 Y 1 setlinewidth 0 1 2 { P 120 rotate 2 4 w U mul h U mul add sqrt I 50 add {N 50 0 3 2 L 0 360 arc stroke}for}for/s{O true charpath pathbbox exch 4 -1 L E sub I 3 1 L sub I} D /l(bp)D 0.94 Y /Helvetica findfont 22 scalefont setfont l s P(x)s exch P T O l show showpage ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"
Re: Using a C-Media multichannel USB DAC
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: at usbus1 uaudio0: 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: on uaudio0 uhid0: 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] http://www.daqarta.com/dw_ggnn.htm> [2] http://www.steila.com/USB4IO/CMedia/CM6206+datasheet+1.7.pdf> ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"
Using a C-Media multichannel USB DAC
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: at usbus1 uaudio0: 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: on uaudio0 uhid0: 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. [1] http://www.daqarta.com/dw_ggnn.htm> [2] http://www.steila.com/USB4IO/CMedia/CM6206+datasheet+1.7.pdf> -- %!PS -- Bertrand Petit /D{def}def/E{exch}D/G{get}D/I{2 div}D/U{dup}D/L{roll}D/Y{setgray}D/N{newpath}D /O{N 0 0 moveto}D/P{pop}D/T{translate}D currentpagedevice/PageSize G U 0 G/w E D 1 G /h E D w I h I T 0 Y 1 setlinewidth 0 1 2 { P 120 rotate 2 4 w U mul h U mul add sqrt I 50 add {N 50 0 3 2 L 0 360 arc stroke}for}for/s{O true charpath pathbbox exch 4 -1 L E sub I 3 1 L sub I} D /l(bp)D 0.94 Y /Helvetica findfont 22 scalefont setfont l s P(x)s exch P T O l show showpage Bus /dev/usb Device /dev/ugen1.2: ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x0d8c C-Media Electronics, Inc. idProduct 0x0102 CM106 Like Sound Device bcdDevice0.10 iManufacturer 0 iProduct2 USB Sound Device iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 534 bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 1 Control Device bInterfaceProtocol 0 iInterface 0 AudioControl Interface Descriptor: bLength10 bDescriptorType36 bDescriptorSubtype 1 (HEADER) bcdADC 1.00 wTotalLength 200 bInCollection 2 baInterfaceNr( 0) 1 baInterfaceNr( 1) 2 AudioControl Interface Descriptor: bLength12 bDescriptorType36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bNrChannels 8 wChannelConfig 0x063f Left Front (L) Right Front (R) Center Front (C) Low Freqency Enhancement (LFE) Left Surround (LS) Right Surround (RS) Side Left (SL) Side Right (SR) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength12 bDescriptorType36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 4 wTerminalType 0x0201 Microphone bAssocTerminal 0 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength10 bDescriptorType36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 8 bSourceID 4 bControlSize1 bmaControls( 0) 0x01 Mute bmaControls( 1) 0x02 Volume bmaControls( 2) 0x02 Volume iFeature0 AudioControl Interface Descriptor: bLength10 bDescriptorType36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 9 bSourceID 4 bControlSize1 bmaControls( 0) 0x01 Mute bm