ES9038Q2M Board

Hi Kay,

Great to read your post that you are happy with the sound of the dac as modded so far. It can still get better, but if you want to go further with it, there is still that matter of tweaking the dac registers.

When I set up the clock divider as it exists at the moment, I left the direct connection of the clock to the dac intact. I figured end result jitter would probably be better that way. As a result of that decision, in order to get a dac clock signal to divide I reprogrammed one of the dac chip GPIO pins that was was used for SPDIF input to work as an MCLK signal output instead. That is one dac register tweak that would be needed to proceed with the divider as I have implemented it so far, and I think that will probably stay the same even if I change some other parts of the divider (in order to lower cost, simplify implementation, and hopefully make SQ even better if possible).

Some other register tweaking that should occur if using a divided clock is to change the DPLL bandwidth setting. In fact, if using AK4137 even in its stock form, and if my recommendations for low jitter gold pin or soldered ribbon cable have been followed, then some reduction of DPLL bandwidth for improved sound quality is probably already possible. With a divided clock the DPLL bandwidth can be set to the minimum or to any number since it becomes unconditionally stable.

Another register tweak is harmonic distortion compensation, which does help audibly, and a lot can be learned about the subjective sound of low-order distortion by playing around with the settings.

Yet another good thing to learn how to set in the registers is the dac volume control.

Another register tweak could put the dac in master mode, to, say, use with a HiFiBerry RPi driver. Or it could be put into synchronous mode to make a fully synchronous dac.

Learning how to use the registers to make the dac do what you want is as important as anything else we do with the dacs.

I'm waiting for someone to do it, as Thorp already did with his ES9018k2m dac, or I am waiting for someone to ask for more details about hardware interfacing if that is what is holding them back. Whatever it is, people will have to take the leap if they want to go beyond what is possible with power supplies, output stages, and clocks.
 
Last edited:
Hi Mark,


Of course am looking forward to tweaking the dac registers. Without modding the mcu and connecting rpi3b in online mode, I can set the dpll bandwidth using the drivers and plugins mentioned by eslei at post ES9038Q2M Board. Right now it is set to 1 for both DSD and PCM. Still could not get it to play though. But no idea if the setting goes back to default when switching back to xmos input.



According to makobd at post ES9038Q2M Board, pin lifting of mcu seems necessary for full access. Am a little nervous about that as I destroyed the blue board doing the same line. Am now using green v1.07 board which has the sda/scl connection pins. Is there anyway around that?



Regarding the hardware volume control, a voltage mode potentiometer should arrive today - 10K Potentiometer Module - Robu.in | Indian Online Store | RC Hobby | Robotics. Reckon connected it to the 3 pin volume on the board would do the job.


Have no idea about the hd compensation register. Appreciate if you'd tell me how to do it or any documentation to use. The rpi runs in linux so programming with linux is no problem. I guess the only question is whether one is able to connect to the dac register hardware wise.


Regarding the clock divider, is there any lower cost you got in mind?


Regards,
Kay.
 
Kay,

Possibly Makobd and I both ended up with versions of the 1.07 board that had earlier version firmware. In that case, the MCU would not stop with J1 and J2 both installed on the dac board. So, the first things I would ask would be do you have a 1.07 dac board, and if so, does it stop responding to the volume control when you install J1 and J2? If the answer is yes, particularly to the last question about the volume control then it seems like it should not be necessary to cut any traces or lift and pins on the dac board in order to access I2C bus.

Regarding the clock divider, I have a much simpler clock divider chip here to try. Or, as Terry mentioned, it is possible to make one out of D-flip flops. It kind of seems unlikely that dividing MCLK frequency and using it to replace the 22.5MHz clock on the AK4137 board would happen to result in optimal sound quality (due to issues related to exact phase of the divided clock relative to MCLK). Therefore, most likely phasing would have to be fixed. One way to do that might be to reclock the I2S signals coming out of AK4137 so as to make them stable at the dac I2S inputs exactly at the right time. Problem is, I have not determined the exact right timing to use, I don't know how big the timing error window might be, and the dac chip data sheet doesn't help. So, I would have to experiment.

In terms of cost, we might be talking about fabricating one or two small boards and using a few low-cost digital chips. No expensive evaluation boards would be involved, assuming I can get it to work as well or better than what I have been able to do so far using the LMK01000 clock divider eval board.
 
Last edited:
Hi Mark,


Yes, with J1&J2 installed, the led light did not come on and there is no sound. Am guessing must have set volume to software in Volumio ( I was testing with xmos, volume pot connected). Will this mean the board has the new firmware?


Noted about the divider clock. Will wait for expectantly for your experiments.



Thanks,
Kay.
 
Will this mean the board has the new firmware?

Yes, I would think so.

However, you say it isn't working with RPi?

If that's the case, you might try leaving off J1 and J2 and don't connect I2C bus to RPi. With some RPi sound card driver it should probably be possible to test I2S bus alone and make sure that part is working to your dac. If I2S works, then the only remaining problem might be with I2C.
 
There is a question I would like to ask the group, in case anyone has any information on it. Not so long ago we discussed the possibility of using ADM7150 for ES9038Q2M AVCC rather than building and opamp based supply. The concept seemed like it might be attractive for some people who could afford to purchase an ADM7150 AVCC board from TP, rather than having to build the opamp supply we that we typically recommend.

What I would like to know is if anyone actually tried it for one of our modded ES9038Q2M dac boards?

The reason I ask is because PRO dac chips such as used in TP dacs require a lot more AVCC current than the mobile Q2M chip does. In some cases people have reported empirical experiences in which power supply loading affects sound quality. In particular, some people report loading shunt regulators with resistors so as to force the regulator to source more current (say, ~50% - 65% more) than the audio circuit load itself actually requires. Whether or not such resistive loading has any beneficial audible effect is likely very dependent on the particular regulator design.

In the case of ADM7150 (a series regulator), it would be almost barely be idling along to supply AVCC for one channel of a Q2M chip. Just sayin' No idea if it makes any difference.

Kind of similarly for people who have tried LT304x regulators for AVCC without much joy, I wonder if loading them down with a nominal resistive load might have any audible effect at the dac analog output. (In the case of Chinese LT304x boards, it seems likely that most of the passive components that come with the board would be cheap: excessively piezoelectric ceramic caps, poor quality electrolytics, maybe insufficiently low-z across-the-audio-band input filter caps, possibly thick film rather than thin film resistors, etc). (My advice regarding LT304x regulators for AVCC is still not to use them, but in case anyone happened to discover anything interesting, it would be good to know about it.)

Also, I wonder if people are grounding 3.3v regulators solidly to the dac ground plane and using very short length output wires to loads, especially for AVCC.

The reason I would like to ask the group about the forgoing things is because I can't perform every possible experiment myself. Whatever experiences people here do have, the experiences may be useful for the group to know about if enough implementation details are given to allow for clear understanding of exactly what was tried.
 
Last edited:
Okay Mark,


I will try again, am not sure if it works with RPI because I did it in the midst of my mistakes. Will report again, thanks.


Cheers,
Kay.


hi, there,

with rpi and q2m 1.07 board and j1, j2 both installed, if the i2s is right, the dac will be working without the i2c but has very weak sound, tune the preamp volume control up.

have a look on my post #3374 at page 338, let me know if you need the up-to-date driver for new volumio.


cheers
 
hi there,

freshly installed volumio 2.572, unzip and copy ' ko ' to /boot, i2s setting is 'R-PI DAC'.

green board i2s lrck to pi gpio pin 12,
green board i2s bclk to pi gpio pin 35,
green board i2s data to pi gpio pin 40,
disable the on board mcu by j1, j2 on,


the dac should has very weak output without the i2c, if tune the preamp volume control up has no sound, there is something no right, fix it before go any further.

green board i2c sda to pi gpio pin 3,
green board i2c scl to pi gpio pin 5,

ssh to volumio 2.572

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 reboot

pls follow my post on #3374, #3380, #3381, #3382, #3383, #3384, #3559, #3560

i2s setting is '90x8q2m' not '9038q2m'.


cheers
 

Attachments

  • 41492.zip
    7.7 KB · Views: 110
Last edited:
hi there,

freshly installed volumio 2.572, unzip and copy ' ko ' to /boot, i2s setting is 'R-PI DAC'.

green board i2s lrck to pi gpio pin 12,
green board i2s bclk to pi gpio pin 35,
green board i2s data to pi gpio pin 40,
disable the on board mcu by j1, j2 on,


the dac should has very weak output without the i2c, if tune the preamp volume control up has no sound, there is something no right, fix it before go any further.

green board i2c sda to pi gpio pin 3,
green board i2c scl to pi gpio pin 5,

ssh to volumio 2.572

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 reboot

pls follow my post on #3374, #3380, #3381, #3382, #3383, #3384, #3559, #3560

i2s setting is '90x8q2m' not '9038q2m'.


cheers

hi there,

edit my last post.

green board i2s lrck to pi gpio pin 12,
green board i2s bclk to pi gpio pin 35,
green board i2s data to pi gpio pin 40,
disable the on board mcu by j1, j2 on,

freshly installed volumio 2.572, unzip and copy ' ko ' to /boot, i2s setting is 'rpi-dac'.

the dac should has very weak output without the i2c, if tune the preamp volume control up has no sound, there is something no right, fix it before go any further.

green board i2c sda to pi gpio pin 3,
green board i2c scl to pi gpio pin 5,

ssh to volumio 2.572

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

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 reboot

pls follow my post on #3374, #3380, #3381, #3382, #3383, #3384, #3559, #3560

i2s setting is '90x8q2m' not '9038q2m'.


cheers
 
Last edited:
I supply it with +/-15V 200mA. is it enough?

How much current is needed depends if everything is powered from the +-15v supply or if there is a separate 5v supply for the low voltage digital part of the dac. IIRC, with everything powered from +-15v, the +15v current may be around 150mA (165mA?), and the -15v current may be closer to 15mA (it has been a long time since I measured it, don't recall the exact numbers).

Probably, if crackling is only between songs it may have some cause other than the power supply.
 
@Markw4 check out this post...
...I'm still waiting for my FPGA board to be delivered but I started setting up a dev environment with Vivado and Mathcad.

I have seen Marcel's posts in that thread. He wrote a Pascal program that kind of sorta does something like DSD conversion. Don't know how it sounds, or would sound if it were used.

Typically what happens is as Marcel described: PCM is upsampled, digitally LP filtered, then run into a DSD modulator. In theory, PCM and DSD are two ways of describing the same audio, so no surprise it is possible to mathematically convert between the two. The questions are usually more about particular algorithmic choices and how it sounds during playback, given a particular DSD playback sample rate.

A lot of developments these days seem to get published in patents, or else are held as trade secret info. Lots of reading to do, I expect.

EDIT: IIRC, Marcel also built an upsampling DAC with ASRC a few years ago. Don't know how it keeps up with commercial offerings of today.

In addition, if we look at the big picture, we don't need to do ASRC or DSD conversion to start with. There is plenty to do before those things. What Benchmark did with their dacs is use SRC4192 to do any needed ASRC at the front end, then Benchmark added their own PCM interpolation filter with a custom volume control solution. The first part of that problem is just to learn how to make a good sounding interpolation filter alone. The volume control (and comprehensive intersample over management) ought to be a second step (as it adds additional complications). Regarding conversion to DSD, likely one could not give away specific code for that or give away binary code or FPGAs. My guess is that licensing fees may have to be paid for every copy (otherwise don't know why Foobar2000 dropped it). If licensing costs, only way to do that would involve selling finished hardware or copy protected software of some kind. All stuff to worry about much later.
 
Last edited:
Right, but he also published the Verlog code...

Grab it if you want.

Matlab/Simulink may already have to tools to create S-D modulators which are use to encode DSD (among other things). It has had digital filter tools for a long time already. And it can output Verilog/VHDL for specific Xilinx FPGAs. Not sure where that may lead until I spend some time with it.

For now, VHDL is starting to feel a lot more comfortable, although still more to do on that.

I also kind of feel like I should try to finish up a practical clock divider system for those remaining diy dac mod'ers in the thread who would like to have it. I don't want to use my modded dac#2 for that because I want to keep it as is as a reference for best sound I could get from divided clocking so far. Therefore, I need to cobble another dac together for further clock divider development.