[WIP] Passthrough support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 24, 2011 at 10:50 AM, Anssi Hannula <anssi.hannula at iki.fi> wrote:
> On 24.03.2011 16:18, pl bossart wrote:
>>> It seems that 384k sample rates aren't supported directly in alsa, I did
>>> some patching to no avail yet.
>>>
>>> In any case if the channel count can be specified with passthrough the
>>> following should work.
>>>
>>> paplay --raw --channels=2 --rate=192000 --passthrough File.dts.spdif192khz (
>>> this works).
>>>
>>> paplay --raw --channels=4 --rate=192000 --passthrough File.dts.spdif384khz (
>>> this fails).
>>>
>>> To passthrough dolby true-hd it looks like it'll be necessary for more than
>>> two channels to work.
>>
>> There was a thread on dts-hd in alsa-devel at some point. Anssi
>> (cc:ed) contributed some patches for HDMI and provided the information
>> below on ffmpeg configurations.
>> You may want to try at the alsa level before trying with pulseaudio to
>> make sure your setup is correct. I tend to believe you have to go for
>> 8ch @ 192kHz to make this work based on my limited understanding of
>> HBR.
>
> Indeed for HBR you need to always specify 8 channels and use rate to
> control the final rate (i.e. you either use "normal" 2 channel
> passthrough or HBR 8 channel passthrough).
>
> For example to passthrough the abovementioned 384 kHz stream you need to
> use 8 channels and rate of 96000. However, I think 384kHz DTS bitstream
> is generally *not* supported by A/V receivers, so you probably want to
> use 768kHz (8 channels, 192kHz).
>
> (note: I haven't tested whether HBR works with pulseaudio or not)
>
>
>> The DTS-HD part is not merged yet (patch is in ffmpeg-devel@), but the
>> TrueHD and E-AC-3 support is already there in ffmpeg trunk.
>>
>> The ffmpeg commandline to use is:
>> ffmpeg -i input.file -f spdif output.spdif
>>
>> For DTS-HD files, to get full passthrough (i.e. not only core), a
>> -dtshd_rate parameter is needed, which sets the output IEC958 rate.
>> ffmpeg -i input.file -f spdif -dtshd_rate 192000 output.spdif
>> ffmpeg -i input.file -f spdif -dtshd_rate 768000 output.spdif
>> 192000Hz is enough for streams that have a bitrate below 6.144Mbps, which
>> means all DTS-HD High Resolution Audio files and even many of the DTS-HD
>> Master Audio (the latter are lossless VBR).
>>
>> To play the spdif files back, I use
>> aplay -D hdmi:CARD=$CARDNAME,DEV=$DEVICENUM,AES0=0x06 -c $CHANCOUNT -r
>> $RATE file.spdif
>>
>> - replacing $CARDNAME with the card name
>> - replacing $DEVICENUM with 0..3 depending on card and hdmi port (for
>> non-zero DEVICENUM you'll need a patch from alsa git:
>> http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=e6d5dcf1f625984605d362338d71162de45a6c60
>> )
>> - set $CHANCOUNT and $RATE as per below
>> ?- rate 192000 and channels 2 for IEC958 rate 192 kHz (for e.g. 48 kHz
>> E-AC-3, and DTS-HD when the IEC958 rate was set to 192000 in ffmpeg)
>> ?- rate 192000 and channels 8 for IEC958 rate 768 kHz (for most TrueHD
>> files, and for DTS-HD when the rate was set to 768000)
>> - note that having the 0x02 bit (non-pcm) set in AES0 is mandatory when
>> $CHANCOUNT is larger than 2, as ALSA uses it to determine whether to use
>> HBR or not. The additional 0x04 (non-copyright) I use above is not
>> mandatory, but is the alsa default so I kept it.
>
>
> --
> Anssi Hannula
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at mail.0pointer.de
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>

Would anyone know where I could get a hold of some DTS-HD samples in
192Khz and 384kHz for testing?



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux