mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
projects/WeTek_Play/patches/kodi: Make ugly IEC958 workaround less ulgy
We need to report AE_DEVTYPE_IEC958 only for AML Dummy Codec. Let ALSA provide us with proper properties for other sound cards. This matches RPi implementation.
This commit is contained in:
parent
5d69b89842
commit
4158d43ba9
@ -2,17 +2,16 @@ diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngin
|
||||
index e22db7a..dcdaf2e 100644
|
||||
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
|
||||
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
|
||||
@@ -1291,6 +1291,12 @@ void CAESinkALSA::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
|
||||
@@ -1342,6 +1342,12 @@ void CAESinkALSA::EnumerateDevice(AEDeviceInfoList &list, const std::string &dev
|
||||
if (snd_card_get_name(cardNr, &cardName) == 0)
|
||||
info.m_displayName = cardName;
|
||||
|
||||
AEDeviceType CAESinkALSA::AEDeviceTypeFromName(const std::string &name)
|
||||
{
|
||||
+#ifdef HAS_LIBAMCODEC
|
||||
+ // ugly workaround to show DTS / AC3 caps
|
||||
+ // but don't run into multi channel issues
|
||||
+ // as we can only open 2 pcm channels
|
||||
+ return AE_DEVTYPE_IEC958;
|
||||
+#endif
|
||||
if (name.substr(0, 4) == "hdmi")
|
||||
return AE_DEVTYPE_HDMI;
|
||||
else if (name.substr(0, 6) == "iec958" || name.substr(0, 5) == "spdif")
|
||||
|
||||
+ // ugly workaround to show DTS / AC3 caps
|
||||
+ // but don't run into multi channel issues
|
||||
+ // as we can only open 2 pcm channels
|
||||
+ if (info.m_displayName == "AML-DUMMY-CODEC")
|
||||
+ info.m_deviceType = AE_DEVTYPE_IEC958;
|
||||
+
|
||||
if (info.m_deviceType == AE_DEVTYPE_HDMI && info.m_displayName.size() > 5 &&
|
||||
info.m_displayName.substr(info.m_displayName.size()-5) == " HDMI")
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user