USB Audio - Silence
Quoted 10 lines · Clemens Ladisch
Quoted 6 lines · Smery
I have an USB device with one Audio Class interface.
snd_usb_audiodetects it and register the corresponding card:
Also recording sems to work fine:The problem is that I obtain a file does not contain anything other than a sequence of "40 00" (hex) bytes.
What is the output of "amixer -c 3 contents" and "lsusb -v" for your device?
[luca@luca ~]$ amixer -c 3 contents numid=1,iface=MIXER,name='PCM Capture Switch'
; type=BOOLEAN,access=rw---,values=1
: values=on
numid=2,iface=MIXER,name='PCM Capture Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=3,step=0 : values=2
----------------------------------------
Bus 001 Device 005: ID 06e1:a708 ADS Technologies, Inc. Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x06e1 ADS Technologies, Inc.
idProduct 0xa708
bcdDevice 0.01
iManufacturer 1 ADS
iProduct 2 Instant VideoDVX
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 251
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
Usage Type Data
wMaxPacketSize 0x0000 bytes 0 once
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type none
Usage Type Data
wMaxPacketSize 0x0000 bytes 0 once
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
Usage Type Data
wMaxPacketSize 0x0002 bytes 2 once
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type none
Usage Type Data
wMaxPacketSize 0x0200 bytes 512 once
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 2
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
Usage Type Data
wMaxPacketSize 0x0002 bytes 2 once
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type none
Usage Type Data
wMaxPacketSize 0x03fc bytes 1020 once
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 3
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
Usage Type Data
wMaxPacketSize 0x0002 bytes 2 once
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type none
Usage Type Data
wMaxPacketSize 0x0400 bytes 0 once
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 4
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
Usage Type Data
wMaxPacketSize 0x0002 bytes 2 once
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type none
Usage Type Data
wMaxPacketSize 0x0c00 bytes 0 twice
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 5
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
Usage Type Data
wMaxPacketSize 0x0002 bytes 2 once
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type none
Usage Type Data
wMaxPacketSize 0x1400 bytes 0 three times
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 0
iInterface 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 38
bInCollection 1
baInterfaceNr( 0) 2
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0602 Digital Audio Interface
bAssocTerminal 0
bNrChannels 2
wChannelConfig 0x0003
Left Front (L)
Right Front (R)
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 3
iTerminal 0
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 3
bSourceID 1
bControlSize 1
bmaControls( 0) 0x03
Mute
Volume
iFeature 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type none
Usage Type Data
wMaxPacketSize 0x0000 bytes 0 once
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioControl Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bDelay 1 frames
wFormatTag 1 PCM
AudioControl Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 2
bSubframeSize 2
bBitResolution 16
bSamFreqType 1 Discrete
tSamFreq[ 0] 48000
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type none
Usage Type Data
wMaxPacketSize 0x0100 bytes 256 once
bInterval 4
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bLockDelayUnits 0 Undefined
wLockDelay 0 Undefined
Language IDs: (length=4)
0409 English(US)-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
Quoted 12 lines · Smery
Quoted 10 lines · Clemens Ladisch
Quoted 6 lines · Smery
I have an USB device with one Audio Class interface.
snd_usb_audiodetects it and register the corresponding card:
Also recording sems to work fine:The problem is that I obtain a file does not contain anything other than a sequence of "40 00" (hex) bytes.
What is the output of "amixer -c 3 contents" and "lsusb -v" for your device?
Quoted 7 lines
[luca@luca ~]$ amixer -c 3 contents numid=1,iface=MIXER,name='PCM Capture Switch'
; type=BOOLEAN,access=rw---,values=1
: values=on
numid=2,iface=MIXER,name='PCM Capture Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=3,step=0 : values=2
Looks OK.
Quoted 3 lines
Bus 001 Device 005: ID 06e1:a708 ADS Technologies, Inc.
...
bcdUSB 2.00
Please note that ALSA versions earlier than 1.0.9 might synchronize with a wrong sample rate with USB 2.0 devices, and that Linux kernels earlier than 2.6.13 have a serious bug in the EHCI driver that will corrupt data in high-speed audio transfers.
Quoted 3 lines
...
bInterfaceNumber 0
bInterfaceClass 255 Vendor Specific Class
The first interface uses some vendor-specific protocol for the video stuff. It might be possible that video capture has to be enabled for audio capture to work.
HTH
Clemens
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
Quoted 3 lines · Clemens Ladisch
Please note that ALSA versions earlier than 1.0.9 might synchronize with a wrong sample rate with USB 2.0 devices, and that Linux kernels earlier than 2.6.13
Do you really mean 2.6.12, or the not yet released 2.6.13?
Lee
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
Quoted 6 lines · Lee Revell
Quoted 3 lines · Clemens Ladisch
Please note that ALSA versions earlier than 1.0.9 might synchronize with a wrong sample rate with USB 2.0 devices, and that Linux kernels earlier than 2.6.13
Do you really mean 2.6.12, or the not yet released 2.6.13?
The latter.
Regards,
Clemens
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click