Banana Pi M2+ Support for audio codec on I2S PIN


(Ranjit Talukdar) #1

I want to connect external audio codec on I2S PIN available on 40 PIN header. I have downloaded Aarmbian 5.59 Ubuntu image. Please guide me, all what changes in the kernel I need to do to able to make audio codec work by connecting to I2S PIN in BPI M2+.

Any help will be highly appreciated.


(Igor) #2

Start with manual which describes enabling disabling hw functions

https://docs.armbian.com/User-Guide_Allwinner_overlays/

and perhaps use search for examples

https://www.armbian.com/search


(Igor) #3

I forgot to mention that you can manipulate hw functions directly from armbian-config -> system https://docs.armbian.com/User-Guide_Armbian-Config/


(Ranjit Talukdar) #4

Hi, thanks for your reply. I couldn’t find any settings for I2S device configuration in armbian-config. I want to connect a voice modem which uses PCM interface for data communication. I tried this with raspberry pi before by writing a simple DAI driver and DT overlay file. Since the BPI M2+ Is cost effective I would like to use BPIM2+ for my project. I will try to go through the manuals and example as you mentioned in the link Any help will be highly apricated.

Regards Ranjit


(Igor) #5

armbian-config -> system -> hardware functions … you can enable or disable overlays for I2C, UARTs, … and I am almost sure we have I2S there as well. For 3rd party devices which you are going to stick to I2S bus, that you need to DIY.


(Ranjit Talukdar) #6

Hi, thanks for your valuable input. I could enable the I2S functionality via fex file and tested both playback and capture functionality. In case of capture with 32bit sample size, captured data is completely noisy. I tried to connect simple mems MIC ICS43432 and recorded using “arecord” as below command arecord -Dhw:0 -c2 -r48000 -fS32_LE -twav -d10 -Vstereo test.wav I could only hear noise. Is there any limitation on sample size? I tired with 32 bit sample size. Please give your feedback.


(Igor) #7

Aha, you are using old 3.4.y kernel, there you need to set this in FEX file … I am sorry, don’t have that deep experiences. But look around … limitations are probably the same on all Allwinner boards. Type: i2s or i2s banana in here: https://www.armbian.com/search