[pulseaudio-discuss] iec958 (S/PDIF) + USB = 100% CPU usage

Ismael Farfán sulfurfff at gmail.com
Fri Sep 8 17:00:35 UTC 2023


Hi Sean

I noticed it only happens when using 5.1 audio and something is playing.
It triggers 100% usage from 1 core, not the whole CPU
So this causes the issue : Digital Surround 5.1 (IEC958/AC3)
But the stereo ones doesn't: Digital Stereo (Duplex) (IEC958)

I'll try updating my kernel from backports and see if I can squeeze more
logs.

I haven't found how to get only pulse audio logs from journalctl
journalctl --user _SYSTEMD_UNIT=pulseaudio.service

I'll come back when I get more info about this issue, may actually try with
arch :v

systemctl status --user pulseaudio
sep 08 08:17:39  pulseaudio[1822]: Failed to open module
module-zeroconf-publish.so: module-zeroconf-publish.so: cannot open shared
object file: No such file or directory
sep 08 08:17:39  pulseaudio[1822]: Failed to open module
"module-zeroconf-publish".
sep 08 08:17:39  pulseaudio[1822]: module-rescue-stream is obsolete and
should no longer be loaded. Please remove it from your configuration.
sep 08 08:17:39  pulseaudio[1822]: Failed to open module
module-zeroconf-publish.so: module-zeroconf-publish.so: cannot open shared
object file: No such file or directory
sep 08 08:17:39  pulseaudio[1822]: Failed to open module
"module-zeroconf-publish".
sep 08 08:17:39  pulseaudio[1822]: Module "module-rescue-streams" should be
loaded once at most. Refusing to load.
sep 08 08:17:39  systemd[1806]: Started pulseaudio.service - Sound Service.
sep 08 08:17:39  pulseaudio[1822]: Could not find
org.bluez.BatteryProviderManager1.RegisterBatteryProvider(), is bluetoothd
started with experimental features enabled (-E flag)?
sep 08 10:28:35  pulseaudio[1822]: Got POLLNVAL from ALSA
sep 08 10:28:35  pulseaudio[1822]: Error opening PCM device
plug:SLAVE='a52:3': No such file or directory



El jue, 7 sept 2023 a la(s) 22:15, Sean Greenslade (sean at seangreenslade.com)
escribió:

> On Tue, Aug 29, 2023 at 10:25:03AM -0600, Ismael Farfán wrote:
> > Hello pulse
> >
> > I'm not sure if it's a bug or not but, I did google around for about an
> > hour.
> >
> > I noticed that whenever I have a device configured with the S/PDIF
> profile
> > (iec958), PulseAudio uses 100% cpu (2 threads 50% each)
> >
> > I have a cheap USB device with optical audio support
> > Bus 003 Device 011: ID 0d8c:0012 C-Media Electronics, Inc. USB Audio
> Device
> > Bus 003 Device 010: ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like
> Sound
> > Device
> >
> > Here's how top looks when anything is grabbing the output, even if it's a
> > paused video. As soon as I close the tab it disappears from top.
> > PID   PRI  NI  VIRT   RES   SHR S  CPU%▽MEM%   TIME+  Command
> > 1820   9 -11 2218M 46576 28064 S  51.5  0.1  3h41:07 /usr/bin/pulseaudio
> > --daemonize=no --log-target=journal
> > 55780  -6   0 2218M 46576 28064 S  50.9  0.1  6:23.43 /usr/bin/pulseaudio
> > --daemonize=no --log-target=journal
> >
> > I changed the profile of my USB headphones to use iec958 and I could see
> > pulseaudio again using 100% cpu even though I only hear noise because the
> > headphones don't support it.
> >
> > So my guess is that it's got something to do with the iec958 encoding.
> >
> > Any ideas?
> >
> > I'm on Debian stable bookworm with KDE Plasma
>
> Hi, Ismael.
>
> I'm sorry to report that I was unable to reproduce your issue. I managed
> to find two different USB audio devices in my collection that enumerate
> with an iec958 interface, one with an actual optical S/PDIF port (a Fiio
> E10) and one without (a Scarlet Solo). Neither device triggered any sort
> of abnormal CPU usage when switched to iec958 compared to the analog
> outputs.
>
> That said, I am running Arch instead of Debian, so I likely have a
> different kernel (and therefore ALSA drivers) and pulse version than
> you. I'm not too familiar with the particulars of Debian, but perhaps
> you could enable backports and see if there's a newer version of pulse
> you could test?
>
> Otherwise, my suggestion for further troubleshooting would be to check
> the pulseaudio logs, increasing the verbosity if need be.
>
> --Sean
>
>

-- 
Do not let me induce you to satisfy my curiosity, from an expectation, that
I shall gratify yours. What I may judge proper to conceal, does not concern
myself alone.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20230908/b50db032/attachment.htm>


More information about the pulseaudio-discuss mailing list