Audio cape enhancement

Hi to all,
starting basically from audio-cape design, I’ve added mic input and I would like to add mono output.

FIRST: to let mic work I forced its bias to AVdd instead properly connect it to MICBIAS pin on TLV320AIC.
In fact MICBIAS pin is always OFF. This workaround adds some noise to mic input signal even if the files produced by arecord are quite good, at least for my needs.

SECOND: I can’t get any output from mono channel. I tried any configs in alsamixer wiith no results.

I think the problem is related to the fact I’m still using original audio cape config file: BB-BONE-AUDI-01-00A0.dtbo
The source of it should be:
This configuration doesn’t support in audio routing section neither BIAS nor MONO because those widgets are not implemented in cape hardware.

*+	fragment@4 {*

*+		target = <&ocp>;*
*+		__overlay__ {*
*+			sound {*
*+				compatible = "ti,da830-evm-audio";*
*+				ti,model = "DA830 EVM";*
*+				ti,audio-codec = <&tlv320aic3x>;*
*+				ti,mcasp-controller = <&mcasp0>;*
*+				ti,codec-clock-rate = <12000000>;*
*+				ti,audio-routing =*
*+					"Headphone Jack",       "HPLOUT",*
*+					"Headphone Jack",       "HPROUT",*
*+					"LINE1L",               "Line In",*
*+					"LINE1R",               "Line In";*
*+			};*
*+		};*

Hi Filippo,

To get the MONO_LOUT working I think first you need to patch sound/soc/davinci/davinci-evm.c in the kernel, this widget is disabled in the evm_aic3x_init function. After that maybe this routing would be enough;

“MONO_LOUT”, “Mono Out”

The bias should work however, look at the same file (sound/soc/davinci/davinci-evm.c) for some inspiration. Here’s one example I would have tried (sorry, can’t test this myself right now since I’m travelling);

“MIC3L”, “Mic Bias 2V”,

“MIC3R”, “Mic Bias 2V”,
“Mic Bias 2V”, “Mic Jack”,

You have the options for biasing defined in sound/soc/codecs/tlv320aic3x.c;
Mic Bias AVDD, Mic Bias 2.5V, Mic Bias 2V


Thank you again Daniel,
your suggestions look promising.
I appreciate your effort very much.
I think I would apply your advices later next week because I’m away too.

Hi Fillipo,

I am trying to add a mic input to the audio cape the same way as you. I’m running to a problem with values captured with ‘arecord’ being clipped at about 60% of full scale value. Curiuos if you had this problem or have any ideas about it.


Hi Daniel,
finally I had the time to work on it.
No luck.

Enabled MONO_LOUT does not work for me. I think it’s because it’s not supported at codec level: /sound/soc/codec/tlv320aic3x
And maybe it’s not supported for compatibility reasons against both AIC32 and AIC33 codecs.
But I’m going beyond the scope of my skills and available time. So the workaround was to merge, external to chip, both line-out channels to single channel.

No succes with mic bias too. No bias level at all for me in output.
So again the workaround was to give mic a good filtered AVDD.


Hi Brandon,
yes, I solved the clipping adjusting input levels with alsamixer.
The result is that recording now works nicely.
I think it’s not possible to upload any file here, so if you like I can send you my alsamixer working config and istructions to apply it. Just share an email.

About mic, I’m using with good results: