You are not logged in.
Just moved from Windows to Arch, got everything working properly except my audio. The FiiO DAC reports (wrongly) that it only supports S32_LE audio, while it acctually only supports S16_LE and S24_LE. Pulseaudio thinks its a good idea to move to S32_LE then, but the FiiO does not regonize this type of audio. This causes pulseaudio to freeze at initialization and hangs the whole system. (The process is unkillable)
Audio output works just fine though alsa, tested various flac files (44kHz/16, 96kHz/24) and the device switches over without problems. I just need the same behavior though pulseaudio.
So how do I force pulseaudio with module-alsa-sink to force out S24_LE audio? The DAC should accept this file format just fine and should accept the bit depth just right, pulseaudio should not verify anything.. Just push audio though and the DAC will catch up.
aplay -L:
ALSA lib namehint.c:279:(try_config) (default) device must be an integer
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
sysdefault:CARD=DAC
FiiO USB Audio Class 2.0 DAC, USB Audio
Default Audio Device
front:CARD=DAC,DEV=0
FiiO USB Audio Class 2.0 DAC, USB Audio
Front speakers
surround21:CARD=DAC,DEV=0
FiiO USB Audio Class 2.0 DAC, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=DAC,DEV=0
FiiO USB Audio Class 2.0 DAC, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=DAC,DEV=0
FiiO USB Audio Class 2.0 DAC, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=DAC,DEV=0
FiiO USB Audio Class 2.0 DAC, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=DAC,DEV=0
FiiO USB Audio Class 2.0 DAC, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=DAC,DEV=0
FiiO USB Audio Class 2.0 DAC, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=DAC,DEV=0
FiiO USB Audio Class 2.0 DAC, USB Audio
IEC958 (S/PDIF) Digital Audio Output
sysdefault:CARD=Mic
Samson Meteor Mic, USB Audio
Default Audio Device
front:CARD=Mic,DEV=0
Samson Meteor Mic, USB Audio
Front speakers
surround21:CARD=Mic,DEV=0
Samson Meteor Mic, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Mic,DEV=0
Samson Meteor Mic, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Mic,DEV=0
Samson Meteor Mic, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Mic,DEV=0
Samson Meteor Mic, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Mic,DEV=0
Samson Meteor Mic, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Mic,DEV=0
Samson Meteor Mic, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Mic,DEV=0
Samson Meteor Mic, USB Audio
IEC958 (S/PDIF) Digital Audio Output
sysdefault:CARD=PCH
HDA Intel PCH, ALC1150 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC1150 Analog
Front speakers
surround21:CARD=PCH,DEV=0
HDA Intel PCH, ALC1150 Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC1150 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC1150 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC1150 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC1150 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC1150 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
HDA Intel PCH, ALC1150 Digital
IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=HDMI,DEV=0
HDA ATI HDMI, HDMI 0
HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
HDA ATI HDMI, HDMI 1
HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
HDA ATI HDMI, HDMI 2
HDMI Audio Output
hdmi:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 3
HDMI Audio Output
hdmi:CARD=HDMI,DEV=4
HDA ATI HDMI, HDMI 4
HDMI Audio Output
hdmi:CARD=HDMI,DEV=5
HDA ATI HDMI, HDMI 5
HDMI Audio Output
cat /proc/asound/DAC/stream0: (While not being used)
SmartAction FiiO USB Audio Class 2.0 DAC at usb-0000:00:14.0-6, high speed : USB Audio
Playback:
Status: Stop
Interface 1
Altset 1
Format: S32_LE
Channels: 2
Endpoint: 1 OUT (ASYNC)
Rates: 32000, 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us
cat /proc/asound/DAC/stream0: (While playing 96kHz/16 song though Clementine, ALSA --> hw:CARD=DAC)
SmartAction FiiO USB Audio Class 2.0 DAC at usb-0000:00:14.0-6, high speed : USB Audio
Playback:
Status: Running
Interface = 1
Altset = 1
Packet Size = 127
Momentary freq = 96000 Hz (0xc.0000)
Feedback Format = 16.16
Interface 1
Altset 1
Format: S32_LE
Channels: 2
Endpoint: 1 OUT (ASYNC)
Rates: 32000, 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us
Please let me know if I need to post any other log files or run commands
Last edited by smiba (2015-09-19 22:20:03)
Offline
you can set a format in /etc/pulse/daemon.conf, maybe it helps
Last edited by Rasi (2015-09-20 04:53:34)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Welcome to Arch... seems like you know your way around Linux if you know how to dig through the proc filesystem.
The FiiO DAC reports (wrongly) that it only supports S32_LE audio, while it acctually only supports S16_LE and S24_LE.
Where does that statement come from? Is that what the DAC's USB device descriptor reports?
Last edited by pigiron (2015-09-20 06:31:02)
Offline
Your dac reports it supports only S32_LE so that's what pulseaudio will use, I'd see it as a bug if it tried to use something the hardware doesn't claim to support.
Regarding alsa, it would be more interesting to see the output of 'cat /proc/asound/DAC/pcm0p/sub0/hw_params' while it is playing to confirm the dac is actually using a format other than S32_LE.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
you can set a format in /etc/pulse/daemon.conf, maybe it helps
It only sets the preferred bit depth and does not force pulse to use it.
Welcome to Arch... seems like you know your way around Linux if you know how to dig through the proc filesystem.
I've been managing Linux servers (Ubuntu, Debian) for 2 years so I know the basics of Linux
The FiiO DAC reports (wrongly) that it only supports S32_LE audio, while it acctually only supports S16_LE and S24_LE.
Where does that statement come from? Is that what the DAC's USB device descriptor reports?
Based on the results of /proc/asound/DAC/stream0, "Format: S32_LE" is the only bit depth listed.
lsusb -v:
Bus 001 Device 007: ID 2972:0003
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x2972
idProduct 0x0003
bcdDevice 0.00
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 152
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 3
bFunctionClass 1 Audio
bFunctionSubClass 0
bFunctionProtocol 32
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 32
iInterface 2
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 2.00
bCategory 4
wTotalLength 64
bmControl 0x00
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 10 (CLOCK_SOURCE)
bClockID 1
bmAttributes 0x03 Internal programmable Clock
bmControls 0x07
Clock Frequency Control (read/write)
Clock Validity Control (read-only)
bAssocTerminal 0
iClockSource 5
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bCSourceID 1
bNrChannels 2
bmChannelConfig 0x00000000
bmControls 0x0000
iChannelNames 7
iTerminal 6
AudioControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 3
bSourceID 2
bmaControls( 0) 0x00000000
bmaControls( 1) 0x00000000
bmaControls( 2) 0x00000000
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 4
wTerminalType 0x0302 Headphones
bAssocTerminal 0
bSourceID 3
bCSourceID 1
bmControls 0x0000
iTerminal 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 7
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 24
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
AudioControl Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 8
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 17
Transfer Type Isochronous
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0004 1x 4 bytes
bInterval
4
Your dac reports it supports only S32_LE so that's what pulseaudio will use, I'd see it as a bug if it tried to use something the hardware doesn't claim to support.
Regarding alsa, it would be more interesting to see the output of 'cat /proc/asound/DAC/pcm0p/sub0/hw_params' while it is playing to confirm the dac is actually using a format other than S32_LE.
cat /proc/asound/DAC/pcm0p/sub0/hw_params - while running a 44.1kHz/16bit song though Clementine, using ALSA Sink with hw:CARD=DAC
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 441
buffer_size: 8820
The DAC reports (on the screen of it) its currently running 44.1kHz/24bit. Its always reporting 24bit, but the sample rate changes to the sample rate of the current running song in Clementine.
Offline
For all intents and purposes you dac is always working with format S32_LE, whatever it does internally is another matter. I'm not sure if you can force pulse to always use a 24bit word length, if default-sample-format doesn't force what you want then you may be out of luck.
I wouldn't say this is a bug of pulseaudio or any other software component, it is your dac's fault for not reporting what it actually supports. I have one simple usb dac and it does report what it supports:
lsusb
Bus 001 Device 003: ID 1852:7022 GYROCOM C&C Co., LTD
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x1852 GYROCOM C&C Co., LTD
idProduct 0x7022
bcdDevice 0.01
iManufacturer 1 HiFimeDIY Audio
iProduct 2 HiFimeDIY DAC
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 428
bNumInterfaces 4
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 58
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0012 1x 18 bytes
bInterval 32
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 0
iInterface 3 SABRE 24/96 DAC_DigiT
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 92
bInCollection 2
baInterfaceNr( 0) 2
baInterfaceNr( 1) 3
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0603 Line Connector
bAssocTerminal 0
bNrChannels 2
wChannelConfig 0x0003
Left Front (L)
Right Front (R)
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 5
wTerminalType 0x0605 SPDIF interface
bAssocTerminal 0
bNrChannels 2
wChannelConfig 0x0003
Left Front (L)
Right Front (R)
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 9
wTerminalType 0x0101 USB Streaming
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 3
wTerminalType 0x0605 SPDIF interface
bAssocTerminal 0
bSourceID 16
iTerminal 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 7
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 11
iTerminal 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 14
bSourceID 1
bControlSize 1
bmaControls( 0) 0x01
Mute Control
bmaControls( 1) 0x02
Volume Control
bmaControls( 2) 0x02
Volume Control
iFeature 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 16
bSourceID 9
bControlSize 1
bmaControls( 0) 0x01
Mute Control
bmaControls( 1) 0x02
Volume Control
bmaControls( 2) 0x02
Volume Control
iFeature 0
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 5 (SELECTOR_UNIT)
bUnitID 11
bNrInPins 2
baSource( 0) 14
baSource( 1) 5
iSelector 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
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 7
bDelay 0 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 26
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 2
bSubframeSize 2
bBitResolution 16
bSamFreqType 6 Discrete
tSamFreq[ 0] 8000
tSamFreq[ 1] 16000
tSamFreq[ 2] 32000
tSamFreq[ 3] 44100
tSamFreq[ 4] 48000
tSamFreq[ 5] 96000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0184 1x 388 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 2 Decoded PCM samples
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 2
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 7
bDelay 0 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 26
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 2
bSubframeSize 3
bBitResolution 24
bSamFreqType 6 Discrete
tSamFreq[ 0] 8000
tSamFreq[ 1] 16000
tSamFreq[ 2] 32000
tSamFreq[ 3] 44100
tSamFreq[ 4] 48000
tSamFreq[ 5] 96000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0246 1x 582 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 2 Decoded PCM samples
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
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 9
bDelay 0 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 26
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 2
bSubframeSize 2
bBitResolution 16
bSamFreqType 6 Discrete
tSamFreq[ 0] 8000
tSamFreq[ 1] 16000
tSamFreq[ 2] 32000
tSamFreq[ 3] 44100
tSamFreq[ 4] 48000
tSamFreq[ 5] 96000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0184 1x 388 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 2 Decoded PCM samples
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 2
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 9
bDelay 0 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 26
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 2
bSubframeSize 3
bBitResolution 24
bSamFreqType 6 Discrete
tSamFreq[ 0] 8000
tSamFreq[ 1] 16000
tSamFreq[ 2] 32000
tSamFreq[ 3] 44100
tSamFreq[ 4] 48000
tSamFreq[ 5] 96000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0246 1x 582 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 2 Decoded PCM samples
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 3
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 9
bDelay 0 frames
wFormatTag 8193 IEC1937_AC-3
AudioStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 3 (FORMAT_TYPE_III)
bNrChannels 2
bSubframeSize 2
bBitResolution 16
bSamFreqType 1 Discrete
tSamFreq[ 0] 48000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x03 EP 3 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 2 Decoded PCM samples
wLockDelay 2 Decoded PCM samples
Device Status: 0x0000
(Bus Powered)
cat /proc/asound/DAC/stream0
HiFimeDIY Audio HiFimeDIY DAC at usb-0000:00:13.0-2, full speed : USB Audio
Playback:
Status: Stop
Interface 3
Altset 1
Format: S16_LE
Channels: 2
Endpoint: 3 OUT (ADAPTIVE)
Rates: 8000, 16000, 32000, 44100, 48000, 96000
Interface 3
Altset 2
Format: S24_3LE
Channels: 2
Endpoint: 3 OUT (ADAPTIVE)
Rates: 8000, 16000, 32000, 44100, 48000, 96000
Capture:
Status: Stop
Interface 2
Altset 1
Format: S16_LE
Channels: 2
Endpoint: 2 IN (ADAPTIVE)
Rates: 8000, 16000, 32000, 44100, 48000, 96000
Interface 2
Altset 2
Format: S24_3LE
Channels: 2
Endpoint: 2 IN (ADAPTIVE)
Rates: 8000, 16000, 32000, 44100, 48000, 96000
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 24
That shows that ALSA (and pulseaudio) are "doing the right thing" when it comes to S32_LE.
bSubslotSize is the number of bytes of PCM data that the device expects on the USB bus (for FORMAT_TYPE_I), and bBitResolution advertises how many of those bits it will actually use as audio data.
Device developers often play games with stuff like this and push it on the OS to deal with it.
No idea why pulseaudio is falling down on your system (I only use ALSA) but it's likely not S32_LE. Perhaps others can help if you describe the failure.
Offline
No idea why pulseaudio is falling down on your system (I only use ALSA) but it's likely not S32_LE. Perhaps others can help if you describe the failure.
I think the problem is related to the bit depth, look at this startup log of pulseaudio. The last line is also the point where it freezes and becomes unkillable ("D" state in top)
[bart@BartPCArch ~]$ pulseaudio -vvvv
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: RealtimeKit worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 6.0
D: [pulseaudio] main.c: Compilation host: x86_64-unknown-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -Wall -W -Wextra -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
D: [pulseaudio] main.c: Running on host: Linux x86_64 4.1.6-1-ARCH #1 SMP PREEMPT Mon Aug 17 08:52:28 CEST 2015
D: [pulseaudio] main.c: Found 8 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is 285aceef9581452e8da5a89ae08b86a4.
I: [pulseaudio] main.c: Session ID is c1.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/bart/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-6.0/modules.
I: [pulseaudio] main.c: Running in system mode: no
I: [pulseaudio] main.c: Fresh high-resolution timers available! Bon appetit!
D: [pulseaudio] memblock.c: Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
D: [pulseaudio] memblock.c: Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
I: [pulseaudio] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2
I: [pulseaudio] svolume_mmx.c: Initialising MMX optimized volume functions.
I: [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
I: [pulseaudio] svolume_sse.c: Initialising SSE2 optimized volume functions.
I: [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
I: [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.
I: [pulseaudio] svolume_orc.c: Initialising ORC optimized volume functions.
D: [pulseaudio] database-tdb.c: Opened TDB database '/home/bart/.config/pulse/285aceef9581452e8da5a89ae08b86a4-device-volumes.tdb'
I: [pulseaudio] module-device-restore.c: Successfully opened database file '/home/bart/.config/pulse/285aceef9581452e8da5a89ae08b86a4-device-volumes'.
I: [pulseaudio] module.c: Loaded "module-device-restore" (index: #0; argument: "").
D: [pulseaudio] database-tdb.c: Opened TDB database '/home/bart/.config/pulse/285aceef9581452e8da5a89ae08b86a4-stream-volumes.tdb'
I: [pulseaudio] module-stream-restore.c: Successfully opened database file '/home/bart/.config/pulse/285aceef9581452e8da5a89ae08b86a4-stream-volumes'.
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1 added for object /org/pulseaudio/stream_restore1
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry0
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry1
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry2
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry3
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry4
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry5
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry6
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry7
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry8
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry9
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry10
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry11
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry12
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry13
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry14
I: [pulseaudio] module.c: Loaded "module-stream-restore" (index: #1; argument: "").
D: [pulseaudio] database-tdb.c: Opened TDB database '/home/bart/.config/pulse/285aceef9581452e8da5a89ae08b86a4-card-database.tdb'
I: [pulseaudio] module-card-restore.c: Successfully opened database file '/home/bart/.config/pulse/285aceef9581452e8da5a89ae08b86a4-card-database'.
I: [pulseaudio] module.c: Loaded "module-card-restore" (index: #2; argument: "").
I: [pulseaudio] module.c: Loaded "module-augment-properties" (index: #3; argument: "").
I: [pulseaudio] module.c: Loaded "module-switch-on-port-available" (index: #4; argument: "").
D: [pulseaudio] alsa-util.c: Trying hw:CARD=DAC with SND_PCM_NO_AUTO_FORMAT ...
D: [pulseaudio] alsa-util.c: Managed to open hw:CARD=DAC
I: [pulseaudio] alsa-util.c: Disabling tsched mode since BATCH flag is set
D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Signed 24 bit Little Endian in 3bytes) failed: Invalid argument
D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Signed 24 bit Big Endian in 3bytes) failed: Invalid argument
D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Float 32 bit Little Endian) failed: Invalid argument
D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Float 32 bit Big Endian) failed: Invalid argument
D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 682 ms
D: [pulseaudio] alsa-util.c: Set buffer size first (to 19200 samples), period size second (to 4800 samples).
I: [pulseaudio] alsa-util.c: Device hw:CARD=DAC doesn't support sample format s24le, changed to s32le.
Offline
I have the same DAC and the same issues. I have not found a solution, but I have found some workarounds.
Pulseaudio will work fine as long as the DAC is connected to a usb hub using ehci. It will output the same warnings about sample rate, but will not crash the system and audio plays with expected sample rates. If connected to a hub using xhci, the system will hang and has to be hard reset. It does not matter if the usb port is 2.0 or 3.0.
One workaround is to disable xhci in the BIOS. I also assume that using an external usb 2.0 hub will force ehci to be used, but I can't find one for testing this.
Unfortunately, the laptop I use while travelling does not have an option for disabling xhci. To avoid the crashing, I've added a udev rule so that pulseaudio will ignore the device:
/etc/udev/rules.d/89-pulseaudio-usb.rules
ATTRS{idVendor}=="2972", ATTRS{idProduct}=="0003", ENV{PULSE_IGNORE}="1"
This works fine for applications where you can specify an ALSA device for audio output such as VLC and Deadbeef, but I'd love to find a real solution
Offline
Acceptable solution for me was to create a script to disable usb3 and route all usb ports to the ehci controller using setpci. I run this script as root before plugging in the DAP. The workaround does not persist through reboot or suspend/resume. It is also a bit heavy handed and could be refined to target one specific usb port. rmmod on the xhci modules could probably also be avoided, but this works well enough for me that I thought I would post it for others struggling with crashes. 00:14.0 is the slot listed for usb xhci controller when running lspci.
#!/bin/sh
rmmod xhci_pci
rmmod xhci_hcd
setpci -H1 -s 00:14.0 d8.l=0
setpci -H1 -s 00:14.0 d0.l=0
The workaround is obviously chipset specific, but from what I have read the issues seem related to intel chipsets anyway.
Offline
I was bewildered by this, when I did an experiment to verify bit perfect. I posted a bit perfect kit for Fiio https://github.com/rickyzhang82/bit_perfect
I'm sure that Fiio change sample rate correctly as DAC. But when I aplay s32le format PCM to Fiio, it seems to play fine. Unless I have coaxial cable to connect to other sink, I can't tell why it happens.
Offline
@smiba, what do you specify for default-sample-format in pulseaudio? nvm, apparently you set it to "s24le", because it's trying "Signed 24 bit Little Endian in 3bytes"
Try to check the capabilities of the card:
[tom@localhost ~]$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=STX
Xonar STX, Multichannel
Default Audio Device
sysdefault:CARD=STX
Xonar STX, Multichannel
Default Audio Device
front:CARD=STX,DEV=0
Xonar STX, Multichannel
Front speakers
surround21:CARD=STX,DEV=0
Xonar STX, Multichannel
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=STX,DEV=0
Xonar STX, Multichannel
4.0 Surround output to Front and Rear speakers
surround41:CARD=STX,DEV=0
Xonar STX, Multichannel
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=STX,DEV=0
Xonar STX, Multichannel
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=STX,DEV=0
Xonar STX, Multichannel
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=STX,DEV=0
Xonar STX, Multichannel
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=STX,DEV=0
Xonar STX, Multichannel
IEC958 (S/PDIF) Digital Audio Output
[tom@localhost ~]$ aplay -D front:CARD=STX,DEV=0 --dump-hw-params 16.wav
Playing WAVE '16.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
HW Params of device "front:CARD=STX,DEV=0":
--------------------
ACCESS: MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT: S16_LE S32_LE
SUBFORMAT: STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [32 64]
CHANNELS: 2
RATE: [32000 192000]
PERIOD_TIME: (41 8192000]
PERIOD_SIZE: [8 262144]
PERIOD_BYTES: [64 2097152]
PERIODS: [1 32768]
BUFFER_TIME: (41 8192000]
BUFFER_SIZE: [8 262144]
BUFFER_BYTES: [64 1048576]
TICK_TIME: ALL
--------------------
[tom@localhost ~]$
You can use the corresponding default-sample-format if the FORMAT is listed above:
[FORMAT: default-sample-format]
S16_LE: s16le
S24_3LE: s24le
S24_LE: s24-32le
S32_LE: s32le
In my case, I can either set default-sample-format to s16le or s32le.
I am not sure if it helps, but maybe you can see if setting a viable default-sample-format prevents pulseaudio from freezing. Also see if freezes on all the viable ones.
Btw PulseAudio would use "MMAP_INTERLEAVED" it it appears to be supported (see ACCESS in the aplay --dump-hw-params output). I wonder if it can be a trigger to the freeze as well. Try aplay with '-M'/'--mmap' on some 32-bit files to see if it plays fine.
Last edited by tom.ty89 (2015-12-26 07:48:19)
Offline
I was bewildered by this, when I did an experiment to verify bit perfect. I posted a bit perfect kit for Fiio https://github.com/rickyzhang82/bit_perfect
I'm sure that Fiio change sample rate correctly as DAC. But when I aplay s32le format PCM to Fiio, it seems to play fine. Unless I have coaxial cable to connect to other sink, I can't tell why it happens.
AFAIK only a few drivers use/support S24_LE or S24_3LE, and I don't know if they really have any advantages. Truth is if you for example play a wav file with pcm_s24le with mpv:
[ad] Codec list:
[ad] lavc:pcm_s24le - PCM signed 24-bit little-endian
[ad] Opening audio decoder lavc:pcm_s24le
[ad] Requesting 1 threads for decoding.
[ad] Selected audio codec: PCM signed 24-bit little-endian [lavc:pcm_s24le]
[cplayer] Starting playback...
[af] Audio filter chain:
[af] [in] 44100Hz stereo 2ch s32
[af] [out] 44100Hz stereo 2ch s32
[af] [ao] 44100Hz stereo 2ch s32
[ao] Trying audio driver 'pulse'
[ao/pulse] requested format: 44100 Hz, stereo channels, s32
or even ffplay:
Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s32 (24 bit), 2116 kb/s
it's actually processed as (padded to?) 32-bit anyway.
And interestingly, you can probably see:
alsa.resolution_bits = "24"
under "properties" of the sink in `pacmd list-sinks` even though you're using s32le.
Last edited by tom.ty89 (2015-12-26 08:02:25)
Offline