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

audiosettings: add helper service to set ALSA defaults on RPI #3759

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 5, 2023

  1. audiosettings: add helper service to set ALSA defaults on RPI

    Added a helper method that installs a `systemd` service meant to automatically configure ALSA with the HDMI 0 port when using the ARM `vc4hdmi` RPI driver. The service will run once then disable itself.
    
    Since the default ALSA configuration on RaspiOS goes through the analog output (Heaphones) when the `vc4-kms-v3d` overlay is present, if we want to configure the HDMI output by default there needs to be an additional configuration.  The additional configuration needs also to be applied when only one audio output is present, since the ALSA config is a bit more involved.
    
    There are a couple of reasons for which is a service:
     - the `vc4hdmi` device index can be different depending on the Pi model. Pi0(w)/Pi400 has no analog output by default and CM models may not have it also)
     - the card name can also be different (Pi4 with 2 devices vs Pi3/Pi2/Pi1 with 1 device)
    
    Note that the service will configure the 1st HDMI port/device, on Pi models with multiple HDMI ports (Pi4/Pi 400/Pi5/CM4) the user will still need to use the Audio settings dialog to change it if they want to. There may be a way to detect which HDMI port is active and has audio, but that's not implemented.
    cmitu committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    e39d31c View commit details
    Browse the repository at this point in the history