• Welcome to ASR. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

8ch hifiberry hat dac for RPI5

So basically an ASRC that stays SPDIF all the way into the RPi5.
RPi5 has no SPDIF input, so either I2S or USB.

I do not see any reason why the I2S master -> RPi I2S slave should not work, it's a standard setup. Of course the I2S DT overlay must be configured to switch I2S from master to slave. DAC8x is already slave.
 
Thanks.

Another question, I'm new to a lot of the "measurement" stuff, is there a way to expose all eight DAC8X channels to a Windows PC?

So perhaps can the USB UAC2 gadget expose them or does it max out at 2 channels?

I'm asking because from the limited info I can find online it looks like XO stuff in Audiolense XO needs access to the individual channels.

Or do I need 8 channels of USB DAC for testing, if so, thinking out loud, could I get four cheap 2 channel USB DACs, maybe PCM5102A DAC chips same as the DAC8X, it feels like this could cause "timing" issues though, could I use a 2 channel DAC and manually change cables when testing say the LR tweeters when testing stereo HF or the R mid to R tweeter when testing XO?

I do have an old MiniDSP U-DAC8 8-channel, not sure if it would be a mortal sin to use that for measurement?

Or am I barking up the wrong tree, I asked on the AudioLense XO forum but no reply yet?
 
Another question, I'm new to a lot of the "measurement" stuff, is there a way to expose all eight DAC8X channels to a Windows PC?

So perhaps can the USB UAC2 gadget expose them or does it max out at 2 channels?
The gadget is limited to 27 channels, as imposed by UAC2 channel position bitmap https://github.com/torvalds/linux/b.../drivers/usb/gadget/function/f_uac2.c#L21-L22 . Of course another limit is maximum isochronous packet size for USB2 highspeed (1024 bytes per 125us microframe minus a little bit for async control range).
Or do I need 8 channels of USB DAC for testing, if so, thinking out loud, could I get four cheap 2 channel USB DACs, maybe PCM5102A DAC chips same as the DAC8X, it feels like this could cause "timing" issues though, could I use a 2 channel DAC and manually change cables when testing say the LR tweeters when testing stereo HF or the R mid to R tweeter when testing XO?
DAC8X is just 4 stereo dac chips connected to 4 I2S data lines. You can do the same with 4 stereo DAC boards, of course doing the wiring separately.
I do have an old MiniDSP U-DAC8 8-channel, not sure if it would be a mortal sin to use that for measurement?
IMO it should be perfectly fine for measuring speakers/room response etc. Any 8ch 16bit USB soundcard for 10 bucks would do. Unless you want to measure low-distortion/low noise which does not involve acoustic transducers.
 
Last edited:
Thanks!
The gadget is limited to 27 channels
maximum isochronous packet size for USB2

When I set the following:

sudo modprobe g_audio c_chmask=3 c_srate=96000 c_ssize=4 p_chmask=3 p_srate=96000 p_ssize=4

Can I just change the above for 8 channel, if stereo is 3, I can't make any sense of what 8 is going to be?

Would I need to lower the srate to keep my 8 channels within the packet size limit then?
 
sudo modprobe g_audio c_chmask=3 c_srate=96000 c_ssize=4 p_chmask=3 p_srate=96000 p_ssize=4

Can I just change the above for 8 channel, if stereo is 3, I can't make any sense of what 8 is going to be?
It's a channel bit mask ( see https://github.com/torvalds/linux/b...ation/ABI/testing/configfs-usb-gadget-uac2#L8 ), i.e. every bit corresponds to one channel. So 8 channels = 8 bits would be 255.
Would I need to lower the srate to keep my 8 channels within the packet size limit then?
It's simple - just keep bytes per 125us below let's say 1000. That allows maximum byte rate of 1000 bytes x 8k packets per second (125us = one packet) = 8MB/s which corresponds to 250kHz @ 8ch/4 bytes.

Edit: fixed the calculation
 
Last edited:
Hi, this is my first ASR post. I’ve just bought a Raspberry Pi 5 and Hifiberry DAC8X and I am using CamillaDSP. I was going to use a Wiim Ultra using the usb out to the Pi in usb gadget mode and the DAC8X as the output. This works well for stereo sources but I’m having problems when I use my Apple TV 4K into the Wiim Ultra via HDMI Arc, neither the Wiim nor ATV downmix the LFE (.1 channel) when downmixing 7.1 LPCM to stereo.

Does anyone know if I can use this hdmi to i2s extractor that @mdsimon2 mentions in the Pi multichannel thread to output lpcm 7.1 from an Apple TV into the Pi 5 with the DAC8X as the output? In the multichannel thread I read that some people were using spdif to sync the clock when using a multichannel dac. Is this necessary with the DAC8X?
 
Hi, this is my first ASR post. I’ve just bought a Raspberry Pi 5 and Hifiberry DAC8X and I am using CamillaDSP. I was going to use a Wiim Ultra using the usb out to the Pi in usb gadget mode and the DAC8X as the output. This works well for stereo sources but I’m having problems when I use my Apple TV 4K into the Wiim Ultra via HDMI Arc, neither the Wiim nor ATV downmix the LFE (.1 channel) when downmixing 7.1 LPCM to stereo.

Does anyone know if I can use this hdmi to i2s extractor that @mdsimon2 mentions in the Pi multichannel thread to output lpcm 7.1 from an Apple TV into the Pi 5 with the DAC8X as the output? In the multichannel thread I read that some people were using spdif to sync the clock when using a multichannel dac. Is this necessary with the DAC8X?

Using the HDMI to I2S extractor should allow you to implement your own downmix in CamillaDSP from the AppleTV, of course with the caveat that I ran in to some noise issues with it. If doing this again I'd build a dedicated 40 pin female header for the RPi5/DAC8X and solder directly to the HDMI to I2S board.

There may be some issues with clocking as discussed in this post -> https://www.audiosciencereview.com/...hifiberry-hat-dac-for-rpi5.53672/post-2095498, I am not sure how the RPi5 will work when using I2S inputs at the same time, @phofman thinks it will be OK. I'd be happy to experiment with this and report back as I am also interested in the results.

Michael
 
Using the HDMI to I2S extractor should allow you to implement your own downmix in CamillaDSP from the AppleTV, of course with the caveat that I ran in to some noise issues with it. If doing this again I'd build a dedicated 40 pin female header for the RPi5/DAC8X and solder directly to the HDMI to I2S board.

There may be some issues with clocking as discussed in this post -> https://www.audiosciencereview.com/...hifiberry-hat-dac-for-rpi5.53672/post-2095498, I am not sure how the RPi5 will work when using I2S inputs at the same time, @phofman thinks it will be OK. I'd be happy to experiment with this and report back as I am also interested in the results.

Michael
Thank you @mdsimon2.

I’ve just ordered this Pi 5 HDMI capture device and I2S add on board. It’s only 1080p but I have a HDFury device that can downscale and output hdmi audio. I’m going to test both and observe what the latency is and then investigate if the I2S add on board works on it own.

The WiiM Ultra Q&A states that they are investigating multichannel output from hdmi to usb. If that happens……..I’ll try that as well.
 
  • Like
Reactions: MCH
Actually this HDMI capture device seems to be quite interersting for audio capture. The problem with most HDMI-I2S bridges is that they do not report any incoming samplerate via some side channel, eventhough the HDMI receiver chip must have the information and IMO in most cases is able to report the rate via I2C. The bridges output only I2S which does not need any linux drivers, unlike the I2C communication.

But this capture device sends video over the CSI2 interface which also includes I2C slave lines of the TC358743 chip. The TC358743 V4L driver (loaded by dtoverlay=tc358743) does read the audio rate register, and the v4l2-ctl utility seems to report the current rate - see output of the command v4l2-ctl --list-ctrls in https://forums.raspberrypi.com/viewtopic.php?t=258742#p1578820 .

The registers datasheet (of IMO similar TC358749) is https://www.t-firefly.com/download/Firefly-RK3288-Reload/hardware/(U18)TC358749XBG_V074.pdf

IIUC the datasheet the chip has an interrupt pin output which is triggered (also) when the samplerate changes. This could be used by RPi GPIO interrupt to avoid constant reading the samplerate register via I2C with the v4l2-ctl utility. I do not think RPi CSI2 interface contains any GPIO input which could be used for this https://www.arducam.com/raspberry-pi-camera/connector-type-pinout/ . But the I2S addon board routing the chip I2S lines to the RPi 40pin GPIO connector could have provided that. But we can only guess whether the HDMI card authors have considered what is needed for a working audio capture at all... especially if it would require to write and maintain a corresponding driver/user-space utility.... no chances, I know...
 
Excuse me asking a newbie question, but could I:
PC.png
 
Hi guys, i'm currently using Raspi5 with the DAC8x, in gadget mode connected via usb to coreelec.
I'm amazed by the potential of this litle combo device, i can apply filters and mix channels, too bad that i couldn't get my hands on a DM7 at the time.
to get this done i followed the amazing guide written by mdsimon. thanks!
I'm writing because i' am having dificulties extracting 8 channles (7.1) from the source, it appears that i can only extract 6 channels (which is already amazing), but on 7.1 sources the last 2 channels (sR and sL) don't show any movement on camilladsp gui.
on usb_g_audio conf i'm using "c_srate=44100,48000,96000 c_ssize=4 c_chmask=255 p_chmask=0"
Am i missing something? or doing anything wrong?
Thanks guys.
 
If you have 8 input channels in CamillaDSP, I have to think it is something related to your source. Either your source files are only 5.1 or there is something you need to configure to output 7.1

On the AppleTV 4K I found pretty much anything from a streaming service was only 5.1, although I was able to successfully play a 7.1 test track via VLC so I knew the capability was there. Links below to my AppleTV experience.


Michael
 
If you have 8 input channels in CamillaDSP, I have to think it is something related to your source. Either your source files are only 5.1 or there is something you need to configure to output 7.1

On the AppleTV 4K I found pretty much anything from a streaming service was only 5.1, although I was able to successfully play a 7.1 test track via VLC so I knew the capability was there. Links below to my AppleTV experience.


Michael
thanks for your quick reply Michael, i'm playing the files directly from my server, i played them with mpc-hc too on windows and got the same result on files with a 7.1 mix, only 6 channels into the pi. This is most probably on the raspi5 side:
onlysix.jpg
 
Hmm...I wonder if it is a difference between 7.1 home theater and 7.1 wide -> https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/channel-mask?

I have no idea what the gadget would present to your USB host. Paging the @phofman as he is the gadget guru.

It has been a bit since I played around with multichannel gadget but I'll give it a go this weekend with a Mac and PC as USB host and report back.

Michael
Sorry for the newbie question Michael but can you kindly tell me whats the c_chmask for 10 and 12 channels capture on usb_g_audio.conf?
Thanks for you effort!
 
Back
Top Bottom