audio: alsa_utils: get hdmi device from property

* ALSA HDMI audio needs to be disabled when 3.5mm jack, DAC, or external
  USB audio cards is used. Enable HDMI audio path based on system property
  and the set the vc4 audio device name accordingly.
This commit is contained in:
Konsta
2025-10-25 20:19:52 +03:00
parent fabdcf5490
commit 7bc0df0800
2 changed files with 30 additions and 8 deletions

View File

@@ -18,6 +18,8 @@
#ifndef ANDROID_SYSTEM_MEDIA_ALSA_UTILS_ALSA_DEVICE_PROXY_H
#define ANDROID_SYSTEM_MEDIA_ALSA_UTILS_ALSA_DEVICE_PROXY_H
#include <cutils/properties.h>
#include <alsa/asoundlib.h>
#include <tinyalsa/asoundlib.h>
@@ -33,6 +35,9 @@ typedef struct {
size_t frame_size; /* valid after proxy_prepare(), the frame size in bytes */
uint64_t transferred; /* the total frames transferred, not cleared on standby */
bool hdmi;
char hdmi_device_name[PROPERTY_VALUE_MAX];
} alsa_device_proxy;