Digital Audio Input RP+HifiBerry DAC 2HD

Hi All,

I use RP3+picoreplayer+HIFiBerry DAC 2HD.

Is there any idea how to:
1. Add chromecast 3 (HDMI output) as a sound source to my system
2. And/or add toslink audio input to my DAC ?

I know thtat I can buy DAC which has implemented toslink input for external sources but stiil doubt how to manage sources switching in my picoreplayer. I found option which allows to switch on audio input but as I suppose it requires restart every time I want to change the source, in LMS panel there is no option to change it in simple way. Ecerything is very simple when I want to manage outputs but not inputs.

Darek
 
SPDIF receiver output clock is slaved to the SPDIF transmitter. Unless your output (DAC) is clocked by the same clock (which can be the case of an integrated DAC + SPDIF input combo), the capture-playback chain has to adaptively resample between the independent input and output clocks. Some softwares do that (CamillaDSP, pulseaudio, jackd use proper resampling, gstreamer uses dumb dropping/interpolating samples). But most softwares do not implement this function. I doubt picoreplayer does adaptive resampling, but you can ask its author here.
 
IIUC 403 Forbidden GitHub - marcoc1712/C-3PO: Squeezebox server plugin that handles server side file type conversion and resampling. Replace custom-convert.conf. the C3PO plugin "just" offers fine-tuned configuration of resampling from various input formats. Adaptive resampling requires measuring momentary input and output samplerates and continuously adjusting the ongoing samplerate conversion accordingly. Also capturing data from a soundcard (or pipe) is different than reading from a file which has no realtime timing.