[pulseaudio-discuss] [PATCH] format: Fix rate for HBR passthrough formats
Arun Raghavan
arun at arunraghavan.net
Fri May 25 14:15:00 UTC 2018
On Tue, 22 May 2018, at 4:32 PM, Alexander E. Patrakov wrote:
> There is some Microsoft documentation that contradicts this code.
>
> https://msdn.microsoft.com/en-us/library/windows/desktop/dd316761(v=vs.85).aspx
>
> """
> Dolby TrueHD (MAT)
>
> Dolby TrueHD content is transmitted over IEC 60958 at 176.4 kHz / 8
> channels (requiring an IEC 60958 frame rate of 705.6 kHz) for content
> sample rates of 44.1, 88.2 and 176.4 kHz, and 192 kHz / 8 channels
> (requiring an IEC 60958 frame rate of 768 kHz) for content sample
> rates of 48, 96 and 192 kHz.
> """
Based on Peter's input in a private thread, seems this is not the case on Linux:
https://github.com/xbmc/xbmc/blob/master/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp#L135
https://github.com/xbmc/xbmc/blob/master/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp#L486
Cheers,
Arun
> 2018-05-22 12:13 GMT+08:00 Arun Raghavan <arun at arunraghavan.net>:
> > In high bitrate mode, we force 192kHz/8ch as the sample format, which is
> > the expectation for HBR formats (as that is what allows for the largest
> > possible packet size).
> > ---
> > src/pulsecore/core-format.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/src/pulsecore/core-format.c b/src/pulsecore/core-format.c
> > index 862a74b5d..096acc3a2 100644
> > --- a/src/pulsecore/core-format.c
> > +++ b/src/pulsecore/core-format.c
> > @@ -248,6 +248,9 @@ int pa_format_info_to_sample_spec_fake(const pa_format_info *f, pa_sample_spec *
> >
> > if (f->encoding == PA_ENCODING_EAC3_IEC61937)
> > ss->rate *= 4;
> > + else if ((f->encoding == PA_ENCODING_TRUEHD_IEC61937) ||
> > + (f->encoding == PA_ENCODING_DTSHD_IEC61937))
> > + ss->rate = 192000;
> >
> > return 0;
> > }
> > --
> > 2.17.0
> >
> > _______________________________________________
> > pulseaudio-discuss mailing list
> > pulseaudio-discuss at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
>
>
> --
> Alexander E. Patrakov
More information about the pulseaudio-discuss
mailing list