I'm new to Pi, new to HifiBerry and somewhat new to audio DSP. I would like some help getting started with that project.
Here is what I would like to achieve:
- Check input from coaxial or optical.
- If DTS transcode to Dolby and output to optical.
- If not DTS just pass through to optical output.
I'm assuming I should be able to find guides on how to setup Pi to use Digi+ I/O, though pointers are welcome.
Once that Pi is up and running I'll need to access data from input ports. Any docs there for software developers? Looking around the forum it looks like I can either use a driver or access the raw data somehow. I found this project from there.
The I would need a software library capable from doing the transcoding of DTS packet to Dolby packet, directly or indirectly. Does FFmpeg do that?
Last I would need to feed the transcoded Dolby packet to our optical output.
Obviously I'm hoping to achieve all that with minimal latency. Looks like the Pi 3B+ CPU packs more than enough punch for that. I'm hoping the I/O board will enable it.
It sure looks like FFmpeg could do it:
- Dolby AC3 encoding: https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/ac3enc.h
- DTS Coherent Acoustics decoder: https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/dcadec.h
- SPDIF encoder: https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/spdifenc.c
- SPDIF decoder: https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/spdifdec.c