[PATCH] wm8962: add a simple DMIC enable control

Charles Keepax ckeepax at opensource.cirrus.com
Mon Feb 7 15:21:29 CET 2022


On Mon, Feb 07, 2022 at 11:49:32AM +0100, Martin Kepplinger wrote:
> Am Freitag, dem 04.02.2022 um 17:21 +0000 schrieb Charles Keepax:
> > On Fri, Feb 04, 2022 at 10:43:53AM +0100, Martin Kepplinger wrote:
> > > numid=92,iface=MIXER,name='MIXINR IN3R Switch'
> > >   ; type=BOOLEAN,access=rw------,values=1
> > >   : values=on
> > > numid=93,iface=MIXER,name='MIXINR PGA Switch'
> > >   ; type=BOOLEAN,access=rw------,values=1
> > >   : values=on
> > 
> > I don't think you should have both the IN3R and PGA switches
> > enabled at once. I would suggest only using the PGA switch.
> > 
> > Ok, I think what is happening here is you have both of
> > these connected, and because you have the PGA muted, you are
> > only hearing the unboosted mic signal coming through MIXINR
> > IN3R. This would explain both why the Capture Volume has no
> > effect and why your signal is quiet.
> 
> ok. I keep MIXINR IN3R Switch disabled now and the volume is indeed
> high now, and I control volume using
> 
> CaptureSwitch "name='Capture Volume'"
> 
> Volume itself indeed is good now. Recorded voice is very "metallic" and
> "shallow" if you know what I mean - and distorted when using MAX
> volume. The gnome audio recorder doesn't show *any* signal in the UI,
> so that must still be kind of bad - even though I understand recorded
> voice way better now than before.
> 

My first thought is that the signal is clipping somewhere in the
chain. You have a lot of the gaines up very high from when you
were trying to working around the low signal level issues.

Can we be clear here on what paths are in play here. Presumably
the gnome audio recorder is capturing over the I2S. When you say
you can understand the recorded voice way better now, do you mean
in the file captured by the gnome audio recorder? Or are you
listening to that on another path, like direct to the headphones?

> thanks for all the time and help, and sorry for all the wrong amixer
> output I sent you,
> 

No problem, always a bit of back and forth in these debugging
exercises.

> numid=10,iface=MIXER,name='Capture Volume'
>   ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
>   : values=63,63
>   | dBscale-min=-23.25dB,step=0.75dB,mute=0

This is +24dB, I would start with something like +0dB, +3dB or
+6dB.

> numid=7,iface=MIXER,name='MIXINR PGA Volume'
>   ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
>   : values=7
>   | dBrange-
>     rangemin=0,,rangemax=1
>       | dBscale-min=0.00dB,step=6.00dB,mute=0
>     rangemin=2,,rangemax=2
>       | dBscale-min=13.00dB,step=13.00dB,mute=0
>     rangemin=3,,rangemax=4
>       | dBscale-min=18.00dB,step=2.00dB,mute=0
>     rangemin=5,,rangemax=5
>       | dBscale-min=24.00dB,step=0.00dB,mute=0
>     rangemin=6,,rangemax=7
>       | dBscale-min=27.00dB,step=3.00dB,mute=0
> 

Hmm... step size here seems to disagree with the datasheet but
this is either +29dB or +30dB depending on who we trust.

So combining those two you have like +54dB of analogue gain, like
no way that isn't causing the signal to clip.

I would start with 0dB on each, then bump them up to like
+6dB if the signal is really quiet. But somewhere you should
be able to get specs on the mic and work out what actual gain
you need to get a full scale signal out of the mic for the
given micbias voltage. Your hardware folks should be able to help
out there.

Thanks,
Charles


More information about the Alsa-devel mailing list