Subject: RasPi5 audio

From: [email-masked]
Date: Wed, 17 Jan 2024 08:40:05 -0800

I took the SD card from a RasPi4 and it booted my new RasPi5 just fine.

Two issues:
   [1] No audio (HDMI audio works on RasPi4)
   [2] Screen draws offscreen at the edges

I tried various settings in boot/userconfig.txt but no joy.

Anyone get sound on yet on RasPi5?  Overscan?

XFCE desktop.

RasPi5:Alpine:~ >>> uname -a
Linux rpi-alpine.whidbey.com 6.6.4-0-rpi #1-Alpine SMP PREEMPT Mon Dec  
4 15:16:56 UTC 2023 aarch64 GNU/Linux

Thanks much,
-KenD         [Ken (dot) Dickey (at) Whidbey (dot) COM]

---

From: Ralf Mardorf <[email-masked]>
Date: Wed, 17 Jan 2024 18:13:43 +0100

>    [1] No audio (HDMI audio works on RasPi4)

Hi,

please connect to the HDMI device and post the output of

  aplay -l

It should be possible to select the HDMI device when starting a user
session by ~/.asoundrc ¹. In my case it does look that strange, since
I've got an unusual alsa-base.conf . However, depending on the
computer's audio device the number of the "ALSA device" might change.

>    [2] Screen draws offscreen at the edges

I can't comment on this. I would expect something like this, when using
a CRT in combination with a wrong xorg "Modeline".

Regards,
Ralf

¹ This is on Arch Linux, but   aplay -l   and   .asoundrc   should work
with almost all, if not all distros as well. You can ignore
/etc/modprobe.d/alsa-base.conf , I only wanted to show, why aplay
mentions card 0 and card 3, but no card 1 and card 2. Those are
placeholders for backwards compatibility with scripts I used with
another machine.
 
• rocketmouse@archlinux ~ 
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDSPMx579bcc [RME AIO_579bcc], device 0: RME AIO [RME AIO]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: PCH [HDA Intel PCH], device 0: ALC897 Analog [ALC897 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: PCH [HDA Intel PCH], device 1: ALC897 Digital [ALC897 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: PCH [HDA Intel PCH], device 3: HDMI 0 [EV2450]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
• rocketmouse@archlinux ~ 
$ 
• rocketmouse@archlinux ~ 
$ 
• rocketmouse@archlinux ~ 
$ cat /etc/modprobe.d/alsa-base.conf
# ALSA module ordering
options snd slots=snd_hdspm,snd_ice1712,snd_ice1712

• rocketmouse@archlinux ~ 
$ 
• rocketmouse@archlinux ~ 
$ 
• rocketmouse@archlinux ~ 
$ cat .asoundrc
defaults.pcm.card 3
defaults.pcm.device 3

---

From: [email-masked]
Date: Wed, 17 Jan 2024 09:21:05 -0800

> please connect to the HDMI device and post the output of

RasPi5:Alpine:/boot >>> aplay -l
aplay: device_list:277: no soundcards found...

I am using HDMI display, but perhaps I don't understand the semantics of 
"connect to the HDMI device".

-KenD

---

From: Ralf Mardorf <[email-masked]>
Date: Wed, 17 Jan 2024 18:46:36 +0100

Hi,

I only wanted to ensure that your HDMI display is attached. It might
depend on the kernel or something else, usually, but not always, the
"ALSA device" to use shows the connected HDMI display.
Here it's an EIZO EV2450:

   $ aplay -l | grep "device 3"
   card 3: PCH [HDA Intel PCH], device 3: HDMI 0 [EV2450]

If it shows [HDMI 0], [HDMI 1] ... you might need to test each of it by
~/.asoundrc .

Unfortunately you suffer from a more serious issue. If you run

  lsmod | grep snd

and it shows the required modules and if you run

  lspci | grep -i audio

and it shows or shows not the computer's audio device, then you need to
take a look at log files.

Hm? On Alpine   journalctl -p err   won't help ;). I don't like systemd,
but I'm used to it.

Maybe running   dmseg   with root privileges works?

  dmesg | grep -i audio

If snd modules are missing, this might be the culprit, but it's more
likely something else.

I wonder if    lspci | grep -i audio    shows an audio device that is
supported by the kernel.

Regards,
Ralf

---

From: [email-masked]
Date: Wed, 17 Jan 2024 10:11:37 -0800

RasPi5:Alpine:~ >>> lsmod | grep snd
snd_soc_hdmi_codec     16384  0
snd_soc_core          294912  2 vc4,snd_soc_hdmi_codec
snd_compress           20480  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_pcm               143360  4 
snd_soc_hdmi_codec,snd_compress,snd_soc_core,snd_pcm_dmaengine
snd_timer              36864  1 snd_pcm
snd                   114688  5 
snd_soc_hdmi_codec,snd_timer,snd_compress,snd_soc_core,snd_pcm
RasPi5:Alpine:~ >>> lspci | grep -i audio
RasPi5:Alpine:~ >>> sudo dmesg | grep -i audio

Looks like missing hdmi codec?

Copy from Raspian? How?

-KenD

---

From: Ralf Mardorf <[email-masked]>
Date: Wed, 17 Jan 2024 19:38:31 +0100

Hi,

to me it looks like missing RasPi5 SoC firmware. I don't have any
knowledge about this.

https://wiki.alpinelinux.org/wiki/Alpine_on_ARM#Supported_SoCs

Regards,
Ralf

---

From: [email-masked]
Date: Wed, 17 Jan 2024 10:41:07 -0800

On 2024-01-17 10:38, Ralf Mardorf wrote:

> to me it looks like missing RasPi5 SoC firmware.

If I boot Raspian I have audio out HDMI in browser, so probably not 
firmware.

Possibly kernel service not enabled?

Thanks for all ideas,
-KenD

---

From: Ralf Mardorf <[email-masked]>
Date: Wed, 17 Jan 2024 19:53:31 +0100

Hi,

"Raspbian is a free operating system based on Debian optimized for the
Raspberry Pi hardware." - https://www.raspbian.org/

Is Raspbian using https://tracker.debian.org/pkg/raspi-firmware or do
they have their own firmware package/s? What does Alpine provide?

Same versions? If so, maybe you can port a patch used by another distro?

I don't know! Again, I don't have knowledge about this.

Regards,
Ralf

---

From: [email-masked]
Date: Wed, 17 Jan 2024 10:39:00 -0800

Ah. my misunderstanding. Codec is there..

asPi5:Alpine:/boot >>> lsmod |grep snd
snd_soc_hdmi_codec     16384  0
snd_soc_core          294912  2 vc4,snd_soc_hdmi_codec
snd_compress           20480  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_pcm               143360  4 
snd_soc_hdmi_codec,snd_compress,snd_soc_core,snd_pcm_dmaengine
snd_timer              36864  1 snd_pcm
snd                   114688  5 
snd_soc_hdmi_codec,snd_timer,snd_compress,snd_soc_core,snd_pcm
RasPi5:Alpine:/boot >>> modinfo snd_soc_hdmi_codec
filename:       
/lib/modules/6.6.12-0-rpi/kernel/sound/soc/codecs/snd-soc-hdmi-codec.ko.xz
alias:          platform:hdmi-audio-codec
license:        GPL
description:    HDMI Audio Codec Driver
author:         Jyri Sarha <[email-masked]>
srcversion:     DC86892BBCAD70455548696
depends:        snd-pcm,snd,snd-soc-core
intree:         Y
name:           snd_soc_hdmi_codec
vermagic:       6.6.12-0-rpi SMP preempt mod_unload modversions aarch64
RasPi5:Alpine:/boot >>>

Suggestions??