From 4a2a3185c94d32a73c63636496fce28f45a4149f Mon Sep 17 00:00:00 2001 From: fritsch Date: Wed, 11 Dec 2019 08:06:42 +0100 Subject: [PATCH] AudioTrack: Hack for Leia - workaround broken AMLogic firmware v23 --- xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp index 8fed290c2535d..0f3fadfa89865 100644 --- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp +++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp @@ -882,6 +882,17 @@ void CAESinkAUDIOTRACK::UpdateAvailablePassthroughCapabilities() m_info.m_wantsIECPassthrough = false; m_info.m_dataFormats.push_back(AE_FMT_RAW); m_info.m_streamTypes.clear(); + + // if hardware is amlogic but aml_present is false, means permissions are wrong in FW, we run on broken v23 firmware which should not have + // been sold to customers. Just add AC3 and return early + if (!aml_present() && (StringUtils::StartsWithNoCase(CJNIBuild::HARDWARE, "amlogic") && + CJNIAudioManager::GetSDKVersion() == 23)) + { + m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_AC3); + CLog::Log(LOGNOTICE, "AMLogic v23 broken FW workaround in place - only AC3 supported"); + return; + } + if (CJNIAudioFormat::ENCODING_AC3 != -1) { if (VerifySinkConfiguration(48000, CJNIAudioFormat::CHANNEL_OUT_STEREO, CJNIAudioFormat::ENCODING_AC3))