My first thread, please be gentle!
I own an Involve Audio Surround Master v3 that does SQ/QS decoding, as well as a wonderful job on some stereo content of upconverting to 4.0 or 5.1. The only trouble is that the SMv3 only has analog output, and my AVR only has digital inputs (HDMI, S/PDIF).
Somebody mentioned on the QQ forums in early March that HiFiBerry had started selling an 8-channel A to D hat (“ADC8X”) that might do the trick. So I took the plunge, bought an RPI5 kit, plus the DAC8X and ADC8X hats from HiFiBerry. The ADC8X requires the DAC8X, but as with their other hats the price is not bad.
Success! I loaded up the headless version of Raspbian, added the ADC8X overlay to the configuration file, and found both the ADC8X audio input and HDMI-1 audio output ALSA cards with “arecord -l” and “aplay -l” respectively. After connecting the pieces together (SMv3 to ADC8X, RPI5 to my AVR via HDMI-1) I tried the simplest approach:
This (192k/24) uses up about 7% of the cpu (according to “top”), with 48k/16 using about 2%. I could have used 6-channel mode (“-c 6”) but with 8-channels I can wire the two rear channels Lr and Rr to the 7th and 8th inputs, and my AVR will then play those channels on my rear speakers instead of Ls and Rs (as the quadrophonic gods intended!). I haven’t had trouble with underruns or overruns, but I may just be lucky with well-matched ADC and HDMI clocks.
ALSA also provides a simpler command, “alsaloop”, for this purpose. I’ll probably modify the code to add some logic to prevent underruns and overruns. I decided to stick with the lowest level in Linux (ALSA) rather than go up the audio stack into PulseAudio or PipeWire (the KISS principle).
I also have an old Korg D888 8-channel analog recorder that is nicely replaced by just recording with Audacity from the ADC8X on the RPI5.
If anyone is looking for an inexpensive 8-channel ADC, or for an analog to HDMI converter, this seems to fit the bill. The DAC8X makes a nice 8-channel sound card as well.
I own an Involve Audio Surround Master v3 that does SQ/QS decoding, as well as a wonderful job on some stereo content of upconverting to 4.0 or 5.1. The only trouble is that the SMv3 only has analog output, and my AVR only has digital inputs (HDMI, S/PDIF).
Somebody mentioned on the QQ forums in early March that HiFiBerry had started selling an 8-channel A to D hat (“ADC8X”) that might do the trick. So I took the plunge, bought an RPI5 kit, plus the DAC8X and ADC8X hats from HiFiBerry. The ADC8X requires the DAC8X, but as with their other hats the price is not bad.
Success! I loaded up the headless version of Raspbian, added the ADC8X overlay to the configuration file, and found both the ADC8X audio input and HDMI-1 audio output ALSA cards with “arecord -l” and “aplay -l” respectively. After connecting the pieces together (SMv3 to ADC8X, RPI5 to my AVR via HDMI-1) I tried the simplest approach:
arecord -Dhw:sndrpihifiberry,0 -c 8 -r 192000 -f S24_LE | aplay -Dhdmi:vc4hdmi
This (192k/24) uses up about 7% of the cpu (according to “top”), with 48k/16 using about 2%. I could have used 6-channel mode (“-c 6”) but with 8-channels I can wire the two rear channels Lr and Rr to the 7th and 8th inputs, and my AVR will then play those channels on my rear speakers instead of Ls and Rs (as the quadrophonic gods intended!). I haven’t had trouble with underruns or overruns, but I may just be lucky with well-matched ADC and HDMI clocks.
ALSA also provides a simpler command, “alsaloop”, for this purpose. I’ll probably modify the code to add some logic to prevent underruns and overruns. I decided to stick with the lowest level in Linux (ALSA) rather than go up the audio stack into PulseAudio or PipeWire (the KISS principle).
I also have an old Korg D888 8-channel analog recorder that is nicely replaced by just recording with Audacity from the ADC8X on the RPI5.
If anyone is looking for an inexpensive 8-channel ADC, or for an analog to HDMI converter, this seems to fit the bill. The DAC8X makes a nice 8-channel sound card as well.
Last edited:
That's interesting, does it indeed? IIUC it's a standard I2S-slave ADC with no I2C control, any I2S-master config for I2S input for RPi5 should do. Hifiberry has their own DTS https://github.com/raspberrypi/linu...boot/dts/overlays/hifiberry-adc8x-overlay.dtsThe ADC8X requires the DAC8X
It’s a HiFiBerry hardware implementation “feature.” When asked to confirm whether the ADC8X hat requires the DAC8X, their response was
Indeed, the ADC8X overlay is required, and the DAC8X overlay is not (for the ADC8X to function in the Raspbian OS). But evidently electrically the DAC8X hat is necessary. The DAC8X extends the GPIO connector, but the extension is offset, such the ADC8X would not align normally with the RPI5 underneath (without the DAC8X in place).
Yes, the ADC8x can't be used without the DAC8x. We can create an ADC-only card for OEMs, but this require a minimum quantity of 50 units.
Indeed, the ADC8X overlay is required, and the DAC8X overlay is not (for the ADC8X to function in the Raspbian OS). But evidently electrically the DAC8X hat is necessary. The DAC8X extends the GPIO connector, but the extension is offset, such the ADC8X would not align normally with the RPI5 underneath (without the DAC8X in place).
It would be nice to find a schematic. If the layout is correct it might be possible to desolder the existing Berg (?) header and install one in the correct location (the through holes are there).
I just downloaded and read through the relevant driver (rpi-simple-soundcard.c) in the kernel sources, though, and the adc8x functionality is only enabled within the dac8x init() code. So even with suitable wiring some kernel driver work would be needed in order to use an ADC8X without a DAC8X. assuming that I have read the code correctly.
Also, after upgrading to the latest kernel now only the DAC8X overlay is needed for the ADC8X to function. With the older kernel from the current Raspbian Lite download I needed to add both overlays.
I just downloaded and read through the relevant driver (rpi-simple-soundcard.c) in the kernel sources, though, and the adc8x functionality is only enabled within the dac8x init() code. So even with suitable wiring some kernel driver work would be needed in order to use an ADC8X without a DAC8X. assuming that I have read the code correctly.
Also, after upgrading to the latest kernel now only the DAC8X overlay is needed for the ADC8X to function. With the older kernel from the current Raspbian Lite download I needed to add both overlays.
Last edited:
The two hifiberry hats use plain 8ch I2S I/O, no extra functionality in the driver. If you make I2S input work (in any way), the ADC will work.
The only "hack" Hifiberry added to the stock rpi-soundcard code was their autodetection of the ADC - https://github.com/raspberrypi/linu...ound/soc/bcm/rpi-simple-soundcard.c#L374-L398 . That means if the hasadc pin (defined in https://github.com/raspberrypi/linu.../dts/overlays/hifiberry-dac8x-overlay.dts#L51 - gpio 5) is low (i.e. the ADC hat is missing), the driver will disable capture https://github.com/raspberrypi/linu...soc/bcm/rpi-simple-soundcard.c#L394C2-L394C56 . If high (the ADC hat puts that pin to high), it configures the capture stream and renames the card and streams. IIUC the values in https://github.com/raspberrypi/linu...ound/soc/bcm/rpi-simple-soundcard.c#L386-L389 are defaults anyway (maybe higher samplerate, not important), IMO that code is not needed for plain functionality.
Then they added a separate overlay for adc8x only, which configures only the capture side - https://gitlab.james.tl/nest/forks/linux/-/commit/4d2eaa194d77588fa42567ba174c3c14c5798027 + https://github.com/raspberrypi/linu...boot/dts/overlays/hifiberry-adc8x-overlay.dts . IMO all you need to do is to load the hifiberry-adc8x-overlay.dts overlay (which does nothing special for hifiberry, just configures correctly the 8ch input of I2S interface (enables the used pins, master mode, 64bit per frame), and sets some user-facing strings to read "hifiberry..."), connect the ADC hat to RPi (power + GND + the I2S lines). Finding the pins should be quite simple - just follow the datasheet of the PCM1861 ADC https://www.audiosciencereview.com/forum/index.php?threads/rpi-camilladsp-tutorial.29656/page-121
The only "hack" Hifiberry added to the stock rpi-soundcard code was their autodetection of the ADC - https://github.com/raspberrypi/linu...ound/soc/bcm/rpi-simple-soundcard.c#L374-L398 . That means if the hasadc pin (defined in https://github.com/raspberrypi/linu.../dts/overlays/hifiberry-dac8x-overlay.dts#L51 - gpio 5) is low (i.e. the ADC hat is missing), the driver will disable capture https://github.com/raspberrypi/linu...soc/bcm/rpi-simple-soundcard.c#L394C2-L394C56 . If high (the ADC hat puts that pin to high), it configures the capture stream and renames the card and streams. IIUC the values in https://github.com/raspberrypi/linu...ound/soc/bcm/rpi-simple-soundcard.c#L386-L389 are defaults anyway (maybe higher samplerate, not important), IMO that code is not needed for plain functionality.
Then they added a separate overlay for adc8x only, which configures only the capture side - https://gitlab.james.tl/nest/forks/linux/-/commit/4d2eaa194d77588fa42567ba174c3c14c5798027 + https://github.com/raspberrypi/linu...boot/dts/overlays/hifiberry-adc8x-overlay.dts . IMO all you need to do is to load the hifiberry-adc8x-overlay.dts overlay (which does nothing special for hifiberry, just configures correctly the 8ch input of I2S interface (enables the used pins, master mode, 64bit per frame), and sets some user-facing strings to read "hifiberry..."), connect the ADC hat to RPi (power + GND + the I2S lines). Finding the pins should be quite simple - just follow the datasheet of the PCM1861 ADC https://www.audiosciencereview.com/forum/index.php?threads/rpi-camilladsp-tutorial.29656/page-121
Last edited: