Related thread: Force display output to DP with audio on HDMI where I am trying to use the HDMI for sound and DP for video.
I wanted to dig deeper into why the DP 1.2 on my Optiplex 3050 is not able to play HD audio. I've made some progress (I think!) but I'm stuck on where to go from here. If it is a limitation of the DP itself, I'd like to understand why.
Here's my findings:
HD Audio (TrueHD and DTS HD MA) from HDMI 1.4 works - log here:
2024-01-16 09:50:27.356 T:1178 debug <general>: CActiveAE - display reset event
2024-01-16 09:50:27.356 T:1179 info <general>: CActiveAESink::OpenSink - initialize sink
2024-01-16 09:50:27.356 T:1179 debug <general>: CActiveAESink::OpenSink - trying to open device ALSA:hdmi:CARD=PCH,DEV=0
2024-01-16 09:50:27.356 T:1179 info <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=PCH,DEV=0"
2024-01-16 09:50:27.358 T:1179 info <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=PCH,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00"
2024-01-16 09:50:27.358 T:1179 info <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2024-01-16 09:50:27.358 T:1179 info <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S32NE
2024-01-16 09:50:27.358 T:1179 debug <general>: CAESinkALSA::InitializeHW - Request: periodSize 2205, bufferSize 8820
2024-01-16 09:50:27.360 T:1179 debug <general>: CAESinkALSA::InitializeHW - Got: periodSize 2205, bufferSize 8820
2024-01-16 09:50:27.360 T:1179 debug <general>: CAESinkALSA::InitializeHW - Setting timeout to 200 ms
2024-01-16 09:50:27.362 T:1179 debug <general>: CAESinkALSA::GetChannelLayout - Input Channel Count: 2 Output Channel Count: 2
2024-01-16 09:50:27.362 T:1179 debug <general>: CAESinkALSA::GetChannelLayout - Requested Layout: FL, FR
2024-01-16 09:50:27.362 T:1179 debug <general>: CAESinkALSA::GetChannelLayout - Got Layout: FL, FR (ALSA: FL FR)
2024-01-16 09:50:27.362 T:1179 debug <general>: CActiveAESink::OpenSink - ALSA Initialized:
2024-01-16 09:50:27.362 T:1179 debug <general>: Output Device : HDA Intel PCH
2024-01-16 09:50:27.362 T:1179 debug <general>: Sample Rate : 44100
2024-01-16 09:50:27.362 T:1179 debug <general>: Sample Format : AE_FMT_S32NE
2024-01-16 09:50:27.362 T:1179 debug <general>: Channel Count : 2
2024-01-16 09:50:27.362 T:1179 debug <general>: Channel Layout: FL, FR
2024-01-16 09:50:27.362 T:1179 debug <general>: Frames : 2205
2024-01-16 09:50:27.362 T:1179 debug <general>: Frame Size : 8
2024-01-16 09:50:27.362 T:1178 debug <general>: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
2024-01-16 09:50:27.390 T:1237 debug <general>: CVideoPlayer::HandleMessages - player 2 reported state: 0
2024-01-16 09:50:27.391 T:1237 debug <general>: CVideoPlayer::HandleMessages - player 1 reported state: 0
2024-01-16 09:50:27.391 T:1182 debug <general>: OnAVChange: CApplication::OnAVChange
2024-01-16 09:50:27.391 T:1237 debug <general>: CVideoPlayer::SetCaching - caching state 1
2024-01-16 09:50:27.391 T:1240 debug <general>: CVideoPlayerVideo - Stillframe left, switching to normal playback
2024-01-16 09:50:27.391 T:1237 debug <general>: CDVDClock::SetSpeedAdjust - adjusted:0.000000
2024-01-16 09:50:27.391 T:1237 debug <general>: CVideoPlayer::SetCaching - caching state 2
2024-01-16 09:50:27.391 T:1237 debug <general>: CDVDClock::SetSpeedAdjust - adjusted:0.000000
2024-01-16 09:50:27.393 T:1237 debug <general>: CVideoPlayer::CheckContinuity - wrapback :2, prev:209000.000000, curr:0.000000, diff:-209000.000000
2024-01-16 09:50:27.393 T:1240 debug <general>: libva info: VA-API version 1.17.0
2024-01-16 09:50:27.393 T:1240 debug <general>: libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
2024-01-16 09:50:27.393 T:1240 debug <general>: libva info: Found init function __vaDriverInit_1_17
2024-01-16 09:50:27.396 T:1240 debug <general>: libva info: va_openDriver() returns 0
2024-01-16 09:50:27.396 T:1241 debug <general>: CDVDAudio::Pause - pausing audio stream
2024-01-16 09:50:27.396 T:1242 debug <general>: Thread Vaapi-Output start, auto delete: false
2024-01-16 09:50:27.396 T:1241 debug <general>: CDVDAudio::Pause - pausing audio stream
2024-01-16 09:50:27.396 T:1242 info <general>: COutput::OnStartup: Output Thread created
2024-01-16 09:50:27.396 T:1241 info <general>: CAEStreamParser::SyncTrueHD - TrueHD stream detected (6 channels, 48000Hz)
2024-01-16 09:50:27.397 T:1241 info <general>: CVideoPlayerAudio: display reset occurred, checking for passthrough
2024-01-16 09:50:27.397 T:1241 debug <general>: CDVDAudioCodecPassthrough::Open - passthrough output device is IEC
2024-01-16 09:50:27.397 T:1241 info <general>: Creating audio stream (codec id: 86060, channels: 6, sample rate: 48000, pass-through)
2024-01-16 09:50:27.397 T:1241 debug <general>: CVideoPlayerAudio:: synctype set to 0: clock feedback
<SNIP>
2024-01-16 09:50:27.615 T:1179 debug <general>: CActiveAESink::OpenSink - trying to open device ALSA:hdmi:CARD=PCH,DEV=0
2024-01-16 09:50:27.615 T:1179 info <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=PCH,DEV=0"
2024-01-16 09:50:27.621 T:1179 info <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=PCH,DEV=0,AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x09"
2024-01-16 09:50:27.622 T:1179 debug <general>: CAESinkALSA::InitializeHW - Request: periodSize 9600, bufferSize 38400
2024-01-16 09:50:27.634 T:1179 debug <general>: CAESinkALSA::InitializeHW - Got: periodSize 9600, bufferSize 38400
2024-01-16 09:50:27.634 T:1179 debug <general>: CAESinkALSA::InitializeHW - Setting timeout to 200 ms
2024-01-16 09:50:27.636 T:1179 debug <general>: CAESinkALSA::GetChannelLayout - Input Channel Count: 8 Output Channel Count: 8
2024-01-16 09:50:27.636 T:1179 debug <general>: CAESinkALSA::GetChannelLayout - Requested Layout: RAW, RAW, RAW, RAW, RAW, RAW, RAW, RAW
2024-01-16 09:50:27.636 T:1179 debug <general>: CAESinkALSA::GetChannelLayout - Got Layout: RAW, RAW, RAW, RAW, RAW, RAW, RAW, RAW (ALSA: none)
2024-01-16 09:50:27.636 T:1179 debug <general>: CActiveAESink::OpenSink - ALSA Initialized:
2024-01-16 09:50:27.636 T:1179 debug <general>: Output Device : HDA Intel PCH
2024-01-16 09:50:27.636 T:1179 debug <general>: Sample Rate : 192000
2024-01-16 09:50:27.636 T:1179 debug <general>: Sample Format : AE_FMT_S16NE
2024-01-16 09:50:27.636 T:1179 debug <general>: Channel Count : 8
2024-01-16 09:50:27.636 T:1179 debug <general>: Channel Layout: RAW, RAW, RAW, RAW, RAW, RAW, RAW, RAW
2024-01-16 09:50:27.636 T:1179 debug <general>: Frames : 9600
2024-01-16 09:50:27.636 T:1179 debug <general>: Frame Size : 16
2024-01-16 09:50:27.654 T:1178 debug <general>: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
2024-01-16 09:50:27.659 T:1237 info <general>: Skipped 1 duplicate messages..
2024-01-16 09:50:27.658 T:1237 debug <general>: CVideoPlayer::HandleMessages - player started 1
2024-01-16 09:50:27.659 T:1237 debug <general>: CVideoPlayer::SetCaching - caching state 3
2024-01-16 09:50:27.659 T:1190 debug <general>: OnAVChange: CApplication::OnAVChange
2024-01-16 09:50:27.659 T:1237 debug <general>: CDVDClock::SetSpeedAdjust - adjusted:0.000000
2024-01-16 09:50:27.659 T:1237 debug <general>: CVideoPlayer::SetCaching - caching state 0
2024-01-16 09:50:27.659 T:1237 debug <general>: CDVDClock::SetSpeedAdjust - adjusted:0.000000
2024-01-16 09:50:27.659 T:1237 debug <general>: VideoPlayer::Sync - Audio - pts: 149000.000000, cache: 508815.933514, totalcache: 800000.011921
2024-01-16 09:50:27.659 T:1237 debug <general>: VideoPlayer::Sync - Video - pts: 0.000000, cache: 50000.000000, totalcache: 100000.000000
2024-01-16 09:50:27.659 T:1190 debug <general>: OnAVStarted: CApplication::OnAVStarted
2024-01-16 09:50:27.660 T:1240 debug <general>: CVideoPlayerVideo - CDVDMsg::GENERAL_RESYNC(-359815.933514)
2024-01-16 09:50:27.661 T:1241 debug <general>: CVideoPlayerAudio - CDVDMsg::GENERAL_RESYNC(-359815.933514), level: 99, cache: 505938.805514
2024-01-16 09:50:27.661 T:1241 debug <general>: CDVDAudio::Resume - resume audio stream
2024-01-16 09:50:27.663 T:1178 debug <general>: ActiveAE - start sync of audio stream
Display More
HD Audio (TrueHD and DTS HD MA) from DP 1.2 DOES NOT work - log here:
2024-01-16 11:29:13.807 T:1410 debug <general>: CActiveAESink::OpenSink - trying to open device ALSA:hdmi:CARD=PCH,DEV=0
2024-01-16 11:29:13.807 T:1410 info <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=PCH,DEV=0"
2024-01-16 11:29:13.809 T:1588 info <general>: CAEStreamParser::SyncTrueHD - TrueHD stream detected (6 channels, 48000Hz)
2024-01-16 11:29:13.809 T:1588 info <general>: Creating audio stream (codec id: 86060, channels: 6, sample rate: 48000, pass-through)
2024-01-16 11:29:13.810 T:1584 debug <general>: OutputPicture - dropped in output
2024-01-16 11:29:13.810 T:1410 info <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=PCH,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00"
2024-01-16 11:29:13.810 T:1410 info <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2024-01-16 11:29:13.810 T:1410 info <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S32NE
2024-01-16 11:29:13.810 T:1410 debug <general>: CAESinkALSA::InitializeHW - Request: periodSize 2205, bufferSize 8820
2024-01-16 11:29:13.816 T:1584 debug <general>: OutputPicture - dropped in output
2024-01-16 11:29:13.819 T:1410 info <general>: Skipped 1 duplicate messages..
2024-01-16 11:29:13.819 T:1410 debug <general>: CAESinkALSA::InitializeHW - Got: periodSize 2205, bufferSize 8820
2024-01-16 11:29:13.819 T:1410 debug <general>: CAESinkALSA::InitializeHW - Setting timeout to 200 ms
2024-01-16 11:29:13.821 T:1410 debug <general>: CAESinkALSA::GetChannelLayout - Input Channel Count: 2 Output Channel Count: 2
2024-01-16 11:29:13.821 T:1410 debug <general>: CAESinkALSA::GetChannelLayout - Requested Layout: FL, FR
2024-01-16 11:29:13.821 T:1410 debug <general>: CAESinkALSA::GetChannelLayout - Got Layout: FL, FR (ALSA: FL FR)
2024-01-16 11:29:13.821 T:1410 debug <general>: CActiveAESink::OpenSink - ALSA Initialized:
2024-01-16 11:29:13.821 T:1410 debug <general>: Output Device : HDA Intel PCH
2024-01-16 11:29:13.821 T:1410 debug <general>: Sample Rate : 44100
2024-01-16 11:29:13.821 T:1410 debug <general>: Sample Format : AE_FMT_S32NE
2024-01-16 11:29:13.821 T:1410 debug <general>: Channel Count : 2
2024-01-16 11:29:13.821 T:1410 debug <general>: Channel Layout: FL, FR
2024-01-16 11:29:13.821 T:1410 debug <general>: Frames : 2205
2024-01-16 11:29:13.821 T:1410 debug <general>: Frame Size : 8
2024-01-16 11:29:13.821 T:1409 debug <general>: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
2024-01-16 11:29:13.822 T:1588 info <general>: Skipped 1 duplicate messages..
2024-01-16 11:29:13.822 T:1588 debug <general>: CVideoPlayerAudio:: synctype set to 0: clock feedback
2024-01-16 11:29:13.822 T:1410 info <general>: CActiveAESink::OpenSink - initialize sink
2024-01-16 11:29:13.825 T:1584 debug <general>: OutputPicture - dropped in output
2024-01-16 11:29:13.841 T:1455 info <CAddonSettings[[email protected]]>: Skipped 2 duplicate messages..
2024-01-16 11:29:13.841 T:1455 debug <CAddonSettings[[email protected]]>: trying to load setting definitions from old format...
2024-01-16 11:29:13.842 T:1455 debug <CSettingsManager>: requested setting (LastIncrementalSync) was not found.
2024-01-16 11:29:13.842 T:1455 debug <CSettingsManager>: requested setting (MinimumSetup) was not found.
2024-01-16 11:29:13.842 T:1455 debug <CSettingsManager>: requested setting (MusicRescan) was not found.
2024-01-16 11:29:13.842 T:1455 debug <CSettingsManager>: requested setting (SyncInstallRunDone) was not found.
2024-01-16 11:29:13.842 T:1455 debug <CSettingsManager>: requested setting (groupedSets) was not found.
2024-01-16 11:29:13.842 T:1455 debug <CSettingsManager>: requested setting (platformDetected) was not found.
2024-01-16 11:29:13.843 T:1584 debug <general>: OutputPicture - dropped in output
2024-01-16 11:29:13.915 T:1580 info <general>: Skipped 8 duplicate messages..
2024-01-16 11:29:13.915 T:1580 debug <general>: CVideoPlayer::HandleMessages - player started 2
2024-01-16 11:29:13.915 T:1398 debug <general>: ApplyStyle - Start setting up the LibAss style
2024-01-16 11:29:13.917 T:1398 debug <general>: CDVDSubtitlesLibass: [ass] fontselect: (DejaVu Sans, 400, 0) -> DejaVuSans, 0, DejaVuSans
2024-01-16 11:29:14.023 T:1410 debug <general>: CActiveAESink::OpenSink - trying to open device ALSA:hdmi:CARD=PCH,DEV=0
2024-01-16 11:29:14.023 T:1410 info <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=PCH,DEV=0"
2024-01-16 11:29:14.026 T:1410 info <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=PCH,DEV=0,AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x09"
2024-01-16 11:29:14.026 T:1410 debug <general>: CAESinkALSA::InitializeHW - Request: periodSize 9600, bufferSize 38400
2024-01-16 11:29:14.036 T:1410 debug <general>: CAESinkALSA::InitializeHW - Got: periodSize 9600, bufferSize 38400
2024-01-16 11:29:14.036 T:1410 debug <general>: CAESinkALSA::InitializeHW - Setting timeout to 200 ms
2024-01-16 11:29:14.037 T:1410 debug <general>: CAESinkALSA::GetChannelLayout - Input Channel Count: 8 Output Channel Count: 8
2024-01-16 11:29:14.037 T:1410 debug <general>: CAESinkALSA::GetChannelLayout - Requested Layout: RAW, RAW, RAW, RAW, RAW, RAW, RAW, RAW
2024-01-16 11:29:14.037 T:1410 debug <general>: CAESinkALSA::GetChannelLayout - Got Layout: RAW, RAW, RAW, RAW, RAW, RAW, RAW, RAW (ALSA: none)
2024-01-16 11:29:14.037 T:1410 debug <general>: CActiveAESink::OpenSink - ALSA Initialized:
2024-01-16 11:29:14.037 T:1410 debug <general>: Output Device : HDA Intel PCH
2024-01-16 11:29:14.037 T:1410 debug <general>: Sample Rate : 192000
2024-01-16 11:29:14.037 T:1410 debug <general>: Sample Format : AE_FMT_S16NE
2024-01-16 11:29:14.037 T:1410 debug <general>: Channel Count : 8
2024-01-16 11:29:14.037 T:1410 debug <general>: Channel Layout: RAW, RAW, RAW, RAW, RAW, RAW, RAW, RAW
2024-01-16 11:29:14.037 T:1410 debug <general>: Frames : 9600
2024-01-16 11:29:14.037 T:1410 debug <general>: Frame Size : 16
2024-01-16 11:29:14.040 T:1409 debug <general>: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
2024-01-16 11:29:14.045 T:1580 info <general>: Skipped 1 duplicate messages..
2024-01-16 11:29:14.045 T:1580 debug <general>: CVideoPlayer::HandleMessages - player started 1
2024-01-16 11:29:14.045 T:1580 debug <general>: CVideoPlayer::SetCaching - caching state 3
2024-01-16 11:29:14.045 T:1567 debug <general>: OnAVChange: CApplication::OnAVChange
2024-01-16 11:29:14.045 T:1580 debug <general>: CDVDClock::SetSpeedAdjust - adjusted:0.000000
2024-01-16 11:29:14.045 T:1580 debug <general>: CVideoPlayer::SetCaching - caching state 0
2024-01-16 11:29:14.045 T:1580 debug <general>: CDVDClock::SetSpeedAdjust - adjusted:0.000000
2024-01-16 11:29:14.045 T:1580 debug <general>: VideoPlayer::Sync - Audio - pts: 896000.000000, cache: 526418.892514, totalcache: 800000.011921
2024-01-16 11:29:14.045 T:1580 debug <general>: VideoPlayer::Sync - Video - pts: 709000.000000, cache: 50000.000000, totalcache: 100000.000000
2024-01-16 11:29:14.045 T:1588 debug <general>: CVideoPlayerAudio - CDVDMsg::GENERAL_RESYNC(369581.107486), level: 98, cache: 522780.829514
2024-01-16 11:29:14.045 T:1588 debug <general>: CDVDAudio::Resume - resume audio stream
2024-01-16 11:29:14.045 T:1409 debug <general>: ActiveAE - start sync of audio stream
Display More
In both cases, it first tries to create a 2 channel output stream:
Sample Rate : 44100
Sample Format : AE_FMT_S32NE
Channel Count : 2
Channel Layout: FL, FR
and then an 8 channel output stream:
Sample Rate : 192000
Sample Format : AE_FMT_S16NE
Channel Count : 8
Channel Layout: RAW, RAW, RAW, RAW, RAW, RAW, RAW, RAW
I suspected perhaps the DP 1.2 does not support 192000khz with 8 channels, but if I run a speaker-test command, it works fine:
LibreELEC:~ # speaker-test -D hdmi:CARD=PCH,DEV=0 -c 8 -r 192000 -b 9600 -p 2400 -F S32_LE
speaker-test 1.2.8
Playback device is hdmi:CARD=PCH,DEV=0
Stream parameters are 192000Hz, S32_LE, 8 channels
Using 16 octaves of pink noise
Rate set to 192000Hz (requested 192000Hz)
Buffer size range from 8 to 131072
Period size range from 4 to 65536
Requested period time 2400 us
Requested buffer time 9600 us
was set period_size = 461
was set buffer_size = 1844
0 - Front Left
4 - Front Center
1 - Front Right
7 - Rear Right
3 - Rear Right Center
2 - Rear Left Center
6 - Rear Left
5 - LFE
Time per period = 23.984268
Display More
If I turn off passthrough in Kodi settings, LPCM 7.1 is sent fine via the DP for all 8 channel HD audio streams.
Any guidance on what I can check next?