[MTCD  Android Head Units Q&A] aluver:
Happy New Year guys!

1. All Rockchips headunits (rk3066/3188/3288/px3/px5) have a big problem with their DWC-OTG USB 2.0 controller kernel driver from Designware/Synopsys.

This driver generates a huge amount of interrupts on usb bus (about 15000 per second under load and 8000 minimum without any use of usb devices). So any wide streaming devices like USB-DACs, USB-CAM, EasyCAP and others cannot properly function. USB-DACs on samplerates higher 44100 or 48000 Hz and bit depth higher 16 bit generate many pop and clicks in sound or just noise. All usb streams are very slow, even copying files from usb flesh to sd card.

This problem is well known and it has the resolution - kernel driver needs to be patched.

Here are some links:

http://hwswbits.blogspot.ru/2013/09/dwc-usb-interrupt-spam-in-rockchip-socs.html?m=1

https://www.google.ru/amp/s/ideechaniz.wordpress.com/2014/02/26/dwc-otg-drivers/amp/

We have not kernel sources to patch it. Any open sources will not go because of many special functions of our HUs have been compiled into kernel. I wrote about this to SHEN ZHEN KLYDE ELECTRONICS CO twice, but no reaction (I have their HU).

So you cannot play sound higher then 16 bit 44100Hz or 48000Hz. If you try 24 bit and/or 96kHz you can hear clicks and pops or just a noise. The first step to make the situation better is to get usb-dac/converter with only FULL-speed (12Mb/s) usb-reciever chip, like sa9023, te7022, pcm2704(6) (mono!) etc. Unplug all usb devices except usb-dac from usb. Note that wifi and processor's loads affect too. Edit /etc/audio_policy.conf to limit sr and bd to 44100 and 16 for usb_device section. If you want to use your high speed usb-dac you can try to find and use a full speed usb hub on ali or ebay.

2. All android HUs for now have mcu and android boards inside. All apps like youtube, navigation, poweramp etc are sounding from android board and all of them can be routed to play through usb-dac using usb audio function of android. But dvd, bt hands-free, radio are located on and managed by mcu board. So sound from them does not going to/through android board. The only one way to get their sound on your car audio processor is connection of rca-outs and set processor to auto switch between analog and digital inputs by signal determination (helix dsp and many others can do that).

3. The volume. The best way for SQ is to use the dsp's volume adjustment. Note for digital volume adjustment every -6bB from max level excludes 1 bit from effective bit depth. So you loose your sound quality (dynamic range) by digital volume adjusting on HU because you can only have 16bit output (see 1). But if you WANT to do it there is one difficult way - write your own app service to catch mcu's broadcast commands for volume adjusting and then send alsamixer's comnands to change usb dac volume same level (need to install alsa). I made it for rk3066/rk3188 HUs on petrows microntec headunit service. Hope this help https://github.com/petrows/RK3066-Headunit-service

https://www.google.ru/url?sa=t&sour...MQ5YQBCCcwAA&usg=AOvVaw2W8hsXylKrMeQRC2R2mOVt

This service also can send buttons presses to Poweramp, USB Audio Player Pro, Spotify, PCRadio etc. But it is for MTCB, not for MTCD HUs. I dont know a difference of Microntek services of this versions of HUs. So I cannot say will it work or not on MTCD.