i0ntempest
Posts: 2
Joined: Thu Aug 01, 2019 8:56 am

Weird HDMI Audio Problem on Pi 4 (PulseAudio)

Thu Aug 01, 2019 9:59 am

Hi guys,
So I just got my new 4GB Raspberry Pi 4 today and almost finished migrating from Pi 3B+. The performance increase is just mind blowing.
However I do have a few problems and one of them is about audio. I have PulseAudio installed to use with GNOME, however the volume keeps going up and down by itself when playing music. I have commented out

Code: Select all

module-udev-detect
section and loaded the drivers statically in

Code: Select all

default.pa
, because if not the output will be mono. Using

Code: Select all

module-detect
yields the same result.
If I specify an audio device by doing

Code: Select all

mplayer -ao alsa:device=hw=0,0 some.mp3
the file will play without any problem, no volume fluctuates and no distortion. However if I try

Code: Select all

pactl set-default-sink alsa_output.hw_0_0
It will say

Code: Select all

Failure: No such entity
This setup worked really well on my 3B+ but is broken on 4. Anyone has had similar problems like this?
More info will be provided below. Any help is appreciated!!

Result of "pacmd list-sinks":

Code: Select all

pi@raspberry-pi:~ $ pacmd list-sinks
1 sink(s) available.
  * index: 0
        name: <alsa_output.default>
        driver: <module-alsa-sink.c>
        flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
        state: RUNNING
        suspend cause: (none)
        priority: 9000
        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: 80.57 ms
        max request: 15 KiB
        max rewind: 15 KiB
        monitor source: 0
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        configured latency: 90.00 ms; range is 0.50 .. 743.04 ms
        module: 5
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "bcm2835 ALSA"
                alsa.id = "bcm2835 ALSA"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "bcm2835 ALSA"
                alsa.long_card_name = "bcm2835 ALSA"
                alsa.driver_name = "snd_bcm2835"
                device.bus_path = "platform-soc:audio"
                sysfs.path = "/devices/platform/soc/soc:audio/sound/card0"
                device.form_factor = "internal"
                device.string = "default"
                device.buffering.buffer_size = "131072"
                device.buffering.fragment_size = "131072"
                device.access_mode = "mmap+timer"
                device.description = "Built-in Audio"
                device.icon_name = "audio-card"
Content of ".asoundrc"

Code: Select all

pcm.!default {
        type hw
        card 0
}
ctl.!defalt {
        type hw
        card 0
}
PulseAudio config files attached.
Archive.zip
(4.01 KiB) Downloaded 38 times


mentaluproar
Posts: 13
Joined: Sun Mar 20, 2016 7:57 pm

Re: Weird HDMI Audio Problem on Pi 4 (PulseAudio)

Wed Oct 09, 2019 2:57 am

Any solution for this? I only see analog mono but one of the hdmi puts out audio. It’s really screwy.

matzrm
Posts: 21
Joined: Tue Sep 03, 2019 9:15 am

Re: Weird HDMI Audio Problem on Pi 4 (PulseAudio)

Wed Oct 09, 2019 8:56 am

I'm in the same situation, pulseaudio shows only analog mono, but using amixer cset numid=, I can switch from analog to hdmi.

Anyone know why pulseaudio shows only one sink?

drdansinger
Posts: 3
Joined: Tue Oct 15, 2019 4:16 pm

Re: Weird HDMI Audio Problem on Pi 4 (PulseAudio)

Sun Jan 19, 2020 9:03 am

Bumping this issue..

Still can't figure out why ALSA shows all HDMI devices for output, but PulseAudio only detects the analog sink. I've tried to reload the UDEV module, without effect. If I manually force PulseAudio to detect the HDMI device by adding

Code: Select all

load-module module-alsa-sink device=hw:0,1
to etc/pulse/default.pa it will show up in

Code: Select all

pactl list short sinks
but it still is not available in pavucontrol and there is no profile for it.

User avatar
PeterO
Posts: 5976
Joined: Sun Jul 22, 2012 4:14 pm

Re: Weird HDMI Audio Problem on Pi 4 (PulseAudio)

Sun Jan 19, 2020 9:56 am

There is a reason why Raspbian (as standard) doesn't use PulseAudio..... It's pretty rubbish !
It's a solution to a problem that never existed for the majority of users and generally eats CPU cycles for no discernable benefits !
You'll find very few people here have any experience of using it on a Pi because it's not installed by default.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Return to “Troubleshooting”