aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfritsch <Peter.Fruehberger@gmail.com>2017-10-03 12:53:36 +0200
committerfritsch <Peter.Fruehberger@gmail.com>2017-10-05 19:22:41 +0200
commit292eebba95181957ef919ed991ca2a7f06b833de (patch)
tree7a21852fe038320e5059679b3732f31416a405f0
parent4c4397764f38098b8d8509d104e2f7b7d6d95f8d (diff)
AESinkAUDIOTRACK: Verify RAW formats too
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp41
1 files changed, 28 insertions, 13 deletions
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
index 327a0c8172..e87ae1919e 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
@@ -811,24 +811,33 @@ void CAESinkAUDIOTRACK::UpdateAvailablePassthroughCapabilities()
m_info.m_streamTypes.clear();
if (CJNIAudioFormat::ENCODING_AC3 != -1)
{
- m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_AC3);
- CLog::Log(LOGDEBUG, "Firmware implements AC3 RAW");
+ if (VerifySinkConfiguration(48000, CJNIAudioFormat::CHANNEL_OUT_STEREO, CJNIAudioFormat::ENCODING_AC3))
+ {
+ m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_AC3);
+ CLog::Log(LOGDEBUG, "Firmware implements AC3 RAW");
+ }
}
// EAC3 working on shield, broken on FireTV
if (CJNIAudioFormat::ENCODING_E_AC3 != -1)
{
- m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_EAC3);
- CLog::Log(LOGDEBUG, "Firmware implements EAC3 RAW");
+ if (VerifySinkConfiguration(48000, CJNIAudioFormat::CHANNEL_OUT_STEREO, CJNIAudioFormat::ENCODING_E_AC3))
+ {
+ m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_EAC3);
+ CLog::Log(LOGDEBUG, "Firmware implements EAC3 RAW");
+ }
}
if (CJNIAudioFormat::ENCODING_DTS != -1)
{
- CLog::Log(LOGDEBUG, "Firmware implements DTS RAW");
- m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTSHD_CORE);
- m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_1024);
- m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_2048);
- m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_512);
+ if (VerifySinkConfiguration(48000, CJNIAudioFormat::CHANNEL_OUT_STEREO, CJNIAudioFormat::ENCODING_DTS))
+ {
+ CLog::Log(LOGDEBUG, "Firmware implements DTS RAW");
+ m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTSHD_CORE);
+ m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_1024);
+ m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_2048);
+ m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_512);
+ }
}
if (aml_present() && CJNIAudioManager::GetSDKVersion() < 23)
@@ -853,13 +862,19 @@ void CAESinkAUDIOTRACK::UpdateAvailablePassthroughCapabilities()
{
if (CJNIAudioFormat::ENCODING_DTS_HD != -1)
{
- CLog::Log(LOGDEBUG, "Firmware implements DTS-HD RAW");
- m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTSHD);
+ if (VerifySinkConfiguration(48000, AEChannelMapToAUDIOTRACKChannelMask(AE_CH_LAYOUT_7_1), CJNIAudioFormat::ENCODING_DTS_HD))
+ {
+ CLog::Log(LOGDEBUG, "Firmware implements DTS-HD RAW");
+ m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTSHD);
+ }
}
if (CJNIAudioFormat::ENCODING_DOLBY_TRUEHD != -1)
{
- CLog::Log(LOGDEBUG, "Firmware implements TrueHD RAW");
- m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_TRUEHD);
+ if (VerifySinkConfiguration(48000, AEChannelMapToAUDIOTRACKChannelMask(AE_CH_LAYOUT_7_1), CJNIAudioFormat::ENCODING_DOLBY_TRUEHD))
+ {
+ CLog::Log(LOGDEBUG, "Firmware implements TrueHD RAW");
+ m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_TRUEHD);
+ }
}
}
// Android v24 and backports can do real IEC API