@@ -1607,9 +1607,10 @@ void CAESinkALSA::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
1607
1607
1608
1608
AEDeviceType CAESinkALSA::AEDeviceTypeFromName (const std::string &name)
1609
1609
{
1610
- if (name.substr (0 , 4 ) == " hdmi" )
1610
+ if (name.substr (0 , name.find (' :' )) == " hdmi" ||
1611
+ (aml_get_cpufamily_id () == AML_T7 && name.substr (0 , name.find (' :' )) == " surround71" ))
1611
1612
return AE_DEVTYPE_HDMI;
1612
- else if (name.substr (0 , 6 ) == " iec958" || name.substr (0 , 5 ) == " spdif" )
1613
+ else if (name.substr (0 , name. find ( ' : ' )) == " iec958" || name.substr (0 , name. find ( ' : ' ) ) == " spdif" )
1613
1614
return AE_DEVTYPE_IEC958;
1614
1615
1615
1616
return AE_DEVTYPE_PCM;
@@ -1870,25 +1871,54 @@ void CAESinkALSA::EnumerateDevice(AEDeviceInfoList &list, const std::string &dev
1870
1871
info.m_displayNameExtra = " S/PDIF" ;
1871
1872
else if (info.m_deviceType != AE_DEVTYPE_HDMI)
1872
1873
{
1873
- if (device.substr (0 , 10 ) == " surround71" )
1874
+ if (device.substr (0 , device. find ( ' : ' ) ) == " surround71" )
1874
1875
info.m_displayNameExtra = " HDMI Multi Ch PCM" ;
1875
1876
else
1876
1877
info.m_displayNameExtra = " PCM" ;
1877
1878
}
1879
+ else if (aml_get_cpufamily_id () == AML_T7 && info.m_deviceType == AE_DEVTYPE_HDMI)
1880
+ {
1881
+ if (device.substr (0 , device.find (' :' )) == " surround71" )
1882
+ info.m_displayNameExtra = " HDMI Multi Ch PCM" ;
1883
+ }
1878
1884
}
1879
1885
1886
+ // we don't trust ELD information and push back our supported formats explicitly
1880
1887
if (info.m_deviceType == AE_DEVTYPE_HDMI)
1881
1888
{
1882
- // we don't trust ELD information and push back our supported formats explicitly
1883
- info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_AC3);
1884
- info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTSHD);
1885
- info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTSHD_MA);
1886
- info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTSHD_CORE);
1887
- info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTS_1024);
1888
- info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTS_2048);
1889
- info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTS_512);
1890
- info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_EAC3);
1891
- info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_TRUEHD);
1889
+ switch (aml_get_cpufamily_id ())
1890
+ {
1891
+ case AML_T7:
1892
+ {
1893
+ if (device.substr (0 , device.find (' :' )) == " surround71" )
1894
+ {
1895
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTSHD_MA);
1896
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_TRUEHD);
1897
+ }
1898
+ else
1899
+ {
1900
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_AC3);
1901
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTSHD);
1902
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTSHD_CORE);
1903
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTS_1024);
1904
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTS_2048);
1905
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTS_512);
1906
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_EAC3);
1907
+ }
1908
+ break ;
1909
+ }
1910
+ default :
1911
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_AC3);
1912
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTSHD);
1913
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTSHD_MA);
1914
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTSHD_CORE);
1915
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTS_1024);
1916
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTS_2048);
1917
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_DTS_512);
1918
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_EAC3);
1919
+ info.m_streamTypes .push_back (CAEStreamInfo::STREAM_TYPE_TRUEHD);
1920
+ break ;
1921
+ }
1892
1922
1893
1923
// indicate that we can do AE_FMT_RAW
1894
1924
info.m_dataFormats .push_back (AE_FMT_RAW);
0 commit comments