You are not logged in.
Pages: 1
I'm using an external USB audio interface (M-Audio M-Track Plus) on latest Arch.
Whenever I click on KDE Plasma sound icon on system tray, the audio sample rate changes from the default 44100Hz (I set on daemon.conf) to 48000Hz. I don't need to do anything else, just clicking the icon makes pulseaudio to change it. Thus, the pitch of the audio I'm listening gets lower instantly.
This issue also happens when running some games on Steam (probably the ones which uses Proton/Wine).
$ pacman -Qi pulseaudio
Name : pulseaudio
Version : 14.2-3
I tried to set Pulseaudio default sample rate to 44100 on /etc/pulse/daemon.conf, but it seems to have no effect.
$ grep sample-rate /etc/pulse/daemon.conf
default-sample-rate = 44100
; alternate-sample-rate = 48000
As you can see below, Pulseaudio keeps using 48000Hz and, even if I force it to 44100, it keeps changing when running some applications (as the example I gave of Steam and KDE sound system tray icon).
$ pacmd list-sinks | grep sample
sample spec: s32le 2ch 48000Hz
$ cat /proc/asound/cards
...
1 [Plus ]: USB-Audio - M-Track Plus
M-Audio M-Track Plus at usb-0000:00:14.0-2, high speed
...
As you can see, ALSA is working with 48000Hz.
$ cat /proc/asound/card1/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 44100
buffer_size: 88200
If I could just set the sample rate to be fixed on some frequency, it would be great.
So far, there's nothing I do that fixes the issue.
Does anyone have any clues?
Thanks
Last edited by radiobla (2021-04-25 13:31:09)
Offline
If you set both the alternate and the default-sample-rate to the same value, do you still have issues? FWIW if the alsa HW params give you this output then you probably want to do the reverse and fixate on 48000 since that's what the interface supports.
Offline
Thank you, V1d3l.
Setting both default and alternate sample rates serves as a workaround (but works). I'm pretty sure that my interface supports 44100Hz. I was trying to use 44.1kHz in order to define a standard to work with pro-audio.
BTW, neither Plasma sound system tray function or Steam games should have this strange behavior.
When the problem happens, the only solution is to restart Pulseaudio service.
Thanks
Offline
This can happen if you have an interface that claims to be able to do something but runs into issues when actually doing that something. There are many buggy cards that claim support for both and then fail when actually trying to do that. What's the output of
sudo lsusb -vd$VID:$PID
with the relevant vid and pids replaced for the device?
Offline
I got a huge output. Here it goes:
Bus 001 Device 003: ID 0763:4009 M-Audio M-Track Plus
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x0763 M-Audio
idProduct 0x4009
bcdDevice 1.00
iManufacturer 1 M-Audio
iProduct 3 M-Track Plus
iSerial 0
bNumConfigurations 2
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0118
bNumInterfaces 4
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 3 M-Track Plus
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 2.00
bCategory 8
wTotalLength 0x0077
bmControls 0x00
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 10 (CLOCK_SOURCE)
bClockID 41
bmAttributes 3 Internal programmable clock
bmControls 0x07
Clock Frequency Control (read/write)
Clock Validity Control (read-only)
bAssocTerminal 0
iClockSource 9 M-Audio Internal Clock
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 11 (CLOCK_SELECTOR)
bClockID 40
bNrInPins 1
baCSourceID(0) 41
bmControls 0x03
Clock Selector Control (read/write)
iClockSelector 8 M-Audio Clock Selector
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bCSourceID 40
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 13 M-Track Plus 1
bmControls 0x0000
iTerminal 6 M-Audio M-Track Plus
AudioControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 10
bSourceID 2
bmaControls(0) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(1) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(2) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 20
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 10
bCSourceID 40
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Microphone
bAssocTerminal 0
bCSourceID 40
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 13 M-Track Plus 1
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 11
bSourceID 1
bmaControls(0) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(1) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(2) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 22
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 11
bCSourceID 40
bmControls 0x0000
iTerminal 7 M-Audio M-Track Plus
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4 M-Audio M-Track Plus
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4 M-Audio M-Track Plus
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 11 M-Track Plus 1
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
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0x0008
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
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5 M-Audio M-Track Plus
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5 M-Audio M-Track Plus
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 22
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 13 M-Track Plus 1
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 0x82 EP 2 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0x0008
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 254 Application Specific Interface
bInterfaceSubClass 1 Device Firmware Update
bInterfaceProtocol 1
iInterface 10 M-Audio DFU
Device Firmware Upgrade Interface Descriptor:
bLength 9
bDescriptorType 33
bmAttributes 7
Will Not Detach
Manifestation Tolerant
Upload Supported
Download Supported
wDetachTimeout 250 milliseconds
wTransferSize 64 bytes
bcdDFUVersion 1.10
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0118
bNumInterfaces 4
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 3 M-Track Plus
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 2.00
bCategory 8
wTotalLength 0x0077
bmControls 0x00
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 10 (CLOCK_SOURCE)
bClockID 41
bmAttributes 3 Internal programmable clock
bmControls 0x07
Clock Frequency Control (read/write)
Clock Validity Control (read-only)
bAssocTerminal 0
iClockSource 9 M-Audio Internal Clock
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 11 (CLOCK_SELECTOR)
bClockID 40
bNrInPins 1
baCSourceID(0) 41
bmControls 0x03
Clock Selector Control (read/write)
iClockSelector 8 M-Audio Clock Selector
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bCSourceID 40
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 13 M-Track Plus 1
bmControls 0x0000
iTerminal 6 M-Audio M-Track Plus
AudioControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 10
bSourceID 2
bmaControls(0) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(1) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(2) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 20
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 10
bCSourceID 40
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Microphone
bAssocTerminal 0
bCSourceID 40
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 13 M-Track Plus 1
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 11
bSourceID 1
bmaControls(0) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(1) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(2) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 22
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 11
bCSourceID 40
bmControls 0x0000
iTerminal 7 M-Audio M-Track Plus
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4 M-Audio M-Track Plus
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4 M-Audio M-Track Plus
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 11 M-Track Plus 1
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
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0x0008
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
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5 M-Audio M-Track Plus
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5 M-Audio M-Track Plus
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 22
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 13 M-Track Plus 1
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 0x82 EP 2 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0x0008
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 254 Application Specific Interface
bInterfaceSubClass 1 Device Firmware Update
bInterfaceProtocol 1
iInterface 10 M-Audio DFU
Device Firmware Upgrade Interface Descriptor:
bLength 9
bDescriptorType 33
bmAttributes 7
Will Not Detach
Manifestation Tolerant
Upload Supported
Download Supported
wDetachTimeout 250 milliseconds
wTransferSize 64 bytes
bcdDFUVersion 1.10
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0000
(Bus Powered)
Offline
Thank you, V1d3l.
Setting both default and alternate sample rates serves as a workaround (but works). I'm pretty sure that my interface supports 44100Hz. I was trying to use 44.1kHz in order to define a standard to work with pro-audio.
I've been doing the same thing, setting default and alternate sample rates to 44100, then if I check the card with (and some audio running)
cat /proc/asound/card0/pcm0p/sub0/hw_params
it returns those values (rate: 44100, format: S16_LE)
I use this to check the card's abilities (to ensure that 44100 was available):
grep rates /proc/asound/card0/codec\#0
rates [0x560]: 44100 48000 96000 192000
rates [0x60]: 44100 48000
rates [0x60]: 44100 48000
rates [0x5e0]: 44100 48000 88200 96000 192000
rates [0x560]: 44100 48000 96000 192000
rates [0x560]: 44100 48000 96000 192000
I dunno what the difference between, e.g. 'rates [0x560]' and 'rates [0x5e0]'...but they all show 44100.
"If you do not change direction, you may end up where you are heading." -- L.T.
Offline
Flemur,
Do you have this same audio interface? (M-Audio M-Track Plus)
I don't have this codec#0 file on my /proc/asound. Strange.
Last edited by radiobla (2021-04-26 18:40:54)
Offline
I don't know either, but it could to be related with Input or Ouput sample rate, or maybe to the Analog or Digital I/O.
Last edited by radiobla (2021-04-26 18:41:27)
Offline
Flemur,
Do you have this same audio interface? (M-Audio M-Track Plus)
Nope, just an onboad Intel chip. But I wouldn't mind having one of those gizmos!
I don't have this codec#0 file on my /proc/asound. Strange.
To see what's there, try something like
du -a /proc/asound
FWIW, I got involved in this stuff* when I noticed that the default pulseaudio settings made it resample my 44.1K files to 48K.
AND I noticed that even outputting directly to alsa, as the link below, alsa would resample 44.1 to 48 without using pulseaudio.
Edit: The above is INcorrect; I'm experimenting, and (outputting direct to) alsa doesn't resample 44.1 to 48k with one source playing, at least as shown by
cat /proc/asound/card0/pcm0p/sub0/hw_params
where it matches the input, 44.1 or 48.
*https://www.head-fi.org/threads/bit-per … ux.561961/
Last edited by Flemur (2021-04-26 20:07:43)
"If you do not change direction, you may end up where you are heading." -- L.T.
Offline
Edit: The above is INcorrect; I'm experimenting, and (outputting direct to) alsa doesn't resample 44.1 to 48k with one source playing, at least as shown by
cat /proc/asound/card0/pcm0p/sub0/hw_params
where it matches the input, 44.1 or 48.
The resample usually happens with more than one sources playing. For example, I'm listening to music on web then I open a game on Steam so the issue (resampling) happens. It happens specially with games on Proton.
I use Jack2 for pro-audio also. If you have Jack running, the problem doesn't happen. At least, not with me.
I bet it's a bug on Pulseaudio.
Flemur, what is your current setup (Window/Desktop Manager, Web Browser, etc)? Do you use "pro-audio"?
As I've mentioned on previous posts, when I click on the "Sound" icon on Plasma system tray, the resampling happens instantly.
Offline
Pages: 1