Modify AK4499EX register?

I’m out of my depth on this question, and I’m willing to learn, but I would like to assess feasibility prior to spending more time on this.

I have a Geshelli Dayzee DAC w/ 2x AK4499EX in dual mono configuration. I was corresponding with Geno from Geshelli about the PCM filter in use - in this case minimum phase sharp roll-off (number 3 of the 6 filters built into the chip). I asked whether this could be changed (I strongly prefer linear phase), and he said it would involve accessing the I2C bus, which could damage the chip if done improperly, so it would void the warranty. This started me down the rabbit hole of looking into how to access the I2C bus to modify a chip’s register, and that search kept leading me to this forum, so I made an account. This also got me thinking about other possibilities like the E70V DAC from Topping, which I’m told does not have DSD Direct enabled, and I think owners might appreciate a method to change this.

My questions:

Is it generally possible to modify the register of a chip on a commercially purchased DAC?

If yes, is special hardware required?

Any feedback is appreciated! Thanks!
 
Hi Promee, welcome to DIYA. It is possible to climb aboard the I2C bus and modify registers but a lot depends on when they are set up. If the on-board MCU initializes the registers only at power-up then its doable to change them later. But if the firmware for some reason keeps writing or updating them then whatever you change them to will get overwritten. I think the former way of operating is more likely to be the way the code's written but nothing is for certain here.

The way I'd do it would be with a Bus Pirate - I guess that counts as 'special hardware'. I wrote a blog post about it here : https://www.diyaudio.com/community/threads/bus-pirate.396621/#post-7287970
 
  • Like
Reactions: Promee and altor
Yes, abraxalito is 100% right - it's not a problem to add some hardware, for example any microcontroller chip in DIP8 or SO8 package (easy to solder). Its firmware is also very simple - just send some bytes via I2C.
But the problem may be in choosing the right moment to send these bytes.

And another problem may be that the specific device uses SPI instead of I2C (because I2C can be connected in parallel, SPI - not).

Alex.
 
  • Like
Reactions: Promee
Hi Promee, welcome to DIYA. It is possible to climb aboard the I2C bus and modify registers but a lot depends on when they are set up. If the on-board MCU initializes the registers only at power-up then its doable to change them later. But if the firmware for some reason keeps writing or updating them then whatever you change them to will get overwritten. I think the former way of operating is more likely to be the way the code's written but nothing is for certain here.

The way I'd do it would be with a Bus Pirate - I guess that counts as 'special hardware'. I wrote a blog post about it here : https://www.diyaudio.com/community/threads/bus-pirate.396621/#post-7287970
Just read your Bus Pirate post and ordered one with some accessories. This thing looks too cool! Now to figure out some other ways to break things / get myself into trouble with it… It seems like there would be a ton of uses for something like this, but again, way out of my depth.

So if I’m understanding what you and @altor are saying, it sounds like these registers are volatile, so they’re written at least once each time the device powers on, and usually that’s it, but possible in some more esoteric designs they would be written periodically? So the way to modify them for the long haul is to replace or insert an additional MCU somewhere that will rewrite them / write them with the desired modifications.

Bus Pirate v5 should be here in less than a week. I shall report back, but if there is anything else I should be learning or thinking about in the meantime, let me know!
 
Hey @abraxalito and @altor !

I've got the Bus Pirate now, and I have identified 2 areas that look like they would be possible spots for connection to the DAC. I don't have a circuit diagram, and I doubt I would be able to get one, as I have already been told that I shouldn't mess with the I2C on it.

With that in mind, there is a connector on the front of the board near where the control buttons from the front panel plug in. It has pins labeled SDA SCL INT 3.3V 5V and Ground. It is sitting in close proximity to 2 TCA9534, presumably 1 for each DAC chip, as there are 2 each of AK4499EXEQ and AK4191EQ in dual mono configuration.

The other possible spot is a section of 6 pin holes labelled as Conn 3 near an ATtiny 828 MCU. It would appear that these are not intended for frequent connection and use because the holes are not individually labelled, and there are no pins / connector.

My suspicion is that the first interface is used to program the TCA9534, which functions as the storage for the MCU to read from and write out to the DAC chips.

I'm still working out how I should try to read from and write to these, but any advice from here would be appreciated!
 
The TCA9534 is an I/O expander. It turns the serial I2C data into a parallel word and vice versa. They most likely deal with the front panel.
Yeah, I was just now figuring that out... It would appear that they just control the front buttons, maybe also the LED colors on the buttons. It would appear that the other connection area by the ATtiny is really what I'm going for...
 
This is the starting point:

The TCA9534 open-drain interrupt (INT) output is activated when any input state differs from its corresponding input Port register state. It is used to indicate to the system master that an input state has changed.

1736657076696.png


Care to show the TCA9534 and its surroundings in great detail, focus, and well-lit?

See if the designer will reveal more details on how he writes to DAC chips that particular filter setting... good luck.
 
  • Like
Reactions: Promee
Hi @Promee - I downloaded the DS for the ATtiny828 and couldn't find reference to the TWI (code for I2C to avoid royalty payments I suspect) interface being able to operate as master. It only has slave capability it seems. Given that the DAC chips and port expanders are going to be slaves, this presumably means the I2C is going to be bit-banged in firmware, not using the TWI. What this means in practice is its harder to figure out which pins from the MCU are the I2C port as its a 'soft' interface, it could be any GPIO pin and there are a couple of dozen to choose from.

If you don't have a 'scope then you can try to identify the relevant I2C lines with the Bus Pirate in 'sniffer' mode. I haven't any experience of this so went in search of some help - https://www.digitalpeer.com/blog/sniffing-i2c-traffic-with-a-bus-pirate. Seems from this that Bus Pirate isn't so clever at sniffing (being a slave) as it is at being a master, the advertised baud rate of 100kHz didn't work properly for this guy. If you can get sniffing to work then you'll be able to figure out which commands are going to the DAC through knowledge of its address on the bus.

image_2025-01-12_132428494.png

(from the AK4499 2019 DS)

<oops, my pic isn't from AK4499EX, rather the original non-EX. However seems the address is the same>

Having looked through the AK4499EX register file there are only 3 registers and I'm not seeing any bits there for selecting the digital filter. They only seem present in AK4499 (original 2019 version) which offers six options. If your chips really are -EX then it might turn out this thread has been in vain.
 
Last edited:
  • Like
Reactions: Promee
Thank you both very much for the help!

From what I have been reading, it appears that there are 2 totally different modes in which the 449X DACs can operate - parallel and serial. Several of the pins appear to change function depending on the mode, so it would appear that this is not switchable (which is true of most of these DACs, though I do believe that there are a couple of rare examples that can be switched. The overall circuit design seems like it would have to be made around one of the modes, but maybe with some clever controllers a DAC could do both, but I digress.

It seems that this DAC may be working in serial mode. Parallel seems to convert everything to PCM, while serial seems to be the setting to enable DSD Direct mode. It also appears that the chip may ignore its registers when in serial mode and get settings by some other means, which is a bit confusing to me... It also appears when the DAC is in serial mode there are only 4 filters available for PCM (I think they are the same as the first 4 of the 6 filters available on most of them).

I attempted to connect to the 6 pin holes on the board based on the voltages I read off of them with my multimeter and based on what I could see on the PCB (not much). It looks like it may be the same 6 pin layout as on an Arduino board with a similar MCU, but I can't be sure. I attempted to use AVRDUDE, which has a preset for the ATtiny828, to read the flash and EEPROM. The EEPROM returned all full scale results (256 x 11111111 in binary or FF in hex) and the flash returned some different results, but some of the values were incomplete - binary bytes with less than 8 digits, or hex values with 1 digit.

The layout below is with the ATtiny 828 to the right with the pin 25-32 side facing the pin holes. From the data sheet of the 828, it seems to be the MLF32 pinout.

I measured the holes with my multimeter while the device was on and got:

1.156 V 3.257 V
0.137 V 1.153 V
3.253 V 0.000 V

The configuration that I attempted was:

MISO VCC (VOUT on bus pirate)
CLK MOSI
CS GND

I am definitely out of my depth with it and slightly concerned about the possibility of frying something because I'm not sure exactly what I'm connecting to. I'm also concerned that even if I can connect and program the 828, I may very well brick it, as this overall process seems much more non-standard and complicated than I initially expected.

I will have to do some more disassembling to get the board out far enough to provide good pics, but I can do that tomorrow or the next day if it is likely to help. I also just noticed a jumper position (at least I think, it's 2 pins that are open with the label J14) beside the connectors for the input buttons. I'm wondering if it is something that would need to be set to enter a programming mode, but even if it is, it's not clear that it would be programming anything other than the registers in the I/O expanders.

I suppose I don't know how this thing works 🤣 and unless someone has a high level of confidence on next steps I should try, I'm thinking I should just leave it alone and listen to it in DSD mode with HQPlayer and just not worry about the PCM filter... Still, I would love to be proven wrong on this and shown how to do it if it is straightforward and I'm not going to blow up this fancy DAC!