Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpi4: snd_bcm2835 kernel module not being loaded on newer balenaOS versions #100

Open
2 tasks
tmigone opened this issue Mar 30, 2022 · 5 comments
Open
2 tasks
Assignees

Comments

@tmigone
Copy link
Contributor

tmigone commented Mar 30, 2022

Latest balenaOS versions don't load the snd_bcm2835 driver by default. This results in the following problems:

  • Audio jack not working (no driver)
  • HDMI audio drivers not being picked up by the audio block

Investigating the exact balenaOS version where this broke and the solution.

Working on replicating this issue so far with no success.

@tmigone
Copy link
Contributor Author

tmigone commented Mar 30, 2022

For future reference, affected device:

root@balena:~# cat /etc/os-release
ID="balena-os"
NAME="balenaOS"
VERSION="2.95.8"
VERSION_ID="2.95.8"
PRETTY_NAME="balenaOS 2.95.8"
MACHINE="raspberrypi4-64"
META_BALENA_VERSION="2.95.8"
BALENA_BOARD_REV="91ad4e1"
META_BALENA_REV="133b50d2"
SLUG="raspberrypi4-64"
root@balena:~# lsmod | grep snd
root@balena:~# cat /proc/asound/cards
 0 [vc4hdmi0       ]: vc4-hdmi - vc4-hdmi-0
                      vc4-hdmi-0
 1 [vc4hdmi1       ]: vc4-hdmi - vc4-hdmi-1
                      vc4-hdmi-1

@tmigone
Copy link
Contributor Author

tmigone commented Mar 30, 2022

Seems to be related to DT Overlays. Haven't identified which balenaOS version this broke but:

  • Not working --> vc4-kms-v3d
  • Working --> vc4-fkms-v3d

@tmigone
Copy link
Contributor Author

tmigone commented Mar 30, 2022

Looks like vc4-kms-vd3 does not do analog audio so we need snd_bcm2835 module to take care of it. However we also need the snd_bcm2835 to only take care of analog audio.

Solutions (maybe?):

  • Move dtparam=audio=on in config.txt before dtoverlay=vc4-kms-v3d --> this ensures the snd_bcm2835 inits first and takes care of analog audio.
  • Add /etc/modprobe.d/snd.conf with enable_headphones=1 and hdmi disabled

Sources:

@tmigone tmigone self-assigned this Mar 30, 2022
@rahul-thakoor
Copy link
Contributor

@tmigone perhaps we need conf files similar to the ones here

@ViiMorales
Copy link

Sorry if this is a dumb question, but how can i reorder the entries in the conf file? Balena always reboots an reorders them alphabetically if i modify them manually. and if i add the entries via the configuration in the dashboard i wont matter the order as it always builds the file in that order.

this actually fixes my problem but only briefly as i said balena reboots and resets the config.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants