Direct control of Sound Processor for Microntek Head Units based on RK3066/RK3188 processors.
HuiFei, KGL, KLD, JY, and similar, generally discussed here: http://forum.xda-developers.com/show....php?t=2660662
The goal of the modification
Microntek Car Head Units based on RK3066 / RK3188 processors have so called Sound Processor IC made by ROHM, the BD37xxxx family.
This sound processor has the following functions:
Three-band parametric equalizer with adjustments of gain in range -20dB +20dB, frequency and Q-factor of the filter in each band.
Configurable loudness module with gain in range from 0dB to +20dB, and adjustment of filter frequency and the level of high frequencies suppression.
Setting of subwoofer output, including selection of signal source, cut-off frequency, phase, and gain.
In stock implementation, this IC is controlled by another 8051-based controller (called MCU) which controls all the onboard hardware, such as display, hardware buttons, BT module, video switch, etc. The way it controls the Sound Processor IC is very limited and in some aspects wrong:
Instead of 3-band parametric equalizer, we have a 9-band graphical one, with strange logic each of three groups of three bands controls a single hardware band, averaging their values; and the adjustments range is only +-10dB.
Loudness compensation does not use a built-in hardware circuit, but just adds some bass and treble, which is a way not the same.
Subwoofer output is fixed and cannot be configured.
The MTC Sound module allows for direct control of all the built-in function the Sound Processor directly from Android, overcoming limitations of stock implementation, and allowing to tune the sound quality to the best, with only minor hardware modifications.
Besides of that, in stock implementation, equalizer presets apply to any input, be it System, Radio, DVD etc. My experience tells me that it is desirable to have a separate equalizer settings per input. The Radio sounds differently than Media Player or DVD, so it needs to be adjusted differently.
In addition, a Preamp value that can be found in Factory settings was pulled for live adjustment. It is needed to equalize the volume of different inputs.
The software part
The software can be installed without hardware modification, but it will not work. It can be used for evaluation, though, to see how it looks like and what settings it has.
Make sure you have a rooted device, the Xposed framework installed, and you have some file manager that allows for file manipulations in system folders. I recommend the "Root Explorer".
1. Copy libjnidispatch.so to /system/lib and set permissions to 644.
2. Check if you have files i2c-0 .. i2c-4 under /dev directory. If they exist (typical for RK3188) skip step 3 and proceed to 4; if they don't exist (typical for RK3066) proceed to step 3.
3. Copy i2c-dev.ko to /system/lib/modules and set permissions to 644.
4. Download MTC Sound plugin from the Xposed repository (http://repo.xposed.info/module/com.sevenfloor.mtcsound) and install it. It will appear in modules in Xposed Installer, enable it there and reboot.
5. After reboot, go to Xposed Installer, and check it Log. Watch for line "The Sound Control Status is:" (see below for possible statuses).
The software brings the new Equalizer which will replace the stock one, and also it will be launched by hardware EQ button (if your unit has one).
The statuses that can be dislayed in the Xposed log:
No patch detected either module is not active in Xposed, or device was not rebooted after activation.
mcu,No device driver i2c-dev you have device which requires i2c-dev.ko driver, and you forgot to copy it where needed or set permissions (see step 3 above).
mcu,Exception com/sevenfloor/mtcsound/I2cBus$CLib you forgot to copy libjnidispatch.so or set permissions.
No access to /dev/i2c-?; <some additional info> - despite existence of driver, failed to access i2c bus programmatically. Normally should never happen, but if happened, contact me for further investigation.
mcu,Error in write() 11 (no response from i2c slave) programmatic access to i2c bus works well, but Sound Processor does not respond. Need to check soldering.
mcu,Error in write() 110 (no response from i2c slave) same as above.
i2c,Channel x (x is a number) everything is good, enjoy your sound.
The hardware part
Please see the circuit diagram attached.
Basically what we need to do is to re-route the I2C control bus of Sound Processor from the MCU to the Android Board.
Find a 28-pin IC marked BD37<whatever>. It has a key - small dot or circle near the 1st pin. Pins are counted from that key dot, counter-clockwise.
So that find pins 25 and 26, and using a multimeter, trace resistors connected to these pins, somewhere around the chip.
Unsolder these resistors - this way you'll break connection to the MCU that needs to be broken.
Keep the resistors, or throw them away if you plan to use new ones (e.g. bigger, easier to manipulate - not only SMD resistors may be used but also those with wired pins).
Now find a 28-pin IC marked WM8731S, and with multimeter, trace resistors connected to its pins 24 and 23. The same rule for pin counting applies.
Keep these resistors, don't unsolder. Solder wires to their opposite ends.
Other ends of wires solder to the resistors that you unsoldered (or to others you had for replacement), and opposite pins of the resistors solder to the pads that are connected to the BD37xxx chip.
So that you will have the following traces:
WM8731S pin 24 - resistor - wire - resistor - BD37xxx pin 25
WM8731S pin 23 - resistor - wire - resistor - BD37xxx pin 26
After soldering, carefully check the circuit with the multimeter.
Mini-FAQ
Q: So will the sound be much better after this modification, is it worthly at all?
A: It will not make your hardware parts like amplifier and other audio circuits any better. But it will allow you to fine tune the sound to the best that can be achieved with all the features of the Sound Processor, which is not available in the stock. Many people say they get "incredible sound". I would say that I managed to tune mine to be "much better" :)
Q. Would your software be useful without the HW modification part?
A. No. In future, such a possibility might become available. Other developer works on MCU patch, and when/if he finish his work, I will update my software to work thru his modified MCU, so that without a HW mod. As I see the picture, it will take not less than a couple of months.
Q. Please help me with the HW modificatio for my device XXX / YYY / ZZZ
A. I'm not familiar with other devices than mine, and, unfortunately, I've got not very helpful pictures of my work. So if you can't follow above instructions yourself, then please wait for more experienced users with units like yours, when they do modifications and share their photos.
Xposed Repository link
http://repo.xposed.info/module/com.sevenfloor.mtcsound
HuiFei, KGL, KLD, JY, and similar, generally discussed here: http://forum.xda-developers.com/show....php?t=2660662
The goal of the modification
Microntek Car Head Units based on RK3066 / RK3188 processors have so called Sound Processor IC made by ROHM, the BD37xxxx family.
This sound processor has the following functions:
Three-band parametric equalizer with adjustments of gain in range -20dB +20dB, frequency and Q-factor of the filter in each band.
Configurable loudness module with gain in range from 0dB to +20dB, and adjustment of filter frequency and the level of high frequencies suppression.
Setting of subwoofer output, including selection of signal source, cut-off frequency, phase, and gain.
In stock implementation, this IC is controlled by another 8051-based controller (called MCU) which controls all the onboard hardware, such as display, hardware buttons, BT module, video switch, etc. The way it controls the Sound Processor IC is very limited and in some aspects wrong:
Instead of 3-band parametric equalizer, we have a 9-band graphical one, with strange logic each of three groups of three bands controls a single hardware band, averaging their values; and the adjustments range is only +-10dB.
Loudness compensation does not use a built-in hardware circuit, but just adds some bass and treble, which is a way not the same.
Subwoofer output is fixed and cannot be configured.
The MTC Sound module allows for direct control of all the built-in function the Sound Processor directly from Android, overcoming limitations of stock implementation, and allowing to tune the sound quality to the best, with only minor hardware modifications.
Besides of that, in stock implementation, equalizer presets apply to any input, be it System, Radio, DVD etc. My experience tells me that it is desirable to have a separate equalizer settings per input. The Radio sounds differently than Media Player or DVD, so it needs to be adjusted differently.
In addition, a Preamp value that can be found in Factory settings was pulled for live adjustment. It is needed to equalize the volume of different inputs.
The software part
The software can be installed without hardware modification, but it will not work. It can be used for evaluation, though, to see how it looks like and what settings it has.
Make sure you have a rooted device, the Xposed framework installed, and you have some file manager that allows for file manipulations in system folders. I recommend the "Root Explorer".
1. Copy libjnidispatch.so to /system/lib and set permissions to 644.
2. Check if you have files i2c-0 .. i2c-4 under /dev directory. If they exist (typical for RK3188) skip step 3 and proceed to 4; if they don't exist (typical for RK3066) proceed to step 3.
3. Copy i2c-dev.ko to /system/lib/modules and set permissions to 644.
4. Download MTC Sound plugin from the Xposed repository (http://repo.xposed.info/module/com.sevenfloor.mtcsound) and install it. It will appear in modules in Xposed Installer, enable it there and reboot.
5. After reboot, go to Xposed Installer, and check it Log. Watch for line "The Sound Control Status is:" (see below for possible statuses).
The software brings the new Equalizer which will replace the stock one, and also it will be launched by hardware EQ button (if your unit has one).
The statuses that can be dislayed in the Xposed log:
No patch detected either module is not active in Xposed, or device was not rebooted after activation.
mcu,No device driver i2c-dev you have device which requires i2c-dev.ko driver, and you forgot to copy it where needed or set permissions (see step 3 above).
mcu,Exception com/sevenfloor/mtcsound/I2cBus$CLib you forgot to copy libjnidispatch.so or set permissions.
No access to /dev/i2c-?; <some additional info> - despite existence of driver, failed to access i2c bus programmatically. Normally should never happen, but if happened, contact me for further investigation.
mcu,Error in write() 11 (no response from i2c slave) programmatic access to i2c bus works well, but Sound Processor does not respond. Need to check soldering.
mcu,Error in write() 110 (no response from i2c slave) same as above.
i2c,Channel x (x is a number) everything is good, enjoy your sound.
The hardware part
Please see the circuit diagram attached.
Basically what we need to do is to re-route the I2C control bus of Sound Processor from the MCU to the Android Board.
Find a 28-pin IC marked BD37<whatever>. It has a key - small dot or circle near the 1st pin. Pins are counted from that key dot, counter-clockwise.
So that find pins 25 and 26, and using a multimeter, trace resistors connected to these pins, somewhere around the chip.
Unsolder these resistors - this way you'll break connection to the MCU that needs to be broken.
Keep the resistors, or throw them away if you plan to use new ones (e.g. bigger, easier to manipulate - not only SMD resistors may be used but also those with wired pins).
Now find a 28-pin IC marked WM8731S, and with multimeter, trace resistors connected to its pins 24 and 23. The same rule for pin counting applies.
Keep these resistors, don't unsolder. Solder wires to their opposite ends.
Other ends of wires solder to the resistors that you unsoldered (or to others you had for replacement), and opposite pins of the resistors solder to the pads that are connected to the BD37xxx chip.
So that you will have the following traces:
WM8731S pin 24 - resistor - wire - resistor - BD37xxx pin 25
WM8731S pin 23 - resistor - wire - resistor - BD37xxx pin 26
After soldering, carefully check the circuit with the multimeter.
Mini-FAQ
Q: So will the sound be much better after this modification, is it worthly at all?
A: It will not make your hardware parts like amplifier and other audio circuits any better. But it will allow you to fine tune the sound to the best that can be achieved with all the features of the Sound Processor, which is not available in the stock. Many people say they get "incredible sound". I would say that I managed to tune mine to be "much better" :)
Q. Would your software be useful without the HW modification part?
A. No. In future, such a possibility might become available. Other developer works on MCU patch, and when/if he finish his work, I will update my software to work thru his modified MCU, so that without a HW mod. As I see the picture, it will take not less than a couple of months.
Q. Please help me with the HW modificatio for my device XXX / YYY / ZZZ
A. I'm not familiar with other devices than mine, and, unfortunately, I've got not very helpful pictures of my work. So if you can't follow above instructions yourself, then please wait for more experienced users with units like yours, when they do modifications and share their photos.
Xposed Repository link
http://repo.xposed.info/module/com.sevenfloor.mtcsound
What the heck this is doing here?
ReplyDelete