Enable AMIC1 - Mixer controls

Hi,

I am trying to enable CODEC_AMIC1 for record, can some one help in providing mixer path settings to enable CODEC_AMIC1.

@srini
@anon91830841

Thanks,
Arun

Hi Arun,
Headset Mic is connected via AMIC2 and is routed by default to ADC2 and then to DEC0
If you are looking to connect MIC via AMIC1, you can do something similar by routing ADC1 to DEC0 which should work.
Here are the mixer settings required.
amixer cset iface=MIXER,name=‘MultiMedia3 Mixer SLIMBUS_0_TX’ 1
amixer cset iface=MIXER,name=‘AIF1_CAP Mixer SLIM TX0’ 1
amixer cset iface=MIXER,name=‘SLIM TX0 MUX’ DEC0"
amixer cset iface=MIXER,name=‘ADC1 Volume’ 12"
amixer cset iface=MIXER,name=‘ADC MUX0’ AMIC"
amixer cset iface=MIXER,name=‘AMIC MUX0’ ADC1

@srini

Thanks srini for the reply. tried with above mixer controls, recorded clip has no data.
please correct me if any issues with HiFi file,
https://github.com/dasariarun/mixers/blob/master/HiFi

Thanks,
Arun

Hi Arun,
Can you share me all the commands that you run to record a file from command line?
–srini

Hi srini,

I am trying with arecord,
arecord -d 10 rec.wav

Recorded clip showing size properly but no data(checked with Audacity).
@srini

Thanks,
Arun

Hi Arun,
This mixer setting
amixer cset iface=MIXER,name=‘MultiMedia3 Mixer SLIMBUS_0_TX’ 1

sets the TX on MultiMedia3, so you should select device correctly in arecord too
correct way to do arecord in this case is
arecord -D hw:0,3 -d 10 rec.wav

thanks,
srini

Hi Srini,
@srini
getting this error with the above command,
arecord: main:828: audio open error: No such file or directory
checked, /dev/snd/pcmC0D3c is not preset

I think Multimedia3 means we have to use hw:0,2 (since device number starts with 0 and multimedia number start with 1)is my understanding correct?
tried with, arecord -D hw:0,2 -d 10 rec.wav
with this also recorded clip has valid size but no data. How to debug this further?

Thanks,
Arun

@srini

Any idea how to debug further? recorded clip showing valid size but no data.
using, arecord -D hw:0,2 -d 10 rec.wav

I am trying to bringup AMIC1 on custom board. Any kernel changes needed?

Thanks,
Arun

Make sure MIC BIAS is on, Which MICBIAS is connected to AMIC1 in your case?
Is the audio routing taking care of this connection?
–srini

@srini

checked MIC BIAS, getting 1.8v. Connected MIC BIAS2 to AMIC1.

How to check this, what changes are required?

Thanks,
Arun

@srini

AMIC1 working. used these mixer settings,

amixer cset iface=MIXER,name=‘MultiMedia3 Mixer SLIMBUS_0_TX’ 1
amixer cset iface=MIXER,name=‘AIF1_CAP Mixer SLIM TX6’ 1
amixer cset iface=MIXER,name=‘SLIM TX6 MUX’ DEC6
amixer cset iface=MIXER,name=‘ADC1 Volume’ 12
amixer cset iface=MIXER,name=‘ADC MUX6’ AMIC
amixer cset iface=MIXER,name=‘AMIC MUX6’ ADC1

Thanks srini for the support.