Description
I am one of the developers of an appliance application for the Raspberry Pi. With a VastElectronics HiFi-FMT V-FMT212R usb-audio FM transmitter there is an audio output problem on a Raspberry Pi. This problem does not happen from a Windows machine or my linux desktop machine, only when driven by a Raspberry Pi.
The description of the output is hard to describe for me as I'm not an "audio guy" but it's been affectionately dubbed "robot audio" because it sounds like a robot sound effect from a movie. You can still hear the underlying audio, but it sounds like it's being sent through some sort of futuristic digital tunnel. The problem will usually go away after a few seconds on it's own.
Here's a link to a video that shows the audio problem that can be observed from 0:06-0:18, 0:24-1:07, 1:18-1:37, 1:45-2:15:
https://www.youtube.com/watch?v=JL4BIKCtYig
Last year our users discovered that changing the volume will usually clear up the bad sound immediately, so a script was written to use amixer to change the volume up/down every second. I had another workaround that involved downgrading to a 3.10.33 kernel and adding "nrpacks=1" to the snd-usb-audio module parameters. That made the bad audio only last around 1 second instead of 10+ seconds, but the problem was not gone completely. Since the nrpacks option was removed in the snd-usb-audio module for a "smarter" way to choose this in recent kernels, I hard-coding the variable "packs_per_ms" in sound/usb/endpoint.c of a 4.1.6+ kernel, but the problem still exists in the form of 10+ second periods, so something else is wrong and last year's work-around may be a red herring.
This problem has existed in a range of kernels and seems to affect this usb audio device, but not others people have tried so it has something to do with the combination of this specific device and the Raspberry Pi.
I need help on how to properly debug this issue or provide logs/captures/etc. for a developer to fix.
Here's a link to a video that shows the audio problem that can be observed from 0:06-0:18, 0:24-1:07, 1:18-1:37, 1:45-2:15:
https://www.youtube.com/watch?v=JL4BIKCtYig
Affects Versions: 4.1.6+ (with firmware: 3f87086448257aa66881de858a0b4b0e6daa8719)
/proc/asound/cards:
1 [Transmitter ]: USB-Audio - VASTINT/FMT-212 Transmitter
Texas Instruments VASTINT/FMT-212 Transmitter at usb-20980000.usb-1.2, full spe
lsusb output:
Bus 001 Device 004: ID 0451:2100 Texas Instruments, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0451 Texas Instruments, Inc.
idProduct 0x2100
bcdDevice 1.01
iManufacturer 1 Texas Instruments
iProduct 2 VASTINT/FMT-212 Transmitter
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 142
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
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 40
bInCollection 1
baInterfaceNr( 0) 1
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 3
wTerminalType 0x0101 USB Streaming
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 3
bControlSize 1
bmaControls( 0) 0x01
Mute Control
bmaControls( 1) 0x02
Volume Control
bmaControls( 2) 0x02
Volume Control
iFeature 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 6
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 5
iTerminal 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 3
bDelay 1 frames
wFormatTag 1 PCM
AudioStreaming 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] 44100
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x00c0 1x 192 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 0 Undefined
wLockDelay 0 Undefined
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 28
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x002a 1x 42 bytes
bInterval 10
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x002a 1x 42 bytes
bInterval 10
Device Status: 0x0000
(Bus Powered)