@@ -72,7 +72,7 @@ public final class AudioCapabilities {
7272 new ImmutableMap .Builder <Integer , Integer >()
7373 .put (C .ENCODING_AC3 , 6 )
7474 .put (C .ENCODING_AC4 , 6 )
75- .put (C .ENCODING_DTS , 6 )
75+ .put (C .ENCODING_DTS , 10 )
7676 .put (C .ENCODING_E_AC3_JOC , 6 )
7777 .put (C .ENCODING_E_AC3 , 8 )
7878 .put (C .ENCODING_DTS_HD , 8 )
@@ -211,7 +211,8 @@ public Pair<Integer, Integer> getEncodingAndChannelConfigForPassthrough(Format f
211211 return null ;
212212 }
213213 int channelCount ;
214- if (format .channelCount == Format .NO_VALUE || encoding == C .ENCODING_E_AC3_JOC ) {
214+ if (format .channelCount == Format .NO_VALUE || encoding == C .ENCODING_E_AC3_JOC
215+ || encoding == C .ENCODING_DTS ) {
215216 // In HLS chunkless preparation, the format channel count and sample rate may be unset. See
216217 // https://github.com/google/ExoPlayer/issues/10204 and b/222127949 for more details.
217218 // For E-AC3 JOC, the format is object based so the format channel count is arbitrary.
@@ -220,13 +221,7 @@ public Pair<Integer, Integer> getEncodingAndChannelConfigForPassthrough(Format f
220221 channelCount = getMaxSupportedChannelCountForPassthrough (encoding , sampleRate );
221222 } else {
222223 channelCount = format .channelCount ;
223- if (format .sampleMimeType == MimeTypes .AUDIO_DTS_X ) {
224- if (channelCount > 10 ) {
225- // To fix wrong reporting from device. ChannelCount is reported as 8 for DTS:X P2
226- // on some devices.
227- return null ;
228- }
229- } else if (channelCount > maxChannelCount ) {
224+ if (channelCount > maxChannelCount ) {
230225 return null ;
231226 }
232227 }
0 commit comments