[pulseaudio-discuss] HDMI audio passthrough no longer working

Arun Raghavan arun at accosted.net
Mon Mar 9 03:28:10 PDT 2015


On 9 March 2015 at 15:41, Thomas Martitz <kugel at rockbox.org> wrote:
> Am 08.03.2015 um 12:42 schrieb Alexander E. Patrakov:
>
>> 08.03.2015 13:54, Xamindar wrote:
>>>
>>> Further testing has shown that this is a pulseaudio problem. When I have
>>> my audio device set to "Digital Surround 7.1" as it should be,
>>> passthrough will not work in any app I test (kodi and vlc). My options
>>> are here in this image: http://i.imgur.com/3zkMsGy.png
>>> I do have the passthrough settings checked as can be seen in this image:
>>> http://i.imgur.com/N7KMCZc.png
>>>
>>> If I downgrade my settings to the "Digital Stereo" option then
>>> passthrough will work for some reason.
>>>
>>> Is this a limitation/regression in pulseaudio? Or do I simply have some
>>> configuration set wrong?
>>
>>
>> This is a limitation and not a regression (i.e. passthrough never worked
>> on non-stereo sinks). Here is what happens.
>>
>> Passthrough works this way: an application negotiates a format with
>> PulseAudio, and then sends a fake stereo stream that contains encoded data,
>> just what would have to be transferred over spdif. Then PulseAudio is
>> supposed to copy this fake stereo data to the receiver.
>>
>> So, it would need to open the ALSA device in stereo mode. But, in
>> multichannel profiles, it opens the ALSA device with the number of channels
>> other than 2. So, to support your use case, new logic has to be added to the
>> sink code so that it opens audio device with 2 channels and exposes 2
>> channels while in passthrough mode, even if it would use a different channel
>> count otherwise.
>>
>> What fails in your testcase is the line above the "rate update failed, or
>> other parts of sample spec didn't match" comment in src/pulse/sink.c (the
>> fake channel count doesn't match, as explained above).
>>
>> But, why are you using the passthrough mode at all? HDMI, unlike SPDIF,
>> has enough bandwidth to pass the 7.1 PCM stream. For SPDIF, passthrough was
>> a necessity due to this bandwidth limitation. For real HDMI (as opposed to
>> HDMI-to-SPDIF converter that doesn't support multichannel PCM anyway), it
>> only serves marketing purposes (i.e., in theory, provides no benefits over
>> software decoding and sending the resulting multichannel PCM stream). I
>> sometimes think that the proper fix is to disallow passthrough completely
>> for multichannel HDMI profiles, i.e. to effectively hide the checkboxes that
>> you have demonstrated on the screenshot.
>>
>
>
> 1) You might want to decode Dolby Digital / DTS on an external receiver
> because decoding on the PC requires a license.
> 2) Receivers might only accept spdif-data (plain stereo or encoded)
> regardless of HDMI's theoretical capabilities.
>
> If PA is actually unable to pass through in multichannel profiles, then yes,
> pavucontrol should not show the check boxes, or better yet grey them out
> with a "Change to stereo profile" tooltip.

Probably less effort than that to just reopen for 2 channels in
passthrough mode. I'll try to get to this soon.

-- Arun


More information about the pulseaudio-discuss mailing list