ES9038Q2M Board

I'm pretty sure you are on here solely to wind people up

x2

The frustrating thing to me is I pretty much agree with @Evenharmonics that speakers / room are the most important (and very much disagree with the FUD often presented by others regarding DAC sound quality issues) but I find the way he constantly barges in to these threads extremely off-putting.

Michael
 
  • Like
Reactions: InspectorGadget
freshly installed volumio 2.513, unzip and copy ' ko ' ( have 4 files now ) to /boot.

ssh to volumio 2.513

sudo cp -r /boot/ko/hifibunny-codec.ko /lib/modules/4.14.71-v7+/kernel/sound/soc/codecs/hifibunny-codec.ko
sudo cp -r /boot/ko/hifibunny-q2m.ko /lib/modules/4.14.71-v7+/kernel/sound/soc/bcm/hifibunny-q2m.ko
sudo cp -r /boot/ko/hifibunny-q2m.dtbo /boot/overlays/hifibunny-q2m.dtbo

sudo depmod -a

sudo rm -r /volumio/app/plugins/system_controller/i2s_dacs/dacs.json
sudo cp -r /boot/ko/dacs.json /volumio/app/plugins/system_controller/i2s_dacs/dacs.json
sudo nano /volumio/app/plugins/system_controller/i2s_dacs/dacs.json

sudo reboot

View attachment 722155

install this volumio plugin

https://github.com/ChrisPanda/volum...0/volumio-es9018k2m-plugin-0.1.0-sys-2.4x.zip

setting 12s
View attachment 722156

volume setting
View attachment 722158

resampling
View attachment 722160

dsd setting
View attachment 722161

plugin volume setting
View attachment 722162

digital filter dosn't work, don't touch it.
View attachment 722163

both pcm and dsd allow to lowest. great sound quality, modification on the dac boad is optional.

View attachment 722170 View attachment 722171 View attachment 722172

done

cheers
freshly installed volumio 2.513, unzip and copy ' ko ' ( have 4 files now ) to /boot.

ssh to volumio 2.513

sudo cp -r /boot/ko/hifibunny-codec.ko /lib/modules/4.14.71-v7+/kernel/sound/soc/codecs/hifibunny-codec.ko
sudo cp -r /boot/ko/hifibunny-q2m.ko /lib/modules/4.14.71-v7+/kernel/sound/soc/bcm/hifibunny-q2m.ko
sudo cp -r /boot/ko/hifibunny-q2m.dtbo /boot/overlays/hifibunny-q2m.dtbo

sudo depmod -a

sudo rm -r /volumio/app/plugins/system_controller/i2s_dacs/dacs.json
sudo cp -r /boot/ko/dacs.json /volumio/app/plugins/system_controller/i2s_dacs/dacs.json
sudo nano /volumio/app/plugins/system_controller/i2s_dacs/dacs.json

sudo reboot

View attachment 722155

install this volumio plugin

https://github.com/ChrisPanda/volum...0/volumio-es9018k2m-plugin-0.1.0-sys-2.4x.zip

setting 12s
View attachment 722156

volume setting
View attachment 722158

resampling
View attachment 722160

dsd setting
View attachment 722161

plugin volume setting
View attachment 722162

digital filter dosn't work, don't touch it.
View attachment 722163

both pcm and dsd allow to lowest. great sound quality, modification on the dac boad is optional.

View attachment 722170 View attachment 722171 View attachment 722172

done

cheers
i install same as your instructions on volumio version 2.197 and 2.457 it doesn't work alsa not found
 
In master mode the dac chip generates the I2S clocks. For that to work the USB board (or the RPi board) has to send a request to the dac MCU to set the dac clocks as necessary for the file that is to be played. Something like an I2C communication channel to the dac MCU using a mutually understood protocol is necessary to have in the software driver for the specific dac.

Someone could probably figure it out if there was a master mode dac and a working driver available. Then an I2C sniffer could be used to observe the communication protocol. Or maybe if someone deeply understands the linux audio engine, they could locate the source code for the communication. Then the MCU for a different dac wanting to use the same driver could be programmed accordingly.
 
In master mode the dac chip generates the I2S clocks. For that to work the USB board (or the RPi board) has to send a request to the dac MCU to set the dac clocks as necessary for the file that is to be played. Something like an I2C communication channel to the dac MCU using a mutually understood protocol is necessary to have in the software driver for the specific dac.

Someone could probably figure it out if there was a master mode dac and a working driver available. Then an I2C sniffer could be used to observe the communication protocol. Or maybe if someone deeply understands the linux audio engine, they could locate the source code for the communication. Then the MCU for a different dac wanting to use the same driver could be programmed accordingly.
hifibunny driver also runs in master mode with one clock, i think it can also run with 2 clocks with a little tweaking
 
An ES9038Q2M can generate I2S clocks as needed from one or two master clocks. Its a matter of register programming. Either way it needs to know what I2S clocking will be needed from the I2S data source device, say, from an RPi. The RPi doesn't have to know how many clocks, or what master clock frequencies the dac uses. Its up to the dac MCU to program the dac chip registers as needed, is all.

The above assumes the dac has its own MCU of course. If it doesn't have an MCU then the RPi might have to program the dac chip registers directly over I2C bus. In that case the driver might need some code and or a lookup table of register settings to control the dac chip. In that case the driver would have to know about the dac master clock or clocks. If there are two clocks the RPi would also need a way to switch between them. Maybe another I2C interface needed on the dac board to control clock switching.
 
Last edited:
An ES9038Q2M can generate I2S clocks as needed from one or two master clocks. Its a matter of register programming. Either way it needs to know what I2S clocking will be needed from the I2S data source device, say, from an RPi. The RPi doesn't have to know how many clocks, or what master clock frequencies the dac uses. Its up to the dac MCU to program the dac chip registers as needed, is all.

The above assumes the dac has its own MCU of course. If it doesn't have an MCU then the RPi might have to program the dac chip registers directly over I2C bus. In that case the driver might need some code and or a lookup table of register settings to control the dac chip. In that case the driver would have to know about the dac master clock or clocks. If there are two clocks the RPi would also need a way to switch between them. Maybe another I2C interface needed on the dac board to control clock switching.
according to my analysis on sabre32 board es9018q2c they use i2s and i2c of raspberry pi connect to es9018q2c, now pi will be in slave mode dac will be in master mode, two clocks are switched back and forth by the controller of GPIO1 on es9018q2c chip, how it works is similar to BOSS DAC and hifiberry pro Dac
sabre_block.png
Capture.PNG
 
Looking through my notes, some possible links of interest:
https://github.com/VinnyLorrin/ES9038Q2M-Linux_Driver
https://github.com/raspberrypi/linu...269113d#diff-f3e14728a0bad8e0d10275a81ad1a9d6
https://alsa.opensrc.org/WritingAnAlsaDriver
https://github.com/raspberrypi/linux/issues/2547
https://alsa.opensrc.org/

Other than the above, you may find more linux driver guys over in the 'PC Based' sub-forum. I'm sure some of them would know a great deal about Alsa drivers and or Volumio.
is the hifibunny driver compatible with volumio 2.917 or later? i installed according to eslei instructions but it doesn't work
 
Don't know. There is a volumio thread in the PC Based sub-forum. They would probably know.
Other than that I would suggest getting a $10 logic analyzer. They work fine for I2C bus traffic capture and analysis. Not fast enough to work with I2S bus though. I would check to make sure the dac chip is receiving and responding to I2C bus activity. https://www.amazon.com/Comidox-Anal...t=&hvlocphy=9032419&hvtargid=pla-804742835968
 
Don't know. There is a volumio thread in the PC Based sub-forum. They would probably know.
Other than that I would suggest getting a $10 logic analyzer. They work fine for I2C bus traffic capture and analysis. Not fast enough to work with I2S bus though. I would check to make sure the dac chip is receiving and responding to I2C bus activity. https://www.amazon.com/Comidox-Anal...t=&hvlocphy=9032419&hvtargid=pla-804742835968
https://www.amazon.com/Comidox-Anal...t=&hvlocphy=9032419&hvtargid=pla-804742835968
Thank! but i'm not a linux programmer, i just want to ask experienced people to guide me specifically how to install hifibunny driver on volumio
 
Thing is the driver might be fine already. The problem could be the dac chip is set to the wrong I2C address, and or the reset line is not being toggled at the right time. Something like that. So I would say some troubleshooting might be in order before assuming a driver problem. OTOH if you get an error message when trying to load the driver then its pretty clear there is some driver problem, although it may not end up being the only problem.
 
Thing is the driver might be fine already. The problem could be the dac chip is set to the wrong I2C address, and or the reset line is not being toggled at the right time. Something like that. So I would say some troubleshooting might be in order before assuming a driver problem. OTOH if you get an error message when trying to load the driver then its pretty clear there is some driver problem, although it may not end up being the only problem.
i use es9038q2m v1.07 board like in article mentioned and use 1 of 2 drivers hifibunny3-q2m and sl-q2m both failed, volumio not found module
 
commands to use include
sudo cp -r /boot/ko/hifibunny3-codec.ko /lib/modules/4.19.118-v7+/kernel/sound/soc/codecs/hifibunny3-codec.ko

sudo cp -r /boot/ko/hifibunny3-q2m.ko /lib/modules/4.19.118-v7+/kernel/sound/soc/bcm/hifibunny3-q2m.ko

sudo cp -r /boot/ko/hifibunny3-q2m.dtbo /boot/overlays/hifibunny3-q2m.dtbo

sudo rm -r /volumio/app/plugins/system_controller/i2s_dacs/dacs.json
sudo cp -r /boot/ko/dacs.json /volumio/app/plugins/system_controller/i2s_dacs/dacs.json
 

Attachments

The dacs.json file for Volumio 2 shows hifiberry is already built in: https://github.com/volumio/Volumio2/blob/master/app/plugins/system_controller/i2s_dacs/dacs.json In that case its not clear why a new driver would need to be installed.

If "alsa -l" says module not found that may mean the OS doesn't detect that the dac hardware is connected to the system. That could happen if the dac chip I2C address is wrong, if the reset line isn't toggled at the right time, etc.

Again, I am not an expert in linux or volumio. Those guys are in the other forum.
 
Just to add another socketed ES9038Q2M (dual) DAC board to the mix. (but not as cheap, but also seems to require a lot less work to be decent)

Leaf Audio DAC (~150 USD) which mostly uses proper current mode and I/V stage as per earlier schematic posts, but then follows it with a unigy gain voltage follower/buffer.

A few oddities:
- They place a 100uF polarized cap and resistor between the output of the I/V and input of the Follower.
- Follower output has a cap in series with the feedback, but the feedback (Opamp inverting input) and the output are also 0-Ohm bridges at the DIP socket? And the trace goes direct to the XLR output relays/Headamp header (top edge) on the bottom of the board.
1664726861665.png

- Opamp Vs is provided by Monolithic MP3426 which measures 13V above true ground. Frequency is set to 1.35Mhz as per Fset resistor marked 273 (27k)
1664725849599.png


- AVCC is provided by Richtek RT9193; one LDO per ES9038Q2M. They are not especially low noise, but considering AVCC draws a total of 12mA and they are 300mA parts, they should live a long life. PSRR is proportional to frequency, and the DAC uses a 2-pin 5V switching wall wart for power so perhaps a linear PSU would help?

1664725798654.png



It seems to loosely follow the I/V stage schematics in post #3003 coupled with half the follower in post #3004 but using 2.2k resistors. I swapped the 390-Ohm 1005 resistors for 1k-Ohm 1005 1% resistors (stolen from the headamp board since I will never use it) and that was one hand soldering battle I am not excited to try again. I failed with my conical T12 tip, so I went to the T12-K tip (1/4" blade) and used the pointy end. It's not at all pretty but the scope doesn't lie. I needed pro-level output voltages to go into a Driverack PA2 (+4dBu setting, up to +20dbU inputs).
1664727216728.png

I took photos of each XLR signal pin,but they were all the same.

1664727358918.png


I am slightly concerned by that 462mV avg voltage. Signal was generated by a website offering a 1khz tone with Windows volume at max; USB input. I need to get a multimeter out and see if there is any DC between pins 2 and 3. The offset might just be between pins 1-2 and 1-3 since I put the probe ground on that to emulate the balanced interconnect.