Audio I/O - options for analogue in and digital out?

Hello! Quick question - I’m pondering a Zynthian build (partly holding off for full Pi 4 - plus also unsure about delivery of kits in Covid?) but had one question that’s partly, but not fully answered anywhere I can see…

The kit looks perfect with audio in and out - I’m liking the idea of using Zynthian for effects - but my main audio interface has just two analogue ins, and then an optical in for S/PDIF or ADAT.

Can you use an S/PDIF output /and/ the HiFiBerry DAC+ADC Pro, or is there somewhere on the HiFiBerry board to tap S/PDIF output? Ideally optical - MiniTOSLink on a combined headphone or line jack would be the dream I suppose, but even just a flying lead out with an external RCA to optical box would suffice!

My first thought is maybe something could be added to the I2S interface on the DAC+ADC Pro itself?

(And on the same lines - ADAT? 8 output channels, two per stereo engine?)

Hi Richard!
Welcome onboard! :wink:

We are delivering normally, with some extra delay, but not too much :wink:

Regarding the audio interface, mixing 2 audio interfaces is not an easy way if you want a good RealTime performance. DAC & ADC have to work with the same clock, and this is difficult to get when you are using 2 different audio devices. Things get worst if your devices works on different low-level interfaces (I2S & USB).
Finally, zynthian configuration system doesn’t support mixed-devices configurations, so you should config everything by hand. Not a sweet cake …

I would recommend to use a single device, preferably I2S, as USB adds extra latency.

Regards,

That’s why I was wondering about the I2S on the HiFiBerry DAC+ADC - is it not the same digital signal that’s going to the DAC and then the analogue outputs? I don’t actually know how the HiFiBerry is talking to the Pi - I’d assumed it was using I2S rather than USB.

The aim is to connect the Zynthian - as a self-contained synthesizer and effects unit - to the digital input of my DAW/iMac’s Audient ID14.

But from what you’re saying, it sounds like what I’m thinking might be easier with the Digi+ I/O and then outboard analogue to optical conversion to feed a synth into Zynthian to use effects… Gets expensive then, though (and clunky).

It’s probably the biggest limitation we have.
Realistically, at the moment we are limited to one audio I/o device, and thus are at the whim of the card manufacturers. We were all a bit sniff about USB but the situation does seem to have improved :-D. ( In truth we still are :- D, latency)
So you are restricted to the likes of hifiberry and audio injector, and they never seem to produce ‘quite’ the right card !! A hifiberry amp with audio input would be a very interesting device in my world but low latency digital PA’s ain’t a big thing yet!, and that’s before you get into the world of different I/O support and connectors. ( phono’s and 3.5mm jacks, one thing that the TV & Audio factions of the BBC agree on, just ain’t up to it). But often you want different connectors. Balanced cannons on out put with 1/4" jack & mic cannon on input would make a terrific stage box zynthian for example but you end up building lots of analogue).

The implementation of multiple audio devices on a system is probably where it ultimately lies but as @jofemodo says the are limitations. It’s important to decide precisely what you are trying to achieve and that involves a whole combination of Interface, encoder, I/o devices and connectors, and also consideration of power supply.
Quite where one wants one’s audio to emerge and where one controls the device don’t necessarily need to be in the same place for instance. In such a world one can put carefully considered audio components, next to mixers and such like and that address some of the concerns.

Yes, but there is no physical interface for this digital signal. I2S is the internal bus used for moving the audio stream between the Pi and the HB. HifiBerry DAC+ADC Pro has no S/PDIF interface you can plug on. Only the analog audio output is available.

If you want digital output, your best option could be to use JackAudio network capabilities to send the audio stream to your DAW. If you use a point to point network connection or a high speed dedicated network, the added latency should be really small.

In fact, you could use the Zynthian as a pure digital audio processing unit by sending the audio stream from the DAW, processing on the zynthian, and sending back to the DAW. It could be do with 1 frame latency, that is quite good for most of use-cases.

I’ve done some tests with this and it works, but it’s not currently supported by the standard configuration system. You should config everything by hand.

Regards,

That’s an interesting use in itself, I’ve yet to prod JackAudio stuff (beyond failing to get Aeolus to work on an old Debian 10 + Athlon A8 laptop I was messing with).

When I look at the specs, it looks like there are five pins on the DAC+ ADC Pro at P4:

1 GND
2 Master clock
(22.5792MHz for 44.1, 88.2, 176.4 kHz sample rates, 24.576MHz for 48,96,192kHz sample rates)
3 Bit clock (frequency = 32/64* sample rate)
4 Frame clock (frequency = sample rate)
5 Data

Assuming they’re the same pinout as the DAC+, anyway.

Which makes me think this:

Would connect to that bus - but would it need anything beyond the power and signals?

I don’t want to choose between - I’m happy for the analogue outputs to sit there being outputs, and literally want to mirror the output on an optical port. I’m certainly not looking to have software selectable or appear as extra outs - rather, to avoid doing the obvious ‘cable spaghetti’ answer of using an external audio ADC from analogue outs to S/PDIF, thus converting twice!

Because I don’t have a Zynthian yet, I don’t know how you’d set the sample rate, but figure it would be easy enough to say 24 or 16 bit, 44.1 or 48KHz, and then that’s what the HiFiBerry is decoding anyway?

The biggest issue I’d have with the software side is Cubase likes one audio interface - so I’m not sure how happily it would play with audio over network from a Zynthian while still using the Audient for analogue I/O.

Aside from the build for XLR ins/outs - I’m used to TRS balanced or TS unbalanced 1/4" jacks on /everything/ - I think the HiFiBerry DAC+ADC Pro is pretty much perfect, bar the lack of S/PDIF out. I think I’d want to add a switch for dynamic mic jumbers if using it as a vocoder or similar, but getting instrument to line level is at least relatively easy.

So if that little and inexpensive board would fix it for an optical digital connection to my DAW’s audio interface, I’m a happy bunny - if not, I’m now pondering pulling an older interface out of retirement.

Being sniffy about USB is hard in a world where Firewire’s unstable (my old interface) and Thunderbolt is expensive - or I have to get a newer USB-C Mac and interfaces, even more expensive!

It is certainly possible to send I2S to multiple DACs. You can not however receive from multiple ADCs on only one I2S bus. Multiple I2S busses can share clock lines though, although RBPi only have one.

Note that if you get it to work, you will be the first one building a zynthian like that, so you would win extra reputation points here :wink:

Good luck!

I think, not here only :grinning:
Between i2s protocol, hardware driver, device tree overlay, Alsa layer, the lack of documetation and so on it’s a nice mess

That seems logical - I’m not interested in implementing a digital input; not many instruments you’d want to run through the effects are going to use it, so the only time I’d be curious about digital in would be something way beyond my skills - ADAT in, ADAT out, no analogue at all to make a parallel effects processor of some sort.

If the I2S can just be tapped and go to different DACs in parallel effectively invisibly… it does sound like it’d work. For the sake of a £10 board - when I can afford to do a Zynthian build, I’ll definitely try adding the optical out to the HiFiBerry! In the meantime I’ve asked Modul 9 about the impact it might have on the board - or if there’s S/PDIF that can be tapped off the DAC+ADC Pro, thus saving the whole shenanigans!

Of course, I’m making the assumption that the I2S to S/PDIF board is dumb - and just takes the signals fed to it and converts the data, like a serial printer spewing out whatever you gave it. If it needs drivers to initialise and so forth, I don’t have a whelks chance in a supernova of making it work :wink:

Anyone try using the extra SPI busses the RPI4 has? I know some have had SPI 3-6 working at the same time for other applications…