I think there is a confusion between Power Modes and Power Mode PROFILES (PMP)
There are 4 power modes in the MA12070, A, B, C & D, each with their own switching frequencies, efficiency, EMI radiation etc. The chip switches between any THREE modes depending on the output levels and Power Mode PROFILE (PMP) selected.
Eg, on the default PMP0, it switches from Power Mode D>D>C as output increases to maximise efficiency. I select PMP2 which switches B>B>A to maximise sound quality.
There are 4 preset PMPs, but you can also customise your own PMP or even manually switch realtime between A, B, C & D by altering the registers.
This is used for both the analog and digital input MA12070(P)s, So to maximise sound quality, it is advisable to use PMP1 or PMP2. Both are very similar and have the lowest distortion.
Both the default PMP0 and PMP3 have unusually high levels of distortion of 0.1% at 6khz, probably due to it's switching frequency.
So in summary, if you choose PMP2, it stays at that and doesn't change, but switches between Power Modes B>B>A. Hope this helps
There are 4 power modes in the MA12070, A, B, C & D, each with their own switching frequencies, efficiency, EMI radiation etc. The chip switches between any THREE modes depending on the output levels and Power Mode PROFILE (PMP) selected.
Eg, on the default PMP0, it switches from Power Mode D>D>C as output increases to maximise efficiency. I select PMP2 which switches B>B>A to maximise sound quality.
There are 4 preset PMPs, but you can also customise your own PMP or even manually switch realtime between A, B, C & D by altering the registers.
This is used for both the analog and digital input MA12070(P)s, So to maximise sound quality, it is advisable to use PMP1 or PMP2. Both are very similar and have the lowest distortion.
Both the default PMP0 and PMP3 have unusually high levels of distortion of 0.1% at 6khz, probably due to it's switching frequency.
So in summary, if you choose PMP2, it stays at that and doesn't change, but switches between Power Modes B>B>A. Hope this helps
What ATTiny do you use?
Any complete board?
I have the MA12070 so it would be fun to try to change the PMP.
Any complete board?
I have the MA12070 so it would be fun to try to change the PMP.
I won't say the built in DAC is bad, only slightly noisier. 140uV of noise vs. 45uV for the analog version. Still very very quiet. I need to put my ears directly at the speakers in a quiet room to hear a faint hiss. So no issues there.So, only digital version have quality profiles? brzhifi ma12070 haven't?
Still, how bad is the built-in DAC? I have some DAC on 9018 - audio-gd NFB 11.32 and i want build small music harvester with ma12070 and USB transport and sell my NFB 11.32
does MA12070P have some like SPI or eeprom?
Can u recommend digital MA12070P board for modding?
It's difficult to tell subjectively whether the DAC good or bad, since it's attached to the amplifier and can't be separated 😳. But as an overall package, it's clean accurate and has good dynamics. I'm certain you can't tell the difference between the analog and digital.
I chose the digital one over an external DAC + analog one as integrating it well with low noise levels also needs careful implementation. And the specs for the digital version was good enough.
Unfortunately, the MA12070 does not have an eeprom. But it's easy enough to control using I2C commands using a cheap microcontroller. I also don't have a recommendation as I built my own amp 🙂. The little board attached is the Digispark ATTiny85 used to set the registers. Lots of clones on Aliexpress.
I have the MA12070 so it would be fun to try to change the PMP.
There is another way to change the registers besides programming a microcontroller. That is - get a 'Bus Pirate', I blogged about that route a few months back : https://www.diyaudio.com/community/threads/bus-pirate.396621/#post-7287970
I'll post the code to set the registers with the ATTiny if anyone is interested.
I'd be interested in that, if it's not too much trouble. Thanks!
I got the p version with build in dac too.
As I am a not willing to learn I2C programming in my old days I will order AD1896 ASRC that can be progammed via its pins to different output formats.
As I am a not willing to learn I2C programming in my old days I will order AD1896 ASRC that can be progammed via its pins to different output formats.
For what it's worth, with a library that abstracts all the low-level details, the I2C programming for the ma12070(p) is really simple. I'm pretty sure I posted code for doing it earlier in this thread (years ago!) on a Raspberry Pi using the wiringPi library. I expect doing it with an MCU (such as the ATtiny) is similarly easy (especially if using the Arduino libraries, which I think have a wiringPi equivalent).
altus fidelitas
On one of the forums, I read that the MA12070P polls some of the addresses on the I2S busThis was found thanks to the sniffer if I understood everything correctly. I haven't read the documentation yet, but doesn't the MA12070P support external SPI flash?
Can Digispark ATTiny85 work autonomously without a computer? Can it be programmed to automatically send registers during power up?
So I can use MA12070P + Digispark ATTiny85 + Amanero (USB transport)?
Here's the code to change to registers on MA12070. It's a really simple code using the Wire.h library. I've tested it on both the ATTiny85 and Arduino Uno/Nano.
//Code begin:
#include<Wire.h>
void setup()
{
Wire.begin();
//Change PMP from 0 (default) to 2
Wire.beginTransmission(0x20); // 0x20 = default MA12070 I2C address
Wire.write (0x1D); // 0x1D = PMP Register
Wire.write (0x02); //Set to PMP2
Wire.endTransmission();
//Change input from i2s Left Justified (default) to standard i2s
Wire.beginTransmission(0x20);// 0x20 = default MA12070 I2C address
Wire.write (0x35); // 0x35 = data input config register
Wire.write (0x00); //Set input to i2s
Wire.endTransmission();
}
void loop()
//Code end
There are a few wire.h libraries out there and not all work with ATTiny. Just Google for the one that works.
The connection between the microcontroller and MA12070:
MA12070; ATTiny; Nano/Uno
SDA ; PB0; D18
SCL; PB2; D19
Also needed are 2 pullup resistors. Anything around 2.2k - 4.7k works and soldered on the ATTiny board as shown:

Unfortunately the MA12070 only has volatile memory, so this process needs to be repeated every time it's turned on. The easy way to implement this is just to connect the ATTiny to the 5V supply of the MA12070, so it writes to the registers every time its powered up.
Something that I want to do but need more reading up is to shut down the ATTiny after it has executed the code. This will turn off all the microcontroller's oscillators and potentially cut down additional noise.
I compiled this using Arduino IDE and set the appropriate boards. I've attached the Ino file with more details in it.
Also included is my attempt to implement a volume control but it does not seem to work. My coding knowledge is next to zero, so help appreciated.
Patrick
//Code begin:
#include<Wire.h>
void setup()
{
Wire.begin();
//Change PMP from 0 (default) to 2
Wire.beginTransmission(0x20); // 0x20 = default MA12070 I2C address
Wire.write (0x1D); // 0x1D = PMP Register
Wire.write (0x02); //Set to PMP2
Wire.endTransmission();
//Change input from i2s Left Justified (default) to standard i2s
Wire.beginTransmission(0x20);// 0x20 = default MA12070 I2C address
Wire.write (0x35); // 0x35 = data input config register
Wire.write (0x00); //Set input to i2s
Wire.endTransmission();
}
void loop()
//Code end
There are a few wire.h libraries out there and not all work with ATTiny. Just Google for the one that works.
The connection between the microcontroller and MA12070:
MA12070; ATTiny; Nano/Uno
SDA ; PB0; D18
SCL; PB2; D19
Also needed are 2 pullup resistors. Anything around 2.2k - 4.7k works and soldered on the ATTiny board as shown:

Unfortunately the MA12070 only has volatile memory, so this process needs to be repeated every time it's turned on. The easy way to implement this is just to connect the ATTiny to the 5V supply of the MA12070, so it writes to the registers every time its powered up.
Something that I want to do but need more reading up is to shut down the ATTiny after it has executed the code. This will turn off all the microcontroller's oscillators and potentially cut down additional noise.
I compiled this using Arduino IDE and set the appropriate boards. I've attached the Ino file with more details in it.
Also included is my attempt to implement a volume control but it does not seem to work. My coding knowledge is next to zero, so help appreciated.
Patrick
Attachments
Last edited:
Yes, I connect it to the 5v supply of the MA12070.Can Digispark ATTiny85 work autonomously without a computer? Can it be programmed to automatically send registers during power up?
An improvement will be to include a command in the code to turn off the microcontroller after its done. This will avoid noise from it's oscillators
I run the amp from the i2s output of a DSP. Volume is controlled by the DSP.How do you control the volume? With ATTiny85?
I tried to use the microcontroller to read from a potentiometer and control volume but it does not work. But my coding skills are terrible. Maybe trivial for someone that knows what they are doing.
#include<Wire.h>
int VOLUME = A1;
int volume = 0;
int volume_curr = 0;
float vdiff = 0;
int hys = 2;
void setup()
void loop()
{
volume = analogRead(VOLUME);
vdiff = abs (volume - volume_curr);
if (vdiff > hys)
{
volume_curr = volume;
change_volume();
}
}
void change_volume ()
{
byte eightbitvol = volume/4;
Wire.beginTransmission(0x20);
Wire.write (0x40); //register for volume control
Wire.write (eightbitvol);
Wire.endTransmission();
}
In your blog: "your coding aptitude is relatively weak or non-existent, this is the device for you". Describes me perfectly, therefore I need to get a Bus Pirate.There is another way to change the registers besides programming a microcontroller. That is - get a 'Bus Pirate', I blogged about that route a few months back : https://www.diyaudio.com/community/threads/bus-pirate.396621/#post-7287970
The big downside of the 'Bus Pirate' is you need to set up the registers all manually each time you fire up the amp. But it does encourage experimentation because the feedback from tweaking those regs is immediate.
What DSP u use?I run the amp from the i2s output of a DSP. Volume is controlled by the DSP.
Don't know how good it is.
"AudioAmp 8 Click is a compact add-on board that reproduces input audio signal at sound-producing output elements, with desired volume and power levels. This board features the MA12070, a super-efficient audio power amplifier from Infineon Technologies. This I2C configurable audio amplifier is based on proprietary multi-level switching technology, enabling low power loss during operation. It supports a supply voltage range from 4 to 26V, allowing it to be used in many applications. Besides, it is equipped with protection features, allowing a reliable operation. This Click board™ is suited for various types of consumer audio equipment applications."
https://www.mikroe.com/audioamp-8-click
"AudioAmp 8 Click is a compact add-on board that reproduces input audio signal at sound-producing output elements, with desired volume and power levels. This board features the MA12070, a super-efficient audio power amplifier from Infineon Technologies. This I2C configurable audio amplifier is based on proprietary multi-level switching technology, enabling low power loss during operation. It supports a supply voltage range from 4 to 26V, allowing it to be used in many applications. Besides, it is equipped with protection features, allowing a reliable operation. This Click board™ is suited for various types of consumer audio equipment applications."
https://www.mikroe.com/audioamp-8-click
Last edited:
It took me way too long to connect my ESP32 (running Squeezelite-ESP32) to my MA12070P reference board. I thought I'd share what I learned.
The MA12070P defaults to i2s_format Left justified and i2s_framesize 64 bits. The ESP32 firmware allows me to change the register settings during the boot process, so the first thing I needed to do is change bits 2:0 of reg 0x35 to 000 (i2s standard). Since the firmware is 16 bit, I then needed to change bits 4:3 of reg 0x36 to 10 (32 bit word length).
The biggest issue I had was getting the BCLK from the ESP32 to a correct frequency. The ESP32 firmware creates a BCLK = Fs * Word Length, so if I played a 44.1khz file the BCLK would be 1411.2khz. You'll notice that CLK frequency is not valid for a 44.1khz sample rate. Fortunately there's a way to fix the sample rate in Squeezelite-ESP32, and I set that to 88.2khz. That doubled BCLK to 2822.4khz, which is a valid CLK for a 88.2khz sample rate. All files are now resampled to 88.2khz, and the MA12070P is always happy with the calculated 2822.4khz clock.
Later, the firmware allowed for other options, but larger sample rates and 64 bit words were a little too much for the ESP32.
Hopefully this helps others.
Mike
The MA12070P defaults to i2s_format Left justified and i2s_framesize 64 bits. The ESP32 firmware allows me to change the register settings during the boot process, so the first thing I needed to do is change bits 2:0 of reg 0x35 to 000 (i2s standard). Since the firmware is 16 bit, I then needed to change bits 4:3 of reg 0x36 to 10 (32 bit word length).
The biggest issue I had was getting the BCLK from the ESP32 to a correct frequency. The ESP32 firmware creates a BCLK = Fs * Word Length, so if I played a 44.1khz file the BCLK would be 1411.2khz. You'll notice that CLK frequency is not valid for a 44.1khz sample rate. Fortunately there's a way to fix the sample rate in Squeezelite-ESP32, and I set that to 88.2khz. That doubled BCLK to 2822.4khz, which is a valid CLK for a 88.2khz sample rate. All files are now resampled to 88.2khz, and the MA12070P is always happy with the calculated 2822.4khz clock.
Later, the firmware allowed for other options, but larger sample rates and 64 bit words were a little too much for the ESP32.
Hopefully this helps others.
Mike
Resampling is a bad way that reduces sound quality. Why u do not use USB transport board? MA12070P is support only 96kHz or support 192kHz sample rate too?All files are now resampled to 88.2khz
I still think that the ASRC AD1896 is the better way. It has been successfully used by audio tuning companies like ASE to mod CD Players and DACs.
Your amp looks really good.
Do you have a reflow oven?
A little timer relay to switch off the AtTiny should work.
- Home
- Amplifiers
- Class D
- Infineon MA12070 Class D