You are not logged in.

#1 2021-01-15 10:37:02

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

PulseAudio skips on *all* audio sinks

I get this kind of audio skipping playing *any* audio on *any* sink in my system. I've tried it with the bult-in sof-hda-dsp chip, a USB "Sound Blaster Play! 3", and my bluetooth Sony WH-1000XM4. They all experience the same intermittent audio skips, though the output messages sometimes differ a little between drivers.

Jan 15 09:56:39 Freja pulseaudio[141767]: Skipping 39002 us (= 6880 bytes) in audio stream
Jan 15 09:58:17 Freja pulseaudio[141767]: Skipping 106054 us (= 18708 bytes) in audio stream
Jan 15 10:04:49 Freja pulseaudio[141767]: Skipping 39410 us (= 6952 bytes) in audio stream
Jan 15 10:07:25 Freja pulseaudio[141767]: Skipping 74965 us (= 13224 bytes) in audio stream
Jan 15 10:08:01 Freja pulseaudio[141767]: Skipping 47505 us (= 8380 bytes) in audio stream
Jan 15 10:08:25 Freja pulseaudio[141767]: Skipping 83083 us (= 14656 bytes) in audio stream
Jan 15 10:09:17 Freja pulseaudio[141767]: Skipping 70793 us (= 12488 bytes) in audio stream
Jan 15 10:10:21 Freja pulseaudio[141767]: Skipping 96122 us (= 16956 bytes) in audio stream
Jan 15 10:14:19 Freja pulseaudio[141767]: Skipping 71609 us (= 12632 bytes) in audio stream
Jan 15 10:14:49 Freja pulseaudio[141767]: Skipping 108140 us (= 19076 bytes) in audio stream
Jan 15 10:18:21 Freja pulseaudio[141767]: Skipping 71746 us (= 12656 bytes) in audio stream
Jan 15 10:23:55 Freja pulseaudio[141767]: Skipping 58911 us (= 10392 bytes) in audio stream
Jan 15 10:24:29 Freja pulseaudio[141767]: Skipping 61428 us (= 10836 bytes) in audio stream
Jan 15 10:24:35 Freja pulseaudio[141767]: Skipping 58299 us (= 10284 bytes) in audio stream

The general guidance seems to be to try `tsched=0`. This had no effect for me. There are also suggestions of increasing the value of `device.buffering.buffer_size` on the audio sink. However, the bluetooth driver doesn't have any properties on the sink that seem buffer-related, so that doesn't seem like a viable solution. I've tried `renicing` the `pulseaudio` process all the way to -17, but no change.

It's driving me crazy. Any help would be appreciated.

Offline

#2 2021-01-15 11:10:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: PulseAudio skips on *all* audio sinks

What's your actual system specs? Does this really just happen with pulseaudio or is e.g.

aplay -Dhw:0 $testfile #Replace hw:0 with whatever the correct device is according to aplay -l

similarly affected?

It does sound similar to https://bbs.archlinux.org/viewtopic.php … 9#p1931729 to me, which would mean that there's "something else" occupying your system and thus not leaving enough room for pulseaudio to properly serve audio.

Maybe check /proc/interrupts or/and kernel logs whether something is having excessive interrupts/low level activity. Maybe post a complete system log

sudo journalctl -b

while reproducing this.

Online

#3 2021-01-15 12:35:27

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

Re: PulseAudio skips on *all* audio sinks

Ah yes, sorry: I should already have mentioned that I tried watching system logs (journalctl -f) and couldn't see anything logged around the time of the skips. Thanks for the suggestions: I will watch interrupts and try aplay and get back to you.

This is a Dell Inspiron 15 7590 with dual Intel/Nvidia graphics.

Last edited by giddie (2021-01-15 12:37:17)

Offline

#4 2021-01-18 14:54:43

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

Re: PulseAudio skips on *all* audio sinks

Update: no discernable skips when playing into ALSA directly via aplay.

Offline

#5 2021-01-19 08:29:54

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

Re: PulseAudio skips on *all* audio sinks

/proc/interrupts is as follows, though I don't really have an idea of what a normal baseline would be. Without a simple way of visualising changes, it's also not easy to see if there's a spike anywhere when skips occur. If you're aware of a tool that can visualise interrupt spikes, that could be very interesting.

            CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7
   0:          6          0          0          0          0          0          0          0  IR-IO-APIC    2-edge      timer
   1:          0          0          0          0          0          0      26231          0  IR-IO-APIC    1-edge      i8042
   8:          0          0          0          0          0          0          0          0  IR-IO-APIC    8-edge      rtc0
   9:          0     107854          0          0          0          0          0          0  IR-IO-APIC    9-fasteoi   acpi
  14:          0          0          0          0          0          0          0          0  IR-IO-APIC   14-fasteoi   INT3450:00
  16:          0          0          0          0          0          3          0          0  IR-IO-APIC   16-fasteoi   idma64.0, i2c_designware.0, i801_smbus
  17:          0          0          0          0          0          0       1246          0  IR-IO-APIC   17-fasteoi   idma64.1, i2c_designware.1
  51:          0          0          0          0          0          0          0         64  IR-IO-APIC   51-fasteoi   DELL0922:00
 120:          0          0          0          0          0          0          0          0  DMAR-MSI    0-edge      dmar0
 121:          0          0          0          0          0          0          0          0  DMAR-MSI    1-edge      dmar1
 122:          0          0          0          0          0          0          0          0  IR-PCI-MSI 16384-edge      PCIe PME
 123:          0          0          0          0          0          0          0          0  IR-PCI-MSI 442368-edge      PCIe PME, pciehp
 124:          0          0          0          0          0          0          0          0  IR-PCI-MSI 450560-edge      PCIe PME
 125:          0          0          0          0          0          0          0          0  IR-PCI-MSI 475136-edge      PCIe PME
 127:          0          0          0          0          0          0          0          0  IR-PCI-MSI 1589248-edge      pciehp
 129:          0          0          0          0          0          0          0          0  IR-PCI-MSI 376832-edge      ahci[0000:00:17.0]
 130:          0          0          0          0         35          0          0          0  IR-PCI-MSI 30932992-edge      nvme0q0
 131:          0          0          0          0         45          0          0          0  IR-PCI-MSI 360448-edge      mei_me
 132:      62350          0          0          0          0          0          0          0  IR-PCI-MSI 30932993-edge      nvme0q1
 133:          0     198217          0          0          0          0          0          0  IR-PCI-MSI 30932994-edge      nvme0q2
 134:          0          0     248666          0          0          0          0          0  IR-PCI-MSI 30932995-edge      nvme0q3
 135:          0          0          0      61233          0          0          0          0  IR-PCI-MSI 30932996-edge      nvme0q4
 136:          0          0          0          0      64072          0          0          0  IR-PCI-MSI 30932997-edge      nvme0q5
 137:          0          0          0          0          0      60355          0          0  IR-PCI-MSI 30932998-edge      nvme0q6
 138:          0          0          0          0          0          0      61300          0  IR-PCI-MSI 30932999-edge      nvme0q7
 139:          0          0          0          0          0          0          0      58983  IR-PCI-MSI 30933000-edge      nvme0q8
 140:          0          0          0          0          0         21          0          0  IR-PCI-MSI 31457280-edge      nvme1q0
 141:          8          0          0          0          0          0          0          0  IR-PCI-MSI 31457281-edge      nvme1q1
 142:          0        212          0          0          0          0          0          0  IR-PCI-MSI 31457282-edge      nvme1q2
 143:          0          0        119          0          0          0          0          0  IR-PCI-MSI 31457283-edge      nvme1q3
 144:          0          0          0         70          0          0          0          0  IR-PCI-MSI 31457284-edge      nvme1q4
 145:          0          0          0          0         26          0          0          0  IR-PCI-MSI 31457285-edge      nvme1q5
 146:          0          0          0          0          0        102          0          0  IR-PCI-MSI 31457286-edge      nvme1q6
 147:          0          0          0          0          0          0        104          0  IR-PCI-MSI 31457287-edge      nvme1q7
 148:          0     518992          0          0          0          0          0          0  IR-PCI-MSI 32768-edge      i915
 149:          0          0     162550          0          0          0          0          0  IR-PCI-MSI 327680-edge      xhci_hcd
 150:          0          0          0         42          0          0          0          0  IR-PCI-MSI 30408704-edge      xhci_hcd
 151:        404          0          0          0          0          0          0          0  IR-PCI-MSI 2097152-edge      thunderbolt
 152:          0        404          0          0          0          0          0          0  IR-PCI-MSI 2097153-edge      thunderbolt
 167:          0          0          0          0          0          0          0        153  IR-PCI-MSI 31457288-edge      nvme1q8
 168:          0          0          0      57372          0          0          0          0  IR-PCI-MSI 333824-edge      iwlwifi: default queue
 169:      15151          0          0          0          0          0          0          0  IR-PCI-MSI 333825-edge      iwlwifi: queue 1
 170:          0      13557          0          0          0          0          0          0  IR-PCI-MSI 333826-edge      iwlwifi: queue 2
 171:          0          0      13059          0          0          0          0          0  IR-PCI-MSI 333827-edge      iwlwifi: queue 3
 172:          0          0          0       6353          0          0          0          0  IR-PCI-MSI 333828-edge      iwlwifi: queue 4
 173:        143          0          0          0          0          0          0          0  IR-PCI-MSI 333829-edge      iwlwifi: exception
 174:          0          0          0          0       2703          0          0          0  IR-PCI-MSI 514048-edge      AudioDSP
 175:          0          0          0          0          0     133098          0          0  IR-PCI-MSI 524288-edge      nvidia
 NMI:          0          0          1          0          0          0          1          0   Non-maskable interrupts
 LOC:    2045425    2284365    1985111    1952207    1978633    1904198    2043329    1955425   Local timer interrupts
 SPU:          0          0          0          0          0          0          0          0   Spurious interrupts
 PMI:          0          0          1          0          0          0          1          0   Performance monitoring interrupts
 IWI:       6717     194898       8411       7296       7090       6778       6980       7114   IRQ work interrupts
 RTR:          0          0          0          0          0          0          0          0   APIC ICR read retries
 RES:      87029      69382      52013      46632      61807      46517      57358      47131   Rescheduling interrupts
 CAL:     459200     408576     433309     401247     417335     399672     429478     424707   Function call interrupts
 TLB:     298584     308679     305652     282408     317947     330538     299466     324593   TLB shootdowns
 TRM:      42041      42042      42041      42042      42041      42042      42041      42042   Thermal event interrupts
 THR:          0          0          0          0          0          0          0          0   Threshold APIC interrupts
 DFR:          0          0          0          0          0          0          0          0   Deferred Error APIC interrupts
 MCE:          0          0          0          0          0          0          0          0   Machine check exceptions
 MCP:         15         16         16         16         16         16         16         16   Machine check polls
 ERR:          0
 MIS:          0
 PIN:          0          0          0          0          0          0          0          0   Posted-interrupt notification event
 NPI:          0          0          0          0          0          0          0          0   Nested posted-interrupt event
 PIW:          0          0          0          0          0          0          0          0   Posted-interrupt wakeup event

Offline

#6 2021-01-19 09:11:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: PulseAudio skips on *all* audio sinks

If it's not reproducible with ALSA we've more or less ruled out HW relations. What's your pulse state during this?

pacmd list-sinks
pacmd list-sink-inputs

Online

#7 2021-01-19 10:23:25

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

Re: PulseAudio skips on *all* audio sinks

$ pacmd list-sinks
5 sink(s) available.
    index: 0
	name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_5__sink>
	driver: <module-alsa-card.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE
	priority: 9037
	volume: front-left: 49151 /  75% / -7.50 dB,   front-right: 49151 /  75% / -7.50 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: yes
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 0
	sample spec: s16le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 341.00 ms
	card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
	module: 6
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = ""
		alsa.id = "HDMI3 (*)"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "5"
		alsa.card = "0"
		alsa.card_name = "sof-hda-dsp"
		alsa.long_card_name = "DellInc.-Inspiron7590--08717F"
		alsa.driver_name = "snd_soc_skl_hda_dsp"
		device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.product.name = "Cannon Lake PCH cAVS"
		device.string = "hw:sofhdadsp,5"
		device.buffering.buffer_size = "65472"
		device.buffering.fragment_size = "16320"
		device.access_mode = "mmap+timer"
		device.profile.name = "HiFi: hw:sofhdadsp,5: sink"
		device.profile.description = "HDMI3 Output"
		alsa.mixer_device = "hw:sofhdadsp"
		device.description = "Cannon Lake PCH cAVS HDMI3 Output"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		[Out] HDMI3: HDMI3 Output (priority 700, latency offset 0 usec, available: no)
			properties:
				
	active port: <[Out] HDMI3>
    index: 1
	name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink>
	driver: <module-alsa-card.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE
	priority: 9036
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: yes
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 1
	sample spec: s16le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 341.00 ms
	card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
	module: 6
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = ""
		alsa.id = "HDMI2 (*)"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "4"
		alsa.card = "0"
		alsa.card_name = "sof-hda-dsp"
		alsa.long_card_name = "DellInc.-Inspiron7590--08717F"
		alsa.driver_name = "snd_soc_skl_hda_dsp"
		device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.product.name = "Cannon Lake PCH cAVS"
		device.string = "hw:sofhdadsp,4"
		device.buffering.buffer_size = "65472"
		device.buffering.fragment_size = "16320"
		device.access_mode = "mmap+timer"
		device.profile.name = "HiFi: hw:sofhdadsp,4: sink"
		device.profile.description = "HDMI2 Output"
		alsa.mixer_device = "hw:sofhdadsp"
		device.description = "Cannon Lake PCH cAVS HDMI2 Output"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		[Out] HDMI2: HDMI2 Output (priority 600, latency offset 0 usec, available: yes)
			properties:
				device.product.name = "DELL U2520D"
	active port: <[Out] HDMI2>
    index: 2
	name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink>
	driver: <module-alsa-card.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE
	priority: 9035
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: yes
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 2
	sample spec: s16le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 341.00 ms
	card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
	module: 6
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = ""
		alsa.id = "HDMI1 (*)"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "3"
		alsa.card = "0"
		alsa.card_name = "sof-hda-dsp"
		alsa.long_card_name = "DellInc.-Inspiron7590--08717F"
		alsa.driver_name = "snd_soc_skl_hda_dsp"
		device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.product.name = "Cannon Lake PCH cAVS"
		device.string = "hw:sofhdadsp,3"
		device.buffering.buffer_size = "65472"
		device.buffering.fragment_size = "16320"
		device.access_mode = "mmap+timer"
		device.profile.name = "HiFi: hw:sofhdadsp,3: sink"
		device.profile.description = "HDMI1 Output"
		alsa.mixer_device = "hw:sofhdadsp"
		device.description = "Cannon Lake PCH cAVS HDMI1 Output"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		[Out] HDMI1: HDMI1 Output (priority 500, latency offset 0 usec, available: no)
			properties:
				
	active port: <[Out] HDMI1>
    index: 3
	name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE
	priority: 9032
	volume: front-left: 39320 /  60% / -13.31 dB,   front-right: 39320 /  60% / -13.31 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 3
	sample spec: s16le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 341.00 ms
	card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
	module: 6
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = ""
		alsa.id = "HDA Analog (*)"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "sof-hda-dsp"
		alsa.long_card_name = "DellInc.-Inspiron7590--08717F"
		alsa.driver_name = "snd_soc_skl_hda_dsp"
		device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.product.name = "Cannon Lake PCH cAVS"
		device.string = "hw:sofhdadsp"
		device.buffering.buffer_size = "65472"
		device.buffering.fragment_size = "16320"
		device.access_mode = "mmap+timer"
		device.profile.name = "HiFi: hw:sofhdadsp: sink"
		device.profile.description = "Speaker + Headphones"
		alsa.mixer_device = "hw:sofhdadsp"
		device.description = "Cannon Lake PCH cAVS Speaker + Headphones"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		[Out] Speaker: Speaker (priority 100, latency offset 0 usec, available: unknown)
			properties:
				
		[Out] Headphones: Headphones (priority 200, latency offset 0 usec, available: no)
			properties:
				
	active port: <[Out] Speaker>
  * index: 4
	name: <bluez_sink.94_DB_56_94_0D_50.a2dp_sink>
	driver: <module-bluez5-device.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY 
	state: RUNNING
	suspend cause: (none)
	priority: 9050
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 33.71 ms
	max request: 1 KiB
	max rewind: 0 KiB
	monitor source: 6
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 1
	fixed latency: 30.80 ms
	card: 1 <bluez_card.94_DB_56_94_0D_50>
	module: 26
	properties:
		bluetooth.protocol = "a2dp_sink"
		bluetooth.a2dp_codec = "LDAC"
		device.description = "WH-1000XM4"
		device.string = "94:DB:56:94:0D:50"
		device.api = "bluez"
		device.class = "sound"
		device.bus = "bluetooth"
		device.form_factor = "headset"
		bluez.path = "/org/bluez/hci0/dev_94_DB_56_94_0D_50"
		bluez.class = "0x240404"
		bluez.alias = "WH-1000XM4"
		device.icon_name = "audio-headset-bluetooth"
		device.intended_roles = "phone"
	ports:
		headset-output: Headset (priority 0, latency offset 0 usec, available: yes)
			properties:
				
	active port: <headset-output>
$ pacmd list-sink-inputs
1 sink input(s) available.
    index: 4
	driver: <protocol-native.c>
	flags: 
	state: RUNNING
	sink: 4 <bluez_sink.94_DB_56_94_0D_50.a2dp_sink>
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 250.02 ms
	requested latency: 30.80 ms
	sample spec: s16le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	resample method: speex-float-1
	module: 11
	client: 1 <Music Player Daemon>
	properties:
		media.name = "PulseAudio"
		application.name = "Music Player Daemon"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "34"
		media.role = "music"
		application.icon_name = "mpd"
		application.process.id = "1783"
		application.process.user = "dannpg"
		application.process.host = "Freja"
		application.process.binary = "mpd"
		application.language = "C"
		application.process.machine_id = "49e4bfe5c296b67330d9d610000003ef"
		module-stream-restore.id = "sink-input-by-media-role:music"

Offline

#8 2021-01-22 13:13:02

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

Re: PulseAudio skips on *all* audio sinks

Using a CT Sound Blaster Play 3, I can also rule out resampling as a source of the issues, since it's set to "copy":

1 sink input(s) available.
    index: 0
	driver: <protocol-native.c>
	flags: 
	state: RUNNING
	sink: 0 <alsa_output.usb-Creative_Technology_Ltd_Sound_Blaster_Play__3_00106420-00.analog-stereo>
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 95.01 ms
	requested latency: 210.00 ms
	sample spec: float32le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: copy
	module: 12
	client: 7 <Music Player Daemon>
	properties:
		media.name = "PulseAudio"
		application.name = "Music Player Daemon"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "34"
		media.role = "music"
		application.icon_name = "mpd"
		application.process.id = "1782"
		application.process.user = "dannpg"
		application.process.host = "Freja"
		application.process.binary = "mpd"
		application.language = "C"
		application.process.machine_id = "49e4bfe5c296b67330d9d610000003ef"
		module-stream-restore.id = "sink-input-by-media-role:music"

Using this card, the pulseaudio log is a little different, though the results in the output audio are the same. In fact not each skip is logged, which is interesting:

Jan 22 13:11:10 Freja pulseaudio[401904]: alsa_output.usb-Creative_Technology_Ltd_Sound_Blaster_Play__3_00106420-00.analog-stereo: state: IDLE -> RUNNING
Jan 22 13:11:10 Freja pulseaudio[401904]: Requesting rewind due to end of underrun.
Jan 22 13:11:10 Freja pulseaudio[401904]: Requested to rewind 37044 bytes.
Jan 22 13:11:10 Freja pulseaudio[401904]: Limited to 35732 bytes.
Jan 22 13:11:10 Freja pulseaudio[401904]: before: 8933
Jan 22 13:11:10 Freja pulseaudio[401904]: after: 8933
Jan 22 13:11:10 Freja pulseaudio[401904]: Rewound 35732 bytes.
Jan 22 13:11:10 Freja pulseaudio[401904]: Processing rewind...
Jan 22 13:11:10 Freja pulseaudio[401904]: latency = 15451
Jan 22 13:11:10 Freja pulseaudio[401904]: Have to rewind 35732 bytes on render memblockq.
Jan 22 13:11:10 Freja pulseaudio[401904]: Processing rewind...
Jan 22 13:11:33 Freja pulseaudio[401904]: Scheduling delay of 37.76 ms > 20.00 ms, you might want to investigate this to improve latency...
Jan 22 13:11:41 Freja pulseaudio[401904]: Scheduling delay of 79.24 ms > 20.00 ms, you might want to investigate this to improve latency...
Jan 22 13:12:10 Freja pulseaudio[401904]: Scheduling delay of 32.53 ms > 20.00 ms, you might want to investigate this to improve latency...
Jan 22 13:12:23 Freja pulseaudio[401904]: Scheduling delay of 22.05 ms > 20.00 ms, you might want to investigate this to improve latency...
Jan 22 13:12:46 Freja pulseaudio[401904]: Scheduling delay of 72.57 ms > 20.00 ms, you might want to investigate this to improve latency...

Last edited by giddie (2021-01-22 13:13:23)

Offline

#9 2021-02-02 15:11:03

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

Re: PulseAudio skips on *all* audio sinks

I've now tried pipewire. The same thing happens there, although I notice the skips are often slightly "fuzzier", as if there's a little distortion on each skip. Here's some of the output from the pipewire service:

Feb 02 15:09:11 Freja pipewire[3251936]: (alsa_output.pci-0000:00:1f.3-platform-skl_hda_dsp_generic.HiFi: hw:sofhdadsp: sink-51) client missed 1 wakeups
Feb 02 15:09:13 Freja pipewire[3251936]: 2 events suppressed
Feb 02 15:09:13 Freja pipewire[3251936]: (alsa_output.pci-0000:00:1f.3-platform-skl_hda_dsp_generic.HiFi: hw:sofhdadsp: sink-51) XRun! rate:512/48000 count:39 time:73749180520 delay:7 max:7
Feb 02 15:09:17 Freja pipewire[3251936]: 3 events suppressed
Feb 02 15:09:17 Freja pipewire[3251936]: (alsa_output.pci-0000:00:1f.3-platform-skl_hda_dsp_generic.HiFi: hw:sofhdadsp: sink-51) XRun! rate:512/48000 count:41 time:73753210523 delay:5 max:7
Feb 02 15:09:21 Freja pipewire[3251936]: 1 events suppressed
Feb 02 15:09:21 Freja pipewire[3251936]: (alsa_output.pci-0000:00:1f.3-platform-skl_hda_dsp_generic.HiFi: hw:sofhdadsp: sink-51) XRun! rate:512/48000 count:42 time:73757236610 delay:5 max:7
Feb 02 15:10:01 Freja pipewire[3251936]: 1 events suppressed
Feb 02 15:10:01 Freja pipewire[3251936]: (alsa_output.pci-0000:00:1f.3-platform-skl_hda_dsp_generic.HiFi: hw:sofhdadsp: sink-51) XRun! rate:512/48000 count:43 time:73797155047 delay:6 max:7

Again, when I play directly through ALSA, there are no audible artefacts at all:

aplay -Dhw:0,0 test.wav

Offline

#10 2021-02-02 16:35:26

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

Re: PulseAudio skips on *all* audio sinks

I think there's a decent possibility it's related to this:

https://gitlab.freedesktop.org/pulseaud … ssues/1122

Offline

Board footer

Powered by FluxBB