Getting rid of the noise on the audio input

Using the i2cset command is not a good idea because the i2c bus is under the control of the kernel.

A better way to set the gain is to use the alsamixer application.

In the mixer application the control you want is called “TX1 Digital”.

The i2cset command wont mess up your whole beagle board , at most it might confuse the sound driver until next reboot.

Yes , the alsamixer application can control the same amplifier as your i2cset command.

The application is called “alsamixer” and is a command line application that draws a mixer on a terminal
using characters. It should be installed when you install alsa but you might have to install some sort
of alsa utilities package.

You might have to press F6 in the mixer to select a sound card if you are using the pulseaudio
sound server and then select sound card 0.

Most Linux distro’s will save and restore the alsa state when they shut down and start up using
the “alsactl store” and “alsactl restore” command, so you should not need to do anything.

I had a similar audio noise "issue" with the beaglebone, where analyzing recorded audio revealed 50Hz pickup and its harmonics. The noise was much more noticeable at higher Amp gains.

Connecting the board GND to earth by e.g. connecting the USB cable caused the issue to go away completely.

Regards
Hussein

I am not sure I completely understand your question but I think you are asking how easy it would be to have
multiple instances of the twl4030 audio driver loaded so that you can expand the number of output channels.

The codec on the beagleboard xm ( inside the TPS65950 chip ) is connected to the MCBSP2
interface of the omap processor and MCBSP1 and MCBSP3 interfaces are connected to the
expansion connector. So you could make an expansion board that has 2 TPS65950 chips on
it and connect them to MCBSP1 and MCBSP3 interfaces. From what I can tell, you would need
to modify the kernel source code in the kernel/arch/arm/mach-omap2 directory to make the two
additional codecs work with alsa. In order to do this you would need to have a reasonable understanding
of the omap processor and a reasonable understanding of the TPS65950 chip and also a knowledge
of kernel programming and the alsa driver model.

A much simpler way of getting multiple output channels would be to use a USB sound device that
has lots of output channels and use a usb audio driver that already exists in the kernel.