Skip to contentSkip to conversation

: CN-126 - USB 5.1 Audio adapter

ALSA - driver 0000955 Fruhwirth Clemens 4 participants 9 messages Mar 3, 2005 – Mar 4, 2005

lore
Share & tools
lore
#0 lore raw

My USB audio class device doesn't show all mixer controls in ALSA. For reference, for other users searching this archive, it's a "Creative USB Sound Blaster Live! 24-bit External".
(http://creative.com/products/product.asp?category=1&subcategory=206&product=10702&nav=2)

I have added some inspection code to usb-mixer.c, which basically dumps all class specific USB interface descriptors.

My card got 2 x OUTPUT_TERMINAL, 2 x INPUT_TERMINAL, 2 x FEATURE_UNIT for the AudioControl class. But this doesn't make me any wiser.

I wonder why the snd_usb_create_mixer code does only loop over the OUTPUT_TERMINAL class, even there is support code for all other types in the parse_audio_unit code, which is called subsequently by snd_usb_create_mixer.

My aim is to have controls available for the Line-in mixer, both for recording and for direct re-mixing into the Main Out Plug.

Is there a developer owning such a box, or anyone who can guess what I'm supposed to do with the additional AudioControl class controls?

Are there any tools that helps inspecting the USB device, or further dumping of class-specific content and/or inspection of the USB flow between a vmware hosted windows system and the linux host system?

Thanks,

What's the reason why Bug#995 is not available to the public? I'm getting access denied. Otherwise I would have put this message into the bugtracker.

Signature · 1 line
http://clemens.endorphin.org, for robots [email protected]
#1 lore raw
Quoted 3 lines · Fruhwirth Clemens

What's the reason why Bug#955 is not available to the public? I'm getting access denied. Otherwise I would have put this message into the bugtracker.

Because some bug-reporters don't understand the public/private difference. It's public now.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#2 lore raw
In reply to Fruhwirth Clemens
Quoted 6 lines · Fruhwirth Clemens

My USB audio class device doesn't show all mixer controls in ALSA. For reference, for other users searching this archive, it's a "Creative USB Sound Blaster Live! 24-bit External".
...
I wonder why the snd_usb_create_mixer code does only loop over the OUTPUT_TERMINAL class,

Because all other units are (indirectly) connected to an output terminal. We get them when we recursively inspect the respective source units.

Quoted 2 lines

My aim is to have controls available for the Line-in mixer, both for recording and for direct re-mixing into the Main Out Plug.

Your device probably doesn't have such controls. What is the output of "lsusb -v" for it?

Clemens

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#3 lore raw
Quoted 12 lines · Clemens Ladisch
Quoted 6 lines · Fruhwirth Clemens

My USB audio class device doesn't show all mixer controls in ALSA. For reference, for other users searching this archive, it's a "Creative USB Sound Blaster Live! 24-bit External".
...
I wonder why the snd_usb_create_mixer code does only loop over the OUTPUT_TERMINAL class,

Because all other units are (indirectly) connected to an output terminal. We get them when we recursively inspect the respective source units.

Quoted 5 lines
Quoted 2 lines

My aim is to have controls available for the Line-in mixer, both for recording and for direct re-mixing into the Main Out Plug.

Your device probably doesn't have such controls. What is the output of "lsusb -v" for it?

lsusb fails :/

Bus 003 Device 002: ID 041e:3040 Creative Technology, Ltd Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10

  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x041e Creative Technology, Ltd
  idProduct          0x3040
  bcdDevice            1.00
  iManufacturer           1 Creative Technology
  iProduct                2 SB Live! 24-bit External
  iSerial                 0
  bNumConfigurations      1
cannot get config descriptor 0, Connection timed out (110)
  Language IDs: (length=4)
     0409 English(US)

I wonder what's the cause. Has Creative delivered a non-standard compliant device one more time? The original EMU10K1 was also FUBAR wrt to the PCI standard.

The kernel log is full of

Mar  3 16:17:01 ghanima kernel: usb 3-1: usbfs: USBDEVFS_CONTROL failed cmd lsusb rqt 128 rq 6 len 979 ret -110
Mar  3 16:17:01 ghanima kernel: usb 3-1: lsusb timed out on ep0in

The device is connected to an UHCI hosted bus.. Linus' bitkeeper doesn't show any relevant bug fixes in this area in the last few month.. Hmm any ideas?

Signature · 1 line
http://clemens.endorphin.org, for robots [email protected]
#4 lore raw

Re: SB Live 24 Ext (was: [ALSA - driver 0000955]: CN-126 - USB 5.1 Audio adapter)

Quoted 11 lines · Fruhwirth Clemens
Quoted 2 lines · Clemens Ladisch

Your device probably doesn't have such controls. What is the output of "lsusb -v" for it?

lsusb fails :/

Bus 003 Device 002: ID 041e:3040 Creative Technology, Ltd Device Descriptor:
...
bNumConfigurations 1
cannot get config descriptor 0, Connection timed out (110)

The kernel managed to read the descriptors, otherwise snd-usb-audio wouldn't have loaded. You might try to install a newer version of usbutils.

Well. What is the output of "xxd -g1 /proc/bus/usb/003/002" (where 003 and 002 are the bus and device numbers)?

Clemens

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#5 lore raw

Re: SB Live 24 Ext (was: [ALSA - driver 0000955]: CN-126 - USB 5.1 Audio adapter)

Quoted 13 lines · Clemens Ladisch
Quoted 11 lines · Fruhwirth Clemens
Quoted 2 lines · Clemens Ladisch

Your device probably doesn't have such controls. What is the output of "lsusb -v" for it?

lsusb fails :/

Bus 003 Device 002: ID 041e:3040 Creative Technology, Ltd Device Descriptor:
...
bNumConfigurations 1
cannot get config descriptor 0, Connection timed out (110)

Quoted 3 lines

The kernel managed to read the descriptors, otherwise snd-usb-audio wouldn't have loaded. You might try to install a newer version of usbutils.

I already did that (at least I thought) but obviously Gentoo hasn't bumped the version from 0.11 to 0.70 yet.

Here is the lsusb (0.70) output. I removed the streaming interface information, because this creative thing has a ton of them, full output at http://clemens.endorphin.org/usblive-interfaces .

Bus 003 Device 002: ID 041e:3040 Creative Technology, Ltd Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10

  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x041e Creative Technology, Ltd
  idProduct          0x3040 
  bcdDevice            1.00
  iManufacturer           1 Creative Technology
  iProduct                2 SB Live! 24-bit External
  iSerial                 0 
  bNumConfigurations      1

Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 979
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
MaxPower 308mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 0
iInterface 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 76
bInCollection 2
baInterfaceNr( 0) 1
baInterfaceNr( 1) 2
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bNrChannels 6
wChannelConfig 0x003f
Left Front (L)
Right Front (R)
Center Front (C)
Low Freqency Enhancement (LFE)
Left Surround (LS)
Right Surround (RS)
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 2
bSourceID 1
bControlSize 1
bmaControls( 0) 0x03
Mute
Volume
bmaControls( 1) 0x00
bmaControls( 2) 0x00
bmaControls( 3) 0x00
bmaControls( 4) 0x00
bmaControls( 5) 0x00
bmaControls( 6) 0x00
iFeature 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 3
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 2
iTerminal 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 4
wTerminalType 0x0603 Line Connector
bAssocTerminal 0
bNrChannels 2
wChannelConfig 0x0003
Left Front (L)
Right Front (R)
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 5
bSourceID 4
bControlSize 1
bmaControls( 0) 0x02
Volume
bmaControls( 1) 0x00
bmaControls( 2) 0x00
iFeature 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 6
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 5
iTerminal 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10

Obviously, the feature units are used for volume control solely. I wonder, how the audio signal flow looks like..

Quoted 2 lines

Well. What is the output of "xxd -g1 /proc/bus/usb/003/002" (where 003 and 002 are the bus and device numbers)?

I presume lsusb has all the information, if not
http://clemens.endorphin.org/usb-desc-xxded

Thanks,

Signature · 1 line
http://clemens.endorphin.org, for robots [email protected]
#6 lore raw

Re: SB Live 24 Ext (was: [ALSA - driver 0000955]: CN-126 - USB 5.1 Audio adapter)

Quoted 17 lines · Fruhwirth Clemens
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bmaControls( 0)      0x03
          Mute
          Volume
        bmaControls( 1)      0x00
        bmaControls( 2)      0x00
        bmaControls( 3)      0x00
        bmaControls( 4)      0x00
        bmaControls( 5)      0x00
        bmaControls( 6)      0x00
        ...
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bmaControls( 0)      0x02
          Volume
        bmaControls( 1)      0x00
        bmaControls( 2)      0x00
Quoted 1 line

Obviously, the feature units are used for volume control solely.

Yes, and there's only one volume control for all channels.

Quoted 1 line

I wonder, how the audio signal flow looks like..

The bTerminalID/bUnitID field identifies each unit. Start at the output terminals and go back through the bSourceID's.

Regards,
Clemens

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#7 lore raw

Re: SB Live 24 Ext (was: [ALSA - driver 0000955]: CN-126 - USB 5.1 Audio adapter)

Quoted 6 lines · Clemens Ladisch
Quoted 1 line · Fruhwirth Clemens

I wonder, how the audio signal flow looks like..

The bTerminalID/bUnitID field identifies each unit. Start at the output terminals and go back through the bSourceID's.

I really start to like USB.

That's how the Creative box should look internal.

Host -> [IT1] -> [FU2] -> [OT3] -> Speaker
Line-in -> [IT4] -> [FU5] -> [OT6] -> Host

That's _very_ minimal. It looks like there is no way to Route Line-In back to Speaker. Just digitally and sampled.. bad. Don't buy that box.

The only thing nice is, that it's really 24-bit.

AudioStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 4
bSubframeSize 3
bBitResolution 24
^^

Signature · 1 line
http://clemens.endorphin.org, for robots [email protected]
#8 lore raw
In reply to Fruhwirth Clemens
Quoted 3 lines · Fruhwirth Clemens

I wonder what's the cause. Has Creative delivered a non-standard compliant device one more time? The original EMU10K1 was also FUBAR wrt to the PCI standard.

I guess you are referring to only being able to DMA into a 29 bit address space?

Lee

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click