You are not logged in.

#1 2021-06-10 05:55:52

twistkey
Member
Registered: 2021-06-10
Posts: 14

ALSA works, but Pulseaudio and Pipewire do not

Hello, I have a headless system that plays HDMI audio perfectly fine when using ALSA, but I want to switch to Pipewire or Pulseaudio as I understand they are good for having multiple programs playing audio at once (which I occasionally wish to do).

I cannot get either Pulseaudio or Pipewire (with the pipewire-pulse package) to work. I currently have Pipewire installed. Here is the output of a few commands which might be useful:

aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC256 Analog [ALC256 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 12: HDMI 6 [HDMI 6]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 13: HDMI 7 [HDMI 7]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 14: HDMI 8 [HDMI 8]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 15: HDMI 9 [HDMI 9]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 16: HDMI 10 [HDMI 10]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 17: HDMI 11 [HDMI 11]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pactl list sinks

Sink #38
	State: SUSPENDED
	Name: alsa_output.pci-0000_00_1f.3.hdmi-stereo
	Description: Built-in Audio Digital Stereo (HDMI)
	Driver: PipeWire
	Sample Specification: s32le 2ch 48000Hz
	Channel Map: front-left,front-right
	Owner Module: 4294967295
	Mute: no
	Volume: front-left: 48287 /  74% / -7.96 dB,   front-right: 48287 /  74% / -7.96 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor Source: alsa_output.pci-0000_00_1f.3.hdmi-stereo.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		object.path = "alsa:pcm:0:hdmi:0:playback"
		api.alsa.path = "hdmi:0"
		api.alsa.pcm.card = "0"
		api.alsa.pcm.stream = "playback"
		audio.channels = "2"
		audio.position = "FL,FR"
		device.routes = "1"
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "HDMI 0"
		alsa.id = "HDMI 0"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "3"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0x6001110000 irq 152"
		alsa.driver_name = "snd_hda_intel"
		device.profile.name = "hdmi-stereo"
		device.profile.description = "Digital Stereo (HDMI)"
		card.profile.device = "17"
		device.id = "37"
		factory.name = "api.alsa.pcm.sink"
		priority.driver = "696"
		priority.session = "696"
		media.class = "Audio/Sink"
		node.nick = "HDA Intel PCH"
		node.name = "alsa_output.pci-0000_00_1f.3.hdmi-stereo"
		device.description = "Built-in Audio Digital Stereo (HDMI)"
		device.icon_name = "audio-card-hdmi"
		node.pause-on-idle = "false"
		factory.id = "18"
		client.id = "31"
		node.driver = "true"
		factory.mode = "merge"
		audio.adapt.follower = ""
		library.name = "audioconvert/libspa-audioconvert"
		object.id = "38"
		node.max-latency = "8192/48000"
	Ports:
		hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, availability group: Legacy 2, available)
	Active Port: hdmi-output-0
	Formats:

I don't hear anything when executing the below command (nor when iterating through each device number), and I do not think the device is muted (confirmed with alsamixer):

aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Right.wav

Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
sudo fuser -v /dev/snd/*

                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  nuc         619 F.... pipewire-media-
                     kodi      55780 F.... pipewire-media-
/dev/snd/seq:        nuc         618 F.... pipewire
                     kodi      55778 F.... pipewire
groups

tty pulse-access users video render optical input audio kodi
mpv audio_file.flac

 (+) Audio --aid=1 (flac 2ch 44100Hz)
AO: [pulse] 44100Hz stereo 2ch s16
A: 00:00:00 / 00:03:54 (0%)
systemctl --user status pipewire

● pipewire.service - Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2021-06-10 15:36:41 AEST; 22min ago
TriggeredBy: ● pipewire.socket
   Main PID: 55778 (pipewire)
      Tasks: 2 (limit: 18661)
     Memory: 5.3M
        CPU: 82ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
             └─55778 /usr/bin/pipewire

Jun 10 15:36:41 nuc systemd[55771]: Started Multimedia Service.
Jun 10 15:36:41 nuc pipewire[55778]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 10 15:36:41 nuc pipewire[55778]: could not set nice-level to -11: Permission denied
Jun 10 15:36:41 nuc pipewire[55778]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 10 15:36:41 nuc pipewire[55778]: could not make thread realtime: Permission denied
systemctl --user status pipewire-media-session

● pipewire-media-session.service - Multimedia Service Session Manager
     Loaded: loaded (/usr/lib/systemd/user/pipewire-media-session.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2021-06-10 15:36:41 AEST; 23min ago
   Main PID: 55780 (pipewire-media-)
      Tasks: 2 (limit: 18661)
     Memory: 3.8M
        CPU: 110ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-media-session.service
             └─55780 /usr/bin/pipewire-media-session

Jun 10 15:36:41 nuc systemd[55771]: Started Multimedia Service Session Manager.
Jun 10 15:36:41 nuc pipewire-media-session[55780]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 10 15:36:41 nuc pipewire-media-session[55780]: could not set nice-level to -11: Permission denied
Jun 10 15:36:41 nuc pipewire-media-session[55780]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 10 15:36:41 nuc pipewire-media-session[55780]: could not make thread realtime: Permission denied
Jun 10 15:36:41 nuc pipewire-media-session[55780]: GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown
systemctl --user status pipewire-pulse

● pipewire-pulse.service - PipeWire PulseAudio
     Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2021-06-10 15:36:41 AEST; 24min ago
TriggeredBy: ● pipewire-pulse.socket
   Main PID: 55782 (pipewire-pulse)
      Tasks: 2 (limit: 18661)
     Memory: 1.7M
        CPU: 84ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-pulse.service
             └─55782 /usr/bin/pipewire-pulse

Jun 10 15:36:41 nuc systemd[55771]: Started PipeWire PulseAudio.
Jun 10 15:36:41 nuc pipewire-pulse[55782]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 10 15:36:41 nuc pipewire-pulse[55782]: could not set nice-level to -11: Permission denied
Jun 10 15:36:41 nuc pipewire-pulse[55782]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 10 15:36:41 nuc pipewire-pulse[55782]: could not make thread realtime: Permission denied

Can anyone please help? I have been at this for hours and am feeling a bit dumb as I am sure the answer must be simple.

Thanks

Last edited by twistkey (2021-06-10 06:05:41)

Offline

#2 2021-06-10 06:46:15

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

Re: ALSA works, but Pulseaudio and Pipewire do not

Welcome to the boards

If the aplay -D plughw:0,x commands do not work, then that would mean ALSA audio output doesn't work. What are you using to test to say that ALSA output works/used to work? Double check that the monitor volume is actually okay and not muted. FWIW with the active mpv playing what's your

pactl list sink-inputs

Last edited by V1del (2021-06-10 06:52:01)

Offline

#3 2021-06-10 07:11:04

twistkey
Member
Registered: 2021-06-10
Posts: 14

Re: ALSA works, but Pulseaudio and Pipewire do not

Thanks for the quick response.

When I uninstall pulseaudio or pipewire and reboot (so as to revert backto ALSA), audio works perfectly with the

aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Right.wav

command, as well as in Kodi.

Here is the requested output of the pactl command while pipewire is active, and mpv is playing:

pact list sink-inputs

Sink Input #47
	Driver: PipeWire
	Owner Module: n/a
	Client: 46
	Sink: 38
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Format: pcm, format.sample_format = "\"s16le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
	Corked: no
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Buffer Latency: 0 usec
	Sink Latency: 0 usec
	Resample method: PipeWire
	Properties:
		client.api = "pipewire-pulse"
		pulse.server.type = "unix"
		application.name = "mpv"
		application.process.id = "709"
		application.process.user = "kodi"
		application.process.host = "nuc"
		application.process.binary = "mpv"
		application.language = "C"
		application.process.machine_id = "de71c390d90d403ba3c44528090d45c0"
		application.process.session_id = "1"
		media.icon_name = "mpv"
		media.name = "audio_file.flac - mpv"
		stream.is-live = "true"
		node.name = "mpv"
		node.autoconnect = "true"
		media.class = "Stream/Output/Audio"
		adapt.follower.node = ""
		factory.id = "6"
		audio.adapt.follower = ""
		factory.mode = "split"
		library.name = "audioconvert/libspa-audioconvert"
		object.id = "47"
		client.id = "46"
		node.latency = "2646/44100"
		pulse.attr.maxlength = "4194304"
		pulse.attr.tlength = "17640"
		pulse.attr.prebuf = "0"
		pulse.attr.minreq = "3528"
		module-stream-restore.id = "sink-input-by-application-name:mpv"

The display's speakers are definitely not muted. I've tried power cycling everything many times as well.

Last edited by twistkey (2021-06-10 07:12:12)

Offline

#4 2021-06-10 08:04:09

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

Re: ALSA works, but Pulseaudio and Pipewire do not

mhm... But with that fuser output your actual device  should not be blocked off for ALSA outputs. How do you start kodi? If you're going from a normal desktop session I wouldn't expect it to be explicitly started as the Kodi user. How do you log in? It could also be an interference by having your user in the audio group, which isn't normally necessary and might lead to clashes with the dynamic access associations systemd/logind usually would want to do.

If you are trying to use different users for kodi/normal session that will likely bite itself, as both of these sound servers are normally set up to be used and controlled via a single user.

Last edited by V1del (2021-06-10 08:15:54)

Offline

#5 2021-06-10 12:56:31

twistkey
Member
Registered: 2021-06-10
Posts: 14

Re: ALSA works, but Pulseaudio and Pipewire do not

Kodi is started automatically at boot with the following systemd service:

[Unit]
Description=Kodi standalone (X11)
After=remote-fs.target systemd-user-sessions.service network-online.target nss-lookup.target sound.target bluetooth.target polkit.service upower.service mysqld.service tvheadend.service
Wants=network-online.target polkit.service upower.service
Conflicts=getty@tty7.service

[Service]
User=kodi
Group=kodi
PAMName=login
TTYPath=/dev/tty7
Environment=WINDOWING=x11
ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -quiet -nolisten tcp vt7
ExecStop=/usr/bin/killall --user kodi --exact --wait kodi-x11
Restart=on-abort
StandardInput=tty
StandardOutput=journal

[Install]
Alias=display-manager.service

There is no GUI on this box, so I don't really log in, if I am understanding the question correctly. The Kodi application (and mpv, aplay, etc) is run as the "kodi" user. There is one other "nuc" user that I use for when I need privileged access. I log in via SSH on either account. Am I doing something wrong with this setup? I tried removing the "kodi" user from the "audio" group but unfortunately that did not appear to help. The aplay command still didn't produce any audio.

Offline

#6 2021-06-10 13:13:08

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

Re: ALSA works, but Pulseaudio and Pipewire do not

The problem here is that this will lead to two distinct pipewires being started that will fight for the audio device. if you don't start or rather stop the running kodi does the pipewire of your login session still have issues or vice versa? FWIW see https://gitlab.freedesktop.org/pipewire … issues/237 for a discussion of this special usecase. You can workaround by enabling TCP sockets so that one of the pipewires is the "master" and new connections run via the tcp socket: https://gitlab.freedesktop.org/pipewire … otocol-tcp

Offline

#7 2021-06-11 06:09:27

twistkey
Member
Registered: 2021-06-10
Posts: 14

Re: ALSA works, but Pulseaudio and Pipewire do not

I disabled the pipewire systemd units for the "nuc" user, and disabled the Kodi systemd unit above to prevent it from auto starting, then rebooted the machine. Logged in via SSH as the "kodi" user and ran the aplay command, and there is still no audio. Same results as when I remove pipewire and install pulseaudio instead. I only get audio with ALSA (that is, when pipewire and pulse are not active).

Having multiple users play audio at the same time is not a strict requirement for me, so I am happy to just enable pipewire/pulse service for the "kodi" user. I just can't get either of them to work in the first place, unfortunately.

Offline

#8 2021-06-12 13:14:09

Maniaxx
Member
Registered: 2014-05-14
Posts: 732

Re: ALSA works, but Pulseaudio and Pipewire do not

For pipewire:
If you have no audio try to switch the 'Profile' in pavucontrol (most right tab - "Configuration"). I know you're headless but i can't help you any further on that. You have to figure out the cli commands yourself. Maybe try 'pactl'.

Edit: On cli it goes like this:

pactl list cards |grep -E --color=always '^Card|Active Profile:|Profiles:|$'
pactl set-card-profile 46 output:analog-stereo

Follow my grep highlights, find your 'Card #' and profile options and set the new profile.

Last edited by Maniaxx (2021-06-12 18:36:28)


sys2064

Offline

#9 2021-06-13 00:30:01

twistkey
Member
Registered: 2021-06-10
Posts: 14

Re: ALSA works, but Pulseaudio and Pipewire do not

Hello Maniaxx, thanks for that. I ran the command as outlined, with the following output:

pact list cards |grep -E --color=always '^Card|Active Profile:|Profiles:|$'


Card #37
	Name: alsa_card.pci-0000_00_1f.3
	Driver: alsa
	Owner Module: n/a
	Properties:
		device.enum.api = "udev"
		device.api = "alsa"
		media.class = "Audio/Device"
		api.alsa.path = "hw:0"
		api.alsa.card = "0"
		api.alsa.card.name = "HDA Intel PCH"
		api.alsa.card.longname = "HDA Intel PCH at 0x6001110000 irq 152"
		device.plugged.usec = "3150210"
		device.bus_path = "pci-0000:00:1f.3"
		device.sysfs.path = "/sys/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.subsystem = "sound"
		device.vendor.id = "32902"
		device.vendor.name = "Intel Corporation"
		device.product.id = "41160"
		device.product.name = "Tiger Lake-LP Smart Sound Technology Audio Controller"
		device.form_factor = "internal"
		device.name = "alsa_card.pci-0000_00_1f.3"
		device.description = "Built-in Audio"
		device.nick = "HDA Intel PCH"
		device.icon_name = "audio-card-pci"
		api.alsa.use-acp = "true"
		api.acp.auto-profile = "false"
		api.acp.auto-port = "false"
		api.dbus.ReserveDevice1 = "Audio0"
		factory.id = "14"
		client.id = "30"
		object.id = "37"
		object.path = "alsa:pcm:0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0x6001110000 irq 152"
		alsa.driver_name = "snd_hda_intel"
		device.string = "0"
	Profiles:
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6565, available: no)
		output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6500, available: no)
		output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5965, available: yes)
		output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority: 5900, available: yes)
		output:hdmi-stereo-extra1+input:analog-stereo: Digital Stereo (HDMI 2) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra2+input:analog-stereo: Digital Stereo (HDMI 3) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra3+input:analog-stereo: Digital Stereo (HDMI 4) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra4+input:analog-stereo: Digital Stereo (HDMI 5) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra5+input:analog-stereo: Digital Stereo (HDMI 6) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra6+input:analog-stereo: Digital Stereo (HDMI 7) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra7+input:analog-stereo: Digital Stereo (HDMI 8) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra8+input:analog-stereo: Digital Stereo (HDMI 9) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra9+input:analog-stereo: Digital Stereo (HDMI 10) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra10+input:analog-stereo: Digital Stereo (HDMI 11) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra4: Digital Stereo (HDMI 5) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra5: Digital Stereo (HDMI 6) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra6: Digital Stereo (HDMI 7) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra7: Digital Stereo (HDMI 8) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra8: Digital Stereo (HDMI 9) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra9: Digital Stereo (HDMI 10) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra10: Digital Stereo (HDMI 11) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 865, available: yes)
		output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 865, available: yes)
		output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: yes)
		output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: yes)
		output:hdmi-surround-extra1+input:analog-stereo: Digital Surround 5.1 (HDMI 2) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra1+input:analog-stereo: Digital Surround 7.1 (HDMI 2) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra2+input:analog-stereo: Digital Surround 5.1 (HDMI 3) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra2+input:analog-stereo: Digital Surround 7.1 (HDMI 3) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra3+input:analog-stereo: Digital Surround 5.1 (HDMI 4) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra3+input:analog-stereo: Digital Surround 7.1 (HDMI 4) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra4+input:analog-stereo: Digital Surround 5.1 (HDMI 5) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra4+input:analog-stereo: Digital Surround 7.1 (HDMI 5) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra5+input:analog-stereo: Digital Surround 5.1 (HDMI 6) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra5+input:analog-stereo: Digital Surround 7.1 (HDMI 6) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra6+input:analog-stereo: Digital Surround 5.1 (HDMI 7) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra6+input:analog-stereo: Digital Surround 7.1 (HDMI 7) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra7+input:analog-stereo: Digital Surround 5.1 (HDMI 8) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra7+input:analog-stereo: Digital Surround 7.1 (HDMI 8) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra8+input:analog-stereo: Digital Surround 5.1 (HDMI 9) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra8+input:analog-stereo: Digital Surround 7.1 (HDMI 9) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra9+input:analog-stereo: Digital Surround 5.1 (HDMI 10) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra9+input:analog-stereo: Digital Surround 7.1 (HDMI 10) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra10+input:analog-stereo: Digital Surround 5.1 (HDMI 11) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra10+input:analog-stereo: Digital Surround 7.1 (HDMI 11) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra4: Digital Surround 5.1 (HDMI 5) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra4: Digital Surround 7.1 (HDMI 5) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra5: Digital Surround 5.1 (HDMI 6) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra5: Digital Surround 7.1 (HDMI 6) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra6: Digital Surround 5.1 (HDMI 7) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra6: Digital Surround 7.1 (HDMI 7) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra7: Digital Surround 5.1 (HDMI 8) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra7: Digital Surround 7.1 (HDMI 8) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra8: Digital Surround 5.1 (HDMI 9) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra8: Digital Surround 7.1 (HDMI 9) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra9: Digital Surround 5.1 (HDMI 10) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra9: Digital Surround 7.1 (HDMI 10) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra10: Digital Surround 5.1 (HDMI 11) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra10: Digital Surround 7.1 (HDMI 11) Output (sinks: 1, sources: 0, priority: 600, available: no)
		input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 65, available: yes)
		pro-audio: Pro Audio (sinks: 13, sources: 2, priority: 1, available: yes)
	Active Profile: output:hdmi-stereo+input:analog-stereo
	Ports:
		analog-input: Analog Input (type: Analog, priority: 10000, latency offset: 0 usec, availability unknown)
			Properties:
				port.type = "analog"
				card.profile.port = "0"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-surround+input:analog-stereo, output:hdmi-surround71+input:analog-stereo, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-surround-extra1+input:analog-stereo, output:hdmi-surround71-extra1+input:analog-stereo, output:hdmi-stereo-extra2+input:analog-stereo, output:hdmi-surround-extra2+input:analog-stereo, output:hdmi-surround71-extra2+input:analog-stereo, output:hdmi-stereo-extra3+input:analog-stereo, output:hdmi-surround-extra3+input:analog-stereo, output:hdmi-surround71-extra3+input:analog-stereo, output:hdmi-stereo-extra4+input:analog-stereo, output:hdmi-surround-extra4+input:analog-stereo, output:hdmi-surround71-extra4+input:analog-stereo, output:hdmi-stereo-extra5+input:analog-stereo, output:hdmi-surround-extra5+input:analog-stereo, output:hdmi-surround71-extra5+input:analog-stereo, output:hdmi-stereo-extra6+input:analog-stereo, output:hdmi-surround-extra6+input:analog-stereo, output:hdmi-surround71-extra6+input:analog-stereo, output:hdmi-stereo-extra7+input:analog-stereo, output:hdmi-surround-extra7+input:analog-stereo, output:hdmi-surround71-extra7+input:analog-stereo, output:hdmi-stereo-extra8+input:analog-stereo, output:hdmi-surround-extra8+input:analog-stereo, output:hdmi-surround71-extra8+input:analog-stereo, output:hdmi-stereo-extra9+input:analog-stereo, output:hdmi-surround-extra9+input:analog-stereo, output:hdmi-surround71-extra9+input:analog-stereo, output:hdmi-stereo-extra10+input:analog-stereo, output:hdmi-surround-extra10+input:analog-stereo, output:hdmi-surround71-extra10+input:analog-stereo
		analog-output-headphones: Headphones (type: Headphones, priority: 9900, latency offset: 0 usec, availability group: Legacy 1, not available)
			Properties:
				port.type = "headphones"
				port.availability-group = "Legacy 1"
				device.icon_name = "audio-headphones"
				card.profile.port = "1"
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
		hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, latency offset: 0 usec, availability group: Legacy 2, available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 2"
				device.icon_name = "video-display"
				card.profile.port = "2"
			Part of profile(s): output:hdmi-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-surround, output:hdmi-surround+input:analog-stereo, output:hdmi-surround71, output:hdmi-surround71+input:analog-stereo
		hdmi-output-1: HDMI / DisplayPort 2 (type: HDMI, priority: 5800, latency offset: 0 usec, availability group: Legacy 3, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 3"
				device.icon_name = "video-display"
				card.profile.port = "3"
			Part of profile(s): output:hdmi-stereo-extra1, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-surround-extra1, output:hdmi-surround-extra1+input:analog-stereo, output:hdmi-surround71-extra1, output:hdmi-surround71-extra1+input:analog-stereo
		hdmi-output-2: HDMI / DisplayPort 3 (type: HDMI, priority: 5700, latency offset: 0 usec, availability group: Legacy 4, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 4"
				device.icon_name = "video-display"
				card.profile.port = "4"
			Part of profile(s): output:hdmi-stereo-extra2, output:hdmi-stereo-extra2+input:analog-stereo, output:hdmi-surround-extra2, output:hdmi-surround-extra2+input:analog-stereo, output:hdmi-surround71-extra2, output:hdmi-surround71-extra2+input:analog-stereo
		hdmi-output-3: HDMI / DisplayPort 4 (type: HDMI, priority: 5600, latency offset: 0 usec, availability group: Legacy 5, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 5"
				device.icon_name = "video-display"
				card.profile.port = "5"
			Part of profile(s): output:hdmi-stereo-extra3, output:hdmi-stereo-extra3+input:analog-stereo, output:hdmi-surround-extra3, output:hdmi-surround-extra3+input:analog-stereo, output:hdmi-surround71-extra3, output:hdmi-surround71-extra3+input:analog-stereo
		hdmi-output-4: HDMI / DisplayPort 5 (type: HDMI, priority: 5500, latency offset: 0 usec, availability group: Legacy 6, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 6"
				device.icon_name = "video-display"
				card.profile.port = "6"
			Part of profile(s): output:hdmi-stereo-extra4, output:hdmi-stereo-extra4+input:analog-stereo, output:hdmi-surround-extra4, output:hdmi-surround-extra4+input:analog-stereo, output:hdmi-surround71-extra4, output:hdmi-surround71-extra4+input:analog-stereo
		hdmi-output-5: HDMI / DisplayPort 6 (type: HDMI, priority: 5400, latency offset: 0 usec, availability group: Legacy 7, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 7"
				device.icon_name = "video-display"
				card.profile.port = "7"
			Part of profile(s): output:hdmi-stereo-extra5, output:hdmi-stereo-extra5+input:analog-stereo, output:hdmi-surround-extra5, output:hdmi-surround-extra5+input:analog-stereo, output:hdmi-surround71-extra5, output:hdmi-surround71-extra5+input:analog-stereo
		hdmi-output-6: HDMI / DisplayPort 7 (type: HDMI, priority: 5300, latency offset: 0 usec, availability group: Legacy 8, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 8"
				device.icon_name = "video-display"
				card.profile.port = "8"
			Part of profile(s): output:hdmi-stereo-extra6, output:hdmi-stereo-extra6+input:analog-stereo, output:hdmi-surround-extra6, output:hdmi-surround-extra6+input:analog-stereo, output:hdmi-surround71-extra6, output:hdmi-surround71-extra6+input:analog-stereo
		hdmi-output-7: HDMI / DisplayPort 8 (type: HDMI, priority: 5200, latency offset: 0 usec, availability group: Legacy 9, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 9"
				device.icon_name = "video-display"
				card.profile.port = "9"
			Part of profile(s): output:hdmi-stereo-extra7, output:hdmi-stereo-extra7+input:analog-stereo, output:hdmi-surround-extra7, output:hdmi-surround-extra7+input:analog-stereo, output:hdmi-surround71-extra7, output:hdmi-surround71-extra7+input:analog-stereo
		hdmi-output-8: HDMI / DisplayPort 9 (type: HDMI, priority: 5100, latency offset: 0 usec, availability group: Legacy 10, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 10"
				device.icon_name = "video-display"
				card.profile.port = "10"
			Part of profile(s): output:hdmi-stereo-extra8, output:hdmi-stereo-extra8+input:analog-stereo, output:hdmi-surround-extra8, output:hdmi-surround-extra8+input:analog-stereo, output:hdmi-surround71-extra8, output:hdmi-surround71-extra8+input:analog-stereo
		hdmi-output-9: HDMI / DisplayPort 10 (type: HDMI, priority: 5000, latency offset: 0 usec, availability group: Legacy 11, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 11"
				device.icon_name = "video-display"
				card.profile.port = "11"
			Part of profile(s): output:hdmi-stereo-extra9, output:hdmi-stereo-extra9+input:analog-stereo, output:hdmi-surround-extra9, output:hdmi-surround-extra9+input:analog-stereo, output:hdmi-surround71-extra9, output:hdmi-surround71-extra9+input:analog-stereo
		hdmi-output-10: HDMI / DisplayPort 11 (type: HDMI, priority: 4900, latency offset: 0 usec, availability group: Legacy 12, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 12"
				device.icon_name = "video-display"
				card.profile.port = "12"
			Part of profile(s): output:hdmi-stereo-extra10, output:hdmi-stereo-extra10+input:analog-stereo, output:hdmi-surround-extra10, output:hdmi-surround-extra10+input:analog-stereo, output:hdmi-surround71-extra10, output:hdmi-surround71-extra10+input:analog-stereo

Which led me to run the following command:

pactl set-card-profile 37 output:hdmi-stereo

And it appeared to set the profile as expected, but unfortunately there was still no audio. Here is the output of 'pactl list cards' after setting the profile, in case there are any further clues in it:

pactl list cards |grep -E --color=always '^Card|Active Profile:|Profiles:|$'

Card #37
	Name: alsa_card.pci-0000_00_1f.3
	Driver: alsa
	Owner Module: n/a
	Properties:
		device.enum.api = "udev"
		device.api = "alsa"
		media.class = "Audio/Device"
		api.alsa.path = "hw:0"
		api.alsa.card = "0"
		api.alsa.card.name = "HDA Intel PCH"
		api.alsa.card.longname = "HDA Intel PCH at 0x6001110000 irq 152"
		device.plugged.usec = "3150210"
		device.bus_path = "pci-0000:00:1f.3"
		device.sysfs.path = "/sys/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.subsystem = "sound"
		device.vendor.id = "32902"
		device.vendor.name = "Intel Corporation"
		device.product.id = "41160"
		device.product.name = "Tiger Lake-LP Smart Sound Technology Audio Controller"
		device.form_factor = "internal"
		device.name = "alsa_card.pci-0000_00_1f.3"
		device.description = "Built-in Audio"
		device.nick = "HDA Intel PCH"
		device.icon_name = "audio-card-pci"
		api.alsa.use-acp = "true"
		api.acp.auto-profile = "false"
		api.acp.auto-port = "false"
		api.dbus.ReserveDevice1 = "Audio0"
		factory.id = "14"
		client.id = "30"
		object.id = "37"
		object.path = "alsa:pcm:0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0x6001110000 irq 152"
		alsa.driver_name = "snd_hda_intel"
		device.string = "0"
	Profiles:
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6565, available: no)
		output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6500, available: no)
		output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5965, available: yes)
		output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority: 5900, available: yes)
		output:hdmi-stereo-extra1+input:analog-stereo: Digital Stereo (HDMI 2) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra2+input:analog-stereo: Digital Stereo (HDMI 3) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra3+input:analog-stereo: Digital Stereo (HDMI 4) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra4+input:analog-stereo: Digital Stereo (HDMI 5) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra5+input:analog-stereo: Digital Stereo (HDMI 6) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra6+input:analog-stereo: Digital Stereo (HDMI 7) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra7+input:analog-stereo: Digital Stereo (HDMI 8) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra8+input:analog-stereo: Digital Stereo (HDMI 9) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra9+input:analog-stereo: Digital Stereo (HDMI 10) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra10+input:analog-stereo: Digital Stereo (HDMI 11) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5765, available: no)
		output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra4: Digital Stereo (HDMI 5) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra5: Digital Stereo (HDMI 6) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra6: Digital Stereo (HDMI 7) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra7: Digital Stereo (HDMI 8) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra8: Digital Stereo (HDMI 9) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra9: Digital Stereo (HDMI 10) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra10: Digital Stereo (HDMI 11) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 865, available: yes)
		output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 865, available: yes)
		output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: yes)
		output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: yes)
		output:hdmi-surround-extra1+input:analog-stereo: Digital Surround 5.1 (HDMI 2) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra1+input:analog-stereo: Digital Surround 7.1 (HDMI 2) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra2+input:analog-stereo: Digital Surround 5.1 (HDMI 3) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra2+input:analog-stereo: Digital Surround 7.1 (HDMI 3) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra3+input:analog-stereo: Digital Surround 5.1 (HDMI 4) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra3+input:analog-stereo: Digital Surround 7.1 (HDMI 4) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra4+input:analog-stereo: Digital Surround 5.1 (HDMI 5) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra4+input:analog-stereo: Digital Surround 7.1 (HDMI 5) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra5+input:analog-stereo: Digital Surround 5.1 (HDMI 6) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra5+input:analog-stereo: Digital Surround 7.1 (HDMI 6) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra6+input:analog-stereo: Digital Surround 5.1 (HDMI 7) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra6+input:analog-stereo: Digital Surround 7.1 (HDMI 7) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra7+input:analog-stereo: Digital Surround 5.1 (HDMI 8) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra7+input:analog-stereo: Digital Surround 7.1 (HDMI 8) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra8+input:analog-stereo: Digital Surround 5.1 (HDMI 9) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra8+input:analog-stereo: Digital Surround 7.1 (HDMI 9) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra9+input:analog-stereo: Digital Surround 5.1 (HDMI 10) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra9+input:analog-stereo: Digital Surround 7.1 (HDMI 10) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra10+input:analog-stereo: Digital Surround 5.1 (HDMI 11) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround71-extra10+input:analog-stereo: Digital Surround 7.1 (HDMI 11) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 665, available: no)
		output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra4: Digital Surround 5.1 (HDMI 5) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra4: Digital Surround 7.1 (HDMI 5) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra5: Digital Surround 5.1 (HDMI 6) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra5: Digital Surround 7.1 (HDMI 6) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra6: Digital Surround 5.1 (HDMI 7) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra6: Digital Surround 7.1 (HDMI 7) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra7: Digital Surround 5.1 (HDMI 8) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra7: Digital Surround 7.1 (HDMI 8) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra8: Digital Surround 5.1 (HDMI 9) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra8: Digital Surround 7.1 (HDMI 9) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra9: Digital Surround 5.1 (HDMI 10) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra9: Digital Surround 7.1 (HDMI 10) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra10: Digital Surround 5.1 (HDMI 11) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra10: Digital Surround 7.1 (HDMI 11) Output (sinks: 1, sources: 0, priority: 600, available: no)
		input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 65, available: yes)
		pro-audio: Pro Audio (sinks: 13, sources: 2, priority: 1, available: yes)
	Active Profile: output:hdmi-stereo
	Ports:
		analog-input: Analog Input (type: Analog, priority: 10000, latency offset: 0 usec, availability unknown)
			Properties:
				port.type = "analog"
				card.profile.port = "0"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-surround+input:analog-stereo, output:hdmi-surround71+input:analog-stereo, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-surround-extra1+input:analog-stereo, output:hdmi-surround71-extra1+input:analog-stereo, output:hdmi-stereo-extra2+input:analog-stereo, output:hdmi-surround-extra2+input:analog-stereo, output:hdmi-surround71-extra2+input:analog-stereo, output:hdmi-stereo-extra3+input:analog-stereo, output:hdmi-surround-extra3+input:analog-stereo, output:hdmi-surround71-extra3+input:analog-stereo, output:hdmi-stereo-extra4+input:analog-stereo, output:hdmi-surround-extra4+input:analog-stereo, output:hdmi-surround71-extra4+input:analog-stereo, output:hdmi-stereo-extra5+input:analog-stereo, output:hdmi-surround-extra5+input:analog-stereo, output:hdmi-surround71-extra5+input:analog-stereo, output:hdmi-stereo-extra6+input:analog-stereo, output:hdmi-surround-extra6+input:analog-stereo, output:hdmi-surround71-extra6+input:analog-stereo, output:hdmi-stereo-extra7+input:analog-stereo, output:hdmi-surround-extra7+input:analog-stereo, output:hdmi-surround71-extra7+input:analog-stereo, output:hdmi-stereo-extra8+input:analog-stereo, output:hdmi-surround-extra8+input:analog-stereo, output:hdmi-surround71-extra8+input:analog-stereo, output:hdmi-stereo-extra9+input:analog-stereo, output:hdmi-surround-extra9+input:analog-stereo, output:hdmi-surround71-extra9+input:analog-stereo, output:hdmi-stereo-extra10+input:analog-stereo, output:hdmi-surround-extra10+input:analog-stereo, output:hdmi-surround71-extra10+input:analog-stereo
		analog-output-headphones: Headphones (type: Headphones, priority: 9900, latency offset: 0 usec, availability group: Legacy 1, not available)
			Properties:
				port.type = "headphones"
				port.availability-group = "Legacy 1"
				device.icon_name = "audio-headphones"
				card.profile.port = "1"
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
		hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, latency offset: 0 usec, availability group: Legacy 2, available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 2"
				device.icon_name = "video-display"
				card.profile.port = "2"
			Part of profile(s): output:hdmi-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-surround, output:hdmi-surround+input:analog-stereo, output:hdmi-surround71, output:hdmi-surround71+input:analog-stereo
		hdmi-output-1: HDMI / DisplayPort 2 (type: HDMI, priority: 5800, latency offset: 0 usec, availability group: Legacy 3, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 3"
				device.icon_name = "video-display"
				card.profile.port = "3"
			Part of profile(s): output:hdmi-stereo-extra1, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-surround-extra1, output:hdmi-surround-extra1+input:analog-stereo, output:hdmi-surround71-extra1, output:hdmi-surround71-extra1+input:analog-stereo
		hdmi-output-2: HDMI / DisplayPort 3 (type: HDMI, priority: 5700, latency offset: 0 usec, availability group: Legacy 4, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 4"
				device.icon_name = "video-display"
				card.profile.port = "4"
			Part of profile(s): output:hdmi-stereo-extra2, output:hdmi-stereo-extra2+input:analog-stereo, output:hdmi-surround-extra2, output:hdmi-surround-extra2+input:analog-stereo, output:hdmi-surround71-extra2, output:hdmi-surround71-extra2+input:analog-stereo
		hdmi-output-3: HDMI / DisplayPort 4 (type: HDMI, priority: 5600, latency offset: 0 usec, availability group: Legacy 5, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 5"
				device.icon_name = "video-display"
				card.profile.port = "5"
			Part of profile(s): output:hdmi-stereo-extra3, output:hdmi-stereo-extra3+input:analog-stereo, output:hdmi-surround-extra3, output:hdmi-surround-extra3+input:analog-stereo, output:hdmi-surround71-extra3, output:hdmi-surround71-extra3+input:analog-stereo
		hdmi-output-4: HDMI / DisplayPort 5 (type: HDMI, priority: 5500, latency offset: 0 usec, availability group: Legacy 6, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 6"
				device.icon_name = "video-display"
				card.profile.port = "6"
			Part of profile(s): output:hdmi-stereo-extra4, output:hdmi-stereo-extra4+input:analog-stereo, output:hdmi-surround-extra4, output:hdmi-surround-extra4+input:analog-stereo, output:hdmi-surround71-extra4, output:hdmi-surround71-extra4+input:analog-stereo
		hdmi-output-5: HDMI / DisplayPort 6 (type: HDMI, priority: 5400, latency offset: 0 usec, availability group: Legacy 7, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 7"
				device.icon_name = "video-display"
				card.profile.port = "7"
			Part of profile(s): output:hdmi-stereo-extra5, output:hdmi-stereo-extra5+input:analog-stereo, output:hdmi-surround-extra5, output:hdmi-surround-extra5+input:analog-stereo, output:hdmi-surround71-extra5, output:hdmi-surround71-extra5+input:analog-stereo
		hdmi-output-6: HDMI / DisplayPort 7 (type: HDMI, priority: 5300, latency offset: 0 usec, availability group: Legacy 8, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 8"
				device.icon_name = "video-display"
				card.profile.port = "8"
			Part of profile(s): output:hdmi-stereo-extra6, output:hdmi-stereo-extra6+input:analog-stereo, output:hdmi-surround-extra6, output:hdmi-surround-extra6+input:analog-stereo, output:hdmi-surround71-extra6, output:hdmi-surround71-extra6+input:analog-stereo
		hdmi-output-7: HDMI / DisplayPort 8 (type: HDMI, priority: 5200, latency offset: 0 usec, availability group: Legacy 9, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 9"
				device.icon_name = "video-display"
				card.profile.port = "9"
			Part of profile(s): output:hdmi-stereo-extra7, output:hdmi-stereo-extra7+input:analog-stereo, output:hdmi-surround-extra7, output:hdmi-surround-extra7+input:analog-stereo, output:hdmi-surround71-extra7, output:hdmi-surround71-extra7+input:analog-stereo
		hdmi-output-8: HDMI / DisplayPort 9 (type: HDMI, priority: 5100, latency offset: 0 usec, availability group: Legacy 10, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 10"
				device.icon_name = "video-display"
				card.profile.port = "10"
			Part of profile(s): output:hdmi-stereo-extra8, output:hdmi-stereo-extra8+input:analog-stereo, output:hdmi-surround-extra8, output:hdmi-surround-extra8+input:analog-stereo, output:hdmi-surround71-extra8, output:hdmi-surround71-extra8+input:analog-stereo
		hdmi-output-9: HDMI / DisplayPort 10 (type: HDMI, priority: 5000, latency offset: 0 usec, availability group: Legacy 11, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 11"
				device.icon_name = "video-display"
				card.profile.port = "11"
			Part of profile(s): output:hdmi-stereo-extra9, output:hdmi-stereo-extra9+input:analog-stereo, output:hdmi-surround-extra9, output:hdmi-surround-extra9+input:analog-stereo, output:hdmi-surround71-extra9, output:hdmi-surround71-extra9+input:analog-stereo
		hdmi-output-10: HDMI / DisplayPort 11 (type: HDMI, priority: 4900, latency offset: 0 usec, availability group: Legacy 12, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 12"
				device.icon_name = "video-display"
				card.profile.port = "12"
			Part of profile(s): output:hdmi-stereo-extra10, output:hdmi-stereo-extra10+input:analog-stereo, output:hdmi-surround-extra10, output:hdmi-surround-extra10+input:analog-stereo, output:hdmi-surround71-extra10, output:hdmi-surround71-extra10+input:analog-stereo

Offline

#10 2021-06-13 14:24:04

Maniaxx
Member
Registered: 2014-05-14
Posts: 732

Re: ALSA works, but Pulseaudio and Pipewire do not

1) Can you post a 'pw-dump > pwdump.txt' and 'pacman -Qs pipewire'?

2) Also try these profiles:
pro-audio
output:hdmi-surround71
output:hdmi-surround

You actually were on the 'output:hdmi-stereo' (plus input:) already.

3) Check/handle *.pacnew files in /etc/pipewire

4) Beside that, you should get rid of the the RTKit/nice errors if you add 'threadirqs' kernel parameter. Check if the dbus errors vanish as well. There shouldn't be any errors left in the end.

Last edited by Maniaxx (2021-06-13 14:58:39)


sys2064

Offline

#11 2021-06-14 06:58:00

twistkey
Member
Registered: 2021-06-10
Posts: 14

Re: ALSA works, but Pulseaudio and Pipewire do not

1) The output of pw-dump is here: http://ix.io/3pTT

And the output of the pacman command:

pacman -Qs pipewire

local/pipewire 1:0.3.30-2
    Low-latency audio/video router and processor
local/pipewire-media-session 1:0.3.30-2
    Low-latency audio/video router and processor - Session manager
local/pipewire-pulse 1:0.3.30-2
    Low-latency audio/video router and processor - PulseAudio replacement

2) I had already tried them all, unfortunately still no audio

3) I don't have an /etc/pipewire directory on the system. What does that mean?

4) I added threadirqs to the GRUB_CMDLINE_LINUX_DEFAULT, re-generated the grub.cfg file with grub-mkconfig and rebooted, but the exact same error messages still appear. I also installed the 'rtirq' package

Last edited by twistkey (2021-06-14 07:00:57)

Offline

#12 2021-06-14 09:24:24

Maniaxx
Member
Registered: 2014-05-14
Posts: 732

Re: ALSA works, but Pulseaudio and Pipewire do not

You're missing 'pipewire-alsa' package.

No /etc/pipewire folder is ok. It uses the default templates then (/usr/share/pipewire).

4) Maybe you must be in 'realtime' group. You can check the 'professional audio' wiki article.

Last edited by Maniaxx (2021-06-15 21:34:58)


sys2064

Offline

#13 2021-06-14 13:30:50

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

Re: ALSA works, but Pulseaudio and Pipewire do not

Yeah if you lack pipewire-alsa then aplay commands will naturally not work if the device is actively occupied by a pipewire instance. But the fuser output looked like no device was actively used by anything, other than the seq and control devices which aren't relevant for actual eventual playback.

What happens if instead of running kodi as a system service mapped to a user you instead run it as an actual user service? https://wiki.archlinux.org/title/Systemd/User

Offline

#14 2021-06-15 06:16:55

twistkey
Member
Registered: 2021-06-10
Posts: 14

Re: ALSA works, but Pulseaudio and Pipewire do not

Maniaxx wrote:

You're missing 'pipewire-alsa' package.

V1del wrote:

Yeah if you lack pipewire-alsa then aplay commands will naturally not work if the device is actively occupied by a pipewire instance.

Installed it, unfortunately still no audio with kodi/mpv/aplay

Maniaxx wrote:

4) Maybe you must be in 'realtime' group. You can check the 'professional audio' wiki article.

I installed the realtime-privileges package and added the "kodi" user to the realtime group as described by the wiki, but the error messages still appear

V1del wrote:

What happens if instead of running kodi as a system service mapped to a user you instead run it as an actual user service? https://wiki.archlinux.org/title/Systemd/User

I created a user service for Kodi and executed it successfully (and with pipewire-alsa installed), but still no audio in kodi/mpv/aplay.

Here is the output of 'pactl list sinks' during playback, if it helps in any way:

pactl list sinks

Sink #40
	State: RUNNING
	Name: alsa_output.pci-0000_00_1f.3.hdmi-stereo
	Description: Built-in Audio Digital Stereo (HDMI)
	Driver: PipeWire
	Sample Specification: s32le 2ch 48000Hz
	Channel Map: front-left,front-right
	Owner Module: 4294967295
	Mute: no
	Volume: front-left: 48287 /  74% / -7.96 dB,   front-right: 48287 /  74% / -7.96 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor Source: alsa_output.pci-0000_00_1f.3.hdmi-stereo.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		object.path = "alsa:pcm:0:hdmi:0:playback"
		api.alsa.path = "hdmi:0"
		api.alsa.pcm.card = "0"
		api.alsa.pcm.stream = "playback"
		audio.channels = "2"
		audio.position = "FL,FR"
		device.routes = "1"
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "HDMI 0"
		alsa.id = "HDMI 0"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "3"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0x6001110000 irq 152"
		alsa.driver_name = "snd_hda_intel"
		device.profile.name = "hdmi-stereo"
		device.profile.description = "Digital Stereo (HDMI)"
		card.profile.device = "17"
		device.id = "39"
		factory.name = "api.alsa.pcm.sink"
		priority.driver = "696"
		priority.session = "696"
		media.class = "Audio/Sink"
		node.nick = "HDA Intel PCH"
		node.name = "alsa_output.pci-0000_00_1f.3.hdmi-stereo"
		device.description = "Built-in Audio Digital Stereo (HDMI)"
		device.icon_name = "audio-card-hdmi"
		node.pause-on-idle = "false"
		factory.id = "18"
		client.id = "31"
		node.driver = "true"
		factory.mode = "merge"
		audio.adapt.follower = ""
		library.name = "audioconvert/libspa-audioconvert"
		object.id = "40"
		node.max-latency = "8192/48000"
	Ports:
		hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, availability group: Legacy 2, available)
	Active Port: hdmi-output-0
	Formats:
		pcm

Offline

#15 2021-06-15 06:52:31

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

Re: ALSA works, but Pulseaudio and Pipewire do not

so audio output is technically there, what's the output of

sudo fuser -v /dev/snd/*
aplay -lL

during that? I wonder whether the hdmi:0 it picks here is just an invalid PCM due to weird HW setup. Any messages in the journal/dmesg as to why it fails? Does the working ALSA case pick a specific sample rate that might be non-standard?

Offline

#16 2021-06-15 07:32:38

twistkey
Member
Registered: 2021-06-10
Posts: 14

Re: ALSA works, but Pulseaudio and Pipewire do not

Output of the two commands below, while Kodi is playing:

sudo fuser -v /dev/snd/*

                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  kodi        664 F.... pipewire
                     kodi        665 F.... pipewire-media-
/dev/snd/pcmC0D3p:   kodi        664 F...m pipewire
/dev/snd/seq:        kodi        664 F.... pipewire
aplay -lL

null
    Discard all samples (playback) or generate zero samples (capture)
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pipewire
    PipeWire Sound Server
pulse
    PulseAudio Sound Server
speex
    Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
default
    Default ALSA Output (currently PipeWire Media Server)
sysdefault:CARD=PCH
    HDA Intel PCH, ALC256 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    Front output / input
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
hdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    HDMI Audio Output
hdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    HDMI Audio Output
hdmi:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 3
    HDMI Audio Output
hdmi:CARD=PCH,DEV=4
    HDA Intel PCH, HDMI 4
    HDMI Audio Output
hdmi:CARD=PCH,DEV=5
    HDA Intel PCH, HDMI 5
    HDMI Audio Output
hdmi:CARD=PCH,DEV=6
    HDA Intel PCH, HDMI 6
    HDMI Audio Output
hdmi:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 7
    HDMI Audio Output
hdmi:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 8
    HDMI Audio Output
hdmi:CARD=PCH,DEV=9
    HDA Intel PCH, HDMI 9
    HDMI Audio Output
hdmi:CARD=PCH,DEV=10
    HDA Intel PCH, HDMI 10
    HDMI Audio Output
usbstream:CARD=PCH
    HDA Intel PCH
    USB Stream Output
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC256 Analog [ALC256 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 12: HDMI 6 [HDMI 6]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 13: HDMI 7 [HDMI 7]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 14: HDMI 8 [HDMI 8]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 15: HDMI 9 [HDMI 9]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 16: HDMI 10 [HDMI 10]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 17: HDMI 11 [HDMI 11]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I don't see any errors related to audio in the journal or dmesg, but on the other hand I'm not quite sure what to look for either.

V1del wrote:

Does the working ALSA case pick a specific sample rate that might be non-standard?

Is there a command I can run, or some other way to determine whether this is the case?

Offline

#17 2021-06-15 16:42:58

Maniaxx
Member
Registered: 2014-05-14
Posts: 732

Re: ALSA works, but Pulseaudio and Pipewire do not

twistkey wrote:

I installed the realtime-privileges package and added the "kodi" user to the realtime group as described by the wiki, but the error messages still appear

Regarding the error from your upper post its the 'nuc' user lacking the privileges.

What about plug:pipewire?

aplay -D plug:pipewire /usr/share/sounds/alsa/Front_Center.wav

Try enforcing S16LE or different sample rate:
https://gitlab.freedesktop.org/pipewire … properties

cp -r /usr/share/pipewire ~/.config/pipewire
sed -i 's/#audio.format/audio.format/' ~/.config/pipewire/media-session.d/alsa-monitor.conf
systemctl --user restart pipewire.service pipewire-pulse.service pipewire-media-session.service

Last edited by Maniaxx (2021-06-15 21:54:41)


sys2064

Offline

#18 2021-06-16 01:29:54

twistkey
Member
Registered: 2021-06-10
Posts: 14

Re: ALSA works, but Pulseaudio and Pipewire do not

Maniaxx wrote:

Regarding the error from your upper post its the 'nuc' user lacking the privileges.

Added the "nuc" user too, still get the same errors:

systemctl --user status pipewire pipewire-pulse pipewire-media-session

● pipewire.service - Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; disabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-06-16 11:20:27 AEST; 17s ago
TriggeredBy: ● pipewire.socket
   Main PID: 664 (pipewire)
      Tasks: 2 (limit: 18659)
     Memory: 6.1M
        CPU: 45ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
             └─664 /usr/bin/pipewire

Jun 16 11:20:27 nuc systemd[643]: Started Multimedia Service.
Jun 16 11:20:27 nuc pipewire[664]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 16 11:20:27 nuc pipewire[664]: could not set nice-level to -11: Permission denied
Jun 16 11:20:27 nuc pipewire[664]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 16 11:20:27 nuc pipewire[664]: could not make thread realtime: Permission denied

● pipewire-pulse.service - PipeWire PulseAudio
     Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.service; disabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-06-16 11:20:27 AEST; 17s ago
TriggeredBy: ● pipewire-pulse.socket
   Main PID: 666 (pipewire-pulse)
      Tasks: 2 (limit: 18659)
     Memory: 3.2M
        CPU: 35ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-pulse.service
             └─666 /usr/bin/pipewire-pulse

Jun 16 11:20:27 nuc systemd[643]: Started PipeWire PulseAudio.
Jun 16 11:20:27 nuc pipewire-pulse[666]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 16 11:20:27 nuc pipewire-pulse[666]: could not set nice-level to -11: Permission denied
Jun 16 11:20:27 nuc pipewire-pulse[666]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 16 11:20:27 nuc pipewire-pulse[666]: could not make thread realtime: Permission denied

● pipewire-media-session.service - Multimedia Service Session Manager
     Loaded: loaded (/usr/lib/systemd/user/pipewire-media-session.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-06-16 11:20:27 AEST; 17s ago
   Main PID: 665 (pipewire-media-)
      Tasks: 2 (limit: 18659)
     Memory: 6.8M
        CPU: 100ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-media-session.service
             └─665 /usr/bin/pipewire-media-session

Jun 16 11:20:27 nuc systemd[643]: Started Multimedia Service Session Manager.
Jun 16 11:20:27 nuc pipewire-media-session[665]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 16 11:20:27 nuc pipewire-media-session[665]: could not set nice-level to -11: Permission denied
Jun 16 11:20:27 nuc pipewire-media-session[665]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 16 11:20:27 nuc pipewire-media-session[665]: could not make thread realtime: Permission denied
Jun 16 11:20:28 nuc pipewire-media-session[665]: GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown

But I noticed that after I run the Kodi user service, some additional errors appear (still no audio after again restarting the services or Kodi though):

systemctl --user status pipewire pipewire-pulse pipewire-media-session

● pipewire.service - Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; disabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-06-16 11:20:27 AEST; 3min 26s ago
TriggeredBy: ● pipewire.socket
   Main PID: 664 (pipewire)
      Tasks: 2 (limit: 18659)
     Memory: 9.2M
        CPU: 202ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
             └─664 /usr/bin/pipewire

Jun 16 11:20:27 nuc systemd[643]: Started Multimedia Service.
Jun 16 11:20:27 nuc pipewire[664]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 16 11:20:27 nuc pipewire[664]: could not set nice-level to -11: Permission denied
Jun 16 11:20:27 nuc pipewire[664]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 16 11:20:27 nuc pipewire[664]: could not make thread realtime: Permission denied

● pipewire-pulse.service - PipeWire PulseAudio
     Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.service; disabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-06-16 11:20:27 AEST; 3min 26s ago
TriggeredBy: ● pipewire-pulse.socket
   Main PID: 666 (pipewire-pulse)
      Tasks: 2 (limit: 18659)
     Memory: 13.8M
        CPU: 361ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-pulse.service
             └─666 /usr/bin/pipewire-pulse

Jun 16 11:20:27 nuc systemd[643]: Started PipeWire PulseAudio.
Jun 16 11:20:27 nuc pipewire-pulse[666]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 16 11:20:27 nuc pipewire-pulse[666]: could not set nice-level to -11: Permission denied
Jun 16 11:20:27 nuc pipewire-pulse[666]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 16 11:20:27 nuc pipewire-pulse[666]: could not make thread realtime: Permission denied
Jun 16 11:23:19 nuc pipewire-pulse[666]: stream 0x55c18e07eb80: error no node available
Jun 16 11:23:19 nuc pipewire-pulse[666]: pulse-server 0x55c18e031880: [KodiSink] ERROR command:-1 (invalid) tag:4294967295 error:25 (Input/output error)

● pipewire-media-session.service - Multimedia Service Session Manager
     Loaded: loaded (/usr/lib/systemd/user/pipewire-media-session.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-06-16 11:20:27 AEST; 3min 26s ago
   Main PID: 665 (pipewire-media-)
      Tasks: 2 (limit: 18659)
     Memory: 6.8M
        CPU: 118ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-media-session.service
             └─665 /usr/bin/pipewire-media-session

Jun 16 11:20:27 nuc systemd[643]: Started Multimedia Service Session Manager.
Jun 16 11:20:27 nuc pipewire-media-session[665]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 16 11:20:27 nuc pipewire-media-session[665]: could not set nice-level to -11: Permission denied
Jun 16 11:20:27 nuc pipewire-media-session[665]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
Jun 16 11:20:27 nuc pipewire-media-session[665]: could not make thread realtime: Permission denied
Jun 16 11:20:28 nuc pipewire-media-session[665]: GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown
Jun 16 11:23:19 nuc pipewire-media-session[665]: no node found for 51
Jun 16 11:23:19 nuc pipewire-media-session[665]: no node found for 51
Maniaxx wrote:

What about plug:pipewire?

Still no audio sadly


Maniaxx wrote:

Try enforcing S16LE or different sample rate:
https://gitlab.freedesktop.org/pipewire … properties

cp -r /usr/share/pipewire ~/.config/pipewire
sed -i 's/#audio.format/audio.format/' ~/.config/pipewire/media-session.d/alsa-monitor.conf
systemctl --user restart pipewire.service pipewire-pulse.service pipewire-media-session.service

Still no audio, but I will have a play with a few more of these settings later tonight

Offline

#19 2021-06-19 22:43:59

twistkey
Member
Registered: 2021-06-10
Posts: 14

Re: ALSA works, but Pulseaudio and Pipewire do not

Found a little more time to tinker with it. While my goal is to switch to pipewire, I uninstalled it and re-installed pulseaudio and pulseaudio-alsa for testing purposes (there are more google search results for people having problems with it, so more things to try).

I noticed that if I uncomment the following line in /etc/pulse/default.pa

#load-module module-alsa-sink

and change it to this:

load-module module-alsa-sink device=hw:0,3

And then reboot, I can successfully play and hear an audio file with MPV and pulseaudio.

The problem is, if I then run Kodi, it still has no audio. And if I then close Kodi and try to play the same audio file with MPV, I hear nothing.

So I try to restart the pulseaudio service:

systemctl --user restart pulseaudio

and run MPV again, but I get an error message and it reverts to ALSA (but I still don't hear anything):

mpv audio_file.flac

 (+) Audio --aid=1 (flac 2ch 44100Hz)
[ao/pulse] The stream is suspended. Bailing out.
AO: [alsa] 44100Hz stereo 2ch s16

If I close MPV and run the same command again, the error disappears and it apparently uses pulseaudio again (but I still don't hear anything):

mpv audio_file.flac

 (+) Audio --aid=1 (flac 2ch 44100Hz)
AO: [pulse] 44100Hz stereo 2ch s16

If I reboot, audio works again, but really only for the first program I run (whether it be Kodi or MPV). I also noticed that if I happen to log in via SSH as a second user, audio will stop working for the first user until the next reboot (same for the second user). EDIT: I'm no longer sure about that last part, I was able to SSH in as two separate users and have one of them play audio successfully.

Here is some system status output as the "kodi" user:

systemctl --user status pulseaudio

● pulseaudio.service - Sound Service
     Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; disabled; vendor preset: enabled)
     Active: active (running) since Sun 2021-06-20 08:35:47 AEST; 10min ago
TriggeredBy: ● pulseaudio.socket
   Main PID: 645 (pulseaudio)
      Tasks: 6 (limit: 18658)
     Memory: 10.7M
        CPU: 1.381s
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/pulseaudio.service
             ├─645 /usr/bin/pulseaudio --daemonize=no --log-target=journal
             └─664 /usr/lib/pulse/gsettings-helper

Jun 20 08:35:47 nuc systemd[628]: Starting Sound Service...
Jun 20 08:35:47 nuc systemd[628]: Started Sound Service.
Jun 20 08:37:29 nuc pulseaudio[645]: Error opening PCM device hw:0,3: Device or resource busy
Jun 20 08:37:29 nuc pulseaudio[645]: Error opening PCM device hw:0,3: Device or resource busy
Jun 20 08:37:29 nuc pulseaudio[645]: Error opening PCM device hw:0,3: Device or resource busy

What does all of this mean?

Last edited by twistkey (2021-06-19 22:57:00)

Offline

#20 2021-06-19 23:23:48

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

Re: ALSA works, but Pulseaudio and Pipewire do not

All of that is "normal". You can only have one process access the audio device at a time. Which is why pulseaudio and pipewire exist. You need to make sure that kodi runs in a context where it either takes over device completely or connects to the correct pulseaudio/pipewire instance, and it reads like that last part is what you are having trouble with. from this mpv startup attempts what's your output for

printenv 
sudo fuser -v /dev/snd/*

The fuser command is for checking what is actively using the device, you ideally should see only see pulseaudio here and have all relevant audio working, recheck this during the "not working" cases.

Last edited by V1del (2021-06-19 23:24:42)

Offline

#21 2021-06-20 02:37:55

twistkey
Member
Registered: 2021-06-10
Posts: 14

Re: ALSA works, but Pulseaudio and Pipewire do not

V1del wrote:

All of that is "normal". You can only have one process access the audio device at a time. Which is why pulseaudio and pipewire exist. You need to make sure that kodi runs in a context where it either takes over device completely or connects to the correct pulseaudio/pipewire instance, and it reads like that last part is what you are having trouble with. from this mpv startup attempts what's your output for

printenv 
sudo fuser -v /dev/snd/*

The fuser command is for checking what is actively using the device, you ideally should see only see pulseaudio here and have all relevant audio working, recheck this during the "not working" cases.

Here is the output of printenv (the "kodi" user has very similar output):

SHELL=/bin/bash
HISTSIZE=10000
EDITOR=/usr/bin/vim
PWD=/home/nuc
LOGNAME=nuc
XDG_SESSION_TYPE=tty
MOTD_SHOWN=pam
HOME=/home/nuc
LANG=en_US.UTF-8
SSH_CONNECTION=192.168.1.204 49368 192.168.1.199 22
XDG_SESSION_CLASS=user
TERM=xterm-256color
USER=nuc
SHLVL=1
XDG_SESSION_ID=3
XDG_RUNTIME_DIR=/run/user/1001
SSH_CLIENT=192.168.1.204 49368 22
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
HISTFILESIZE=20000
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus
HG=/usr/bin/hg
MAIL=/var/spool/mail/nuc
SSH_TTY=/dev/pts/1
_=/usr/bin/printenv

The output of fuser (executed by the "nuc" user, while the "kodi" user is successfully playing an audio file with MPV):

sudo fuser -v /dev/snd/*

                     USER        PID ACCESS COMMAND
/dev/snd/pcmC0D3p:   kodi        666 F...m pulseaudio

A few seconds after quitting MPV, the output looked like this:

                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  kodi        666 F.... pulseaudio
/dev/snd/pcmC0D0c:   kodi        666 F...m pulseaudio
/dev/snd/pcmC0D3p:   kodi        666 F...m pulseaudio

Then changed to this:

                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  kodi        666 F.... pulseaudio

And after starting playback with MPV again (can't hear audio anymore though):

                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  kodi        666 F.... pulseaudio
/dev/snd/pcmC0D3p:   kodi        666 F...m pulseaudio

Last edited by twistkey (2021-06-20 02:39:11)

Offline

#22 2021-07-16 23:59:56

twistkey
Member
Registered: 2021-06-10
Posts: 14

Re: ALSA works, but Pulseaudio and Pipewire do not

Found a little more time to tinker with things this week, and I think I have pulseaudio working reliably (so far, it's only been a few days).

I added these lines to /etc/pulse/default.pa:

load-module module-alsa-sink device=hw:0,3
load-module module-alsa-source device=hw:0,3

And also commented this section out completely, although I have not confirmed if I really needed to:

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

Now I have audio on boot, after switching applications, etc.

I would suppose my question now is, is there an equivalent for the above options if I were to use pipewire? This article could be relevant, but if it is, I might need things to be spelled out a little more.

Offline

Board footer

Powered by FluxBB