Commit Graph

5 Commits

Author SHA1 Message Date
Konsta
7bc0df0800 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.
2025-11-06 13:10:09 +02:00
Konsta
fabdcf5490 audio: alsa_utils: increase start threshold to prevent underruns
* For some reason underruns are often observed when using the default
  parameters. Workaround this by increasing start threshold by 20 ms
  (i.e. at 48000Hz there's 960 additional frames in the ring buffer before
  the playback starts). Buffer size also needs to be increased to allow
  larger start threshold. Balance between avoiding underruns and adding
  latency.
* Add logging for the ALSA parameters.
2025-11-06 13:10:00 +02:00
Konsta
3ca268d760 audio: alsa_utils: use alsa for hdmi devices
* HDMI audio devices on Raspberry Pi use FORMAT_IEC958_SUBFRAME_LE which
  is not supported by tinyalsa used on Android. Use ALSA library and its
  virtual vc4 audio devices that use IEC958 plugin to manage the subframe
  conversion.
2025-11-06 13:09:49 +02:00
Konsta
3306b79d41 audio: alsa_utils: change log tag
* Match log tags used elsewhere in the audio HAL to make debugging easier
  (i.e. 'logcat | grep AHAL').
2025-11-06 13:09:39 +02:00
Konsta
487b7689f6 audio: import alsa_utils
* system/media/ at android-16.0.0_r1.
2025-11-06 13:08:00 +02:00