home-assistant / plugin-audio

Pulseaudio implementation for Home Assistant
Apache License 2.0
26 stars 13 forks source link

Amlogic ALSA configuration file fixes #134

Closed agners closed 1 year ago

agners commented 1 year ago

Use new driver name for ALSA configuration

With Linux kernel commit bc387887ae22 ("ASoC: meson: implement driver_name for snd_soc_card in meson-card-utils") the Meson ASoC driver passes the driver name (seemingly derrived from device tree "compatible") to ALSA. This then reflects in /proc/asound/cards, which now lists "axg-sound-card", instead of ODROID-N2 (derrived from the device tree "model"):

Since Linux 5.16+

  # cat  /proc/asound/cards
   0 [ODROIDN2       ]: axg-sound-card - ODROID-N2
                        ODROID-N2

Linux 5.15 and earlier:

  # cat /proc/asound/cards
   0 [ODROIDN2       ]: ODROID-N2 - ODROID-N2
                        ODROID-N2

It seems that this string is used to find the ALSA configuration in /usr/share/alsa/cards/.

Note that the same string is used in Khadas VIM3. But since the two configuration files are the same, this actually deduplicate things.

Similarly, use new driver name for ALSA configuration for ODROID-C2.

Also add a missing configuration file for Khadas VIM3 and HAOS 9.5.