Line- in as analog input Sunxi audio drivers

Started by BMK, September 08, 2014, 01:04:43 AM

Previous topic - Next topic

BMK

I've succeeded in using the line inputs on GPIO-as a pair of analog inputs. Since the pins are linked straight to the SoC withot a capacitor, -Even DC voltages show up.

Now, According to the datasheet there is a variable gain preamp on the line input channels. In the current olimex debian image, many controls for the muxes, gains etc show up in AlsaMixer, but not the line input gains.
Digging throug the linux-sunxi git, I see the the line-in gain selection has been added about 7 months ago.

https://github.com/linux-sunxi/linux-sunxi/blob/sunxi-3.4/sound/soc/sunxi/sunxi-codec.c

I'd like to get this functionality on my A20, don't have the first idea how to do it - is it a kernel rebuild ?
Can someone give me a pointer.
Thanks

BMK

Shameless Bump.

Has anyone experience with building /installing these Audio drivers. I'd ask over at sunxi but I'm afraid of being eaten alive!

What I can gather is that the controls for the line in preamplifier were added about 7 months ago to the sunxi-audio codec but they don't appear in Alsamixer on an A20 with the latest debian image.
I want to get these drivers working on my board. I have never built a kernel etc and don't know if I need to?

jlucius

Assuming you got a Olinuxino A20 and got the image from the wiki, which contains a Linux Kernel 3.4.67+:

The Patch is included in Kernel 3.4.75r1, so it´s most likly not in the image and you have to build your own kernel.

This is not too hard and once you learned how to do it, pretty easy.

There are several manuals how to do it on olimex blog e.g.
http://olimex.wordpress.com/2013/11/05/building-the-ultimate-debian-sd-card-for-linux-with-kernel-3-4-for-a20-olinuxino-micro/

If you have any questions just ask.