Power & Source of Big Ideas

Mini2440 & enable uda134x first microphone input

Moderators: chensy, FATechsupport

Hi,

I've been trying to use the first microphone input for quite a long time now on the FriendlyARM2440 board (the 3 pin connector) instead of the built-in one on the board.
After going through the uda134x codec documentation it turns out that the default configuration for the microphone input is differential mode.

I was able to change that mode to enable the first microphone input by writing the settings into the right uda134x registry.
To get more info about this you may want to search for UDA1341TS.pdf on Google. Here is the first link that comes out: http://www.nxp.com/documents/data_sheet/UDA1341TS.pdf

You'll find the registry address on page 19 and the different mixer modes on page 20.
We want to write the value 01 (0x01) into the registry at the address 010 (0x03) in extended mode.

To do so open up the file ./sound/soc/codecs/uda134x.c. Now edit the function uda134x_startup.c.
On the bottom right before the return statement you must add the following line of code.
uda134x_write(codec, UDA134X_EA010, 0x01);

This will enable the first micorphone input only. 0x02 will enable the second one and 0x03 both.

There may be a better way of doing this as I am not too sure if this is the best place where to add new hardware parameters.
Also, I am not too familiar with how ALSA SoC works but I would expect the ALSA framework to give us some means to control the hardware instead of editing the codec driver.

I hope it helps!
Francois wrote:
Hi,

I've been trying to use the first microphone input for quite a long time now on the FriendlyARM2440 board (the 3 pin connector) instead of the built-in one on the board.
After going through the uda134x codec documentation it turns out that the default configuration for the microphone input is differential mode.

I was able to change that mode to enable the first microphone input by writing the settings into the right uda134x registry.
To get more info about this you may want to search for UDA1341TS.pdf on Google. Here is the first link that comes out: http://www.nxp.com/documents/data_sheet/UDA1341TS.pdf cubes 2048

You'll find the registry address on page 19 and the different mixer modes on page 20.
We want to write the value 01 (0x01) into the registry at the address 010 (0x03) in extended mode.

To do so open up the file ./sound/soc/codecs/uda134x.c. Now edit the function uda134x_startup.c.
On the bottom right before the return statement you must add the following line of code.
uda134x_write(codec, UDA134X_EA010, 0x01);

This will enable the first micorphone input only. 0x02 will enable the second one and 0x03 both.

There may be a better way of doing this as I am not too sure if this is the best place where to add new hardware parameters.
Also, I am not too familiar with how ALSA SoC works but I would expect the ALSA framework to give us some means to control the hardware instead of editing the codec driver.

I hope it helps!

Although this post is old, I have the same issue now. Have you solve it? Can you share your solution?
Is anybody using mini2440 now? is it obsolete or Still available ?
If available then where to get it?
If not then what is the right replacement for this SBC with embedded linux?
can anybody help?

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 5 guests