Re: [PATCH] wm8962: add a simple DMIC enable control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Mittwoch, dem 02.03.2022 um 13:40 +0000 schrieb Charles Keepax:
> On Wed, Mar 02, 2022 at 12:48:28PM +0100, Martin Kepplinger wrote:
> > Am Dienstag, dem 01.03.2022 um 15:00 +0100 schrieb Martin
> > Kepplinger:
> > > Am Dienstag, dem 01.03.2022 um 13:44 +0000 schrieb Charles
> > > Keepax:
> > > > On Mon, Feb 07, 2022 at 02:21:29PM +0000, Charles Keepax wrote:
> > > > > On Mon, Feb 07, 2022 at 11:49:32AM +0100, Martin Kepplinger
> > > > > > Am Freitag, dem 04.02.2022 um 17:21 +0000 schrieb Charles
> > > > > > > On Fri, Feb 04, 2022 at 10:43:53AM +0100, Martin
> > > > > > > Kepplinger
> > > that's really nice of you to ask. Sorry for not replying earlier.
> > > Mainly cset "name='MIXINR PGA Volume' 0,0" made things much
> > > better
> > > indeed. I took a break from this then and the issue is still
> > > open,
> > > here:
> > > https://source.puri.sm/Librem5/librem5-base/-/merge_requests/296
> > > or if you want to look at the current ucm file:
> > > https://source.puri.sm/Librem5/librem5-base/-/blob/bb48912242dd0db1f35c6de8425984414c6d37bb/default/audio/ucm2/Librem_5/HiFi.conf
> > > 
> > > As you know I'm no expert with the codec and this definitely can
> > > be
> > > improved: When visualizing the signal, it doesn't look "good" yet
> > > and
> > > the signal strength seems to only go to 50% of the available
> > > scale
> > > (in
> > > the gnome volume setting). Actually I'll talk about this to Guido
> > > tomorrow and even though it is kind of usable now, I hope to that
> > > we
> > > can come up with a profile that we're preliminarliy happy with.
> > Let me forward the commit message I just did for the ucm settings
> > here,
> > now that I have a *bit* of an overview of the codec:
> > 
> > There are 3 Volume controls for the analog parts, all before the
> > ADC.
> > In order from Jack to ADC, they are:
> > 
> > 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
> > 
> > "Input PGA Volume Control". 31=0dB. We use 39=+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
> > 
> > "Right input PGA to Right input Boost-Mixer Gain"
> > 0=0dB. we use 1=+3dB.
> > 
> > 
> > numid=8,iface=MIXER,name='MIXINR IN3R Volume'
> >   ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
> >   : values=6
> >   | dBscale-min=-15.00dB,step=3.00dB,mute=0
> > 
> > 5=0dB. we use 6=+3dB. That's a later amplifier, "Boost-Mixer Gain".
> > 
> > ("quotes" are from the datasheet)
> > 
> > Still, the recording sounds pretty good I think, but since gnome
> > sound-
> > recording doesn't visualize the signal waves - whatever that means
> > :)
> > I'll look at the file in audacity or something similar later.
> > 
> 
> Yeah I have been having a look at your patch you linked. I think
> there are still maybe a couple things I am not sure on. I would
> try removing these two lines:
> 
> cset "name='MIXINR IN3R Switch' on"
> cset "name='MIXINR IN3R Volume' 6"
> 
> I am pretty sure we want to be using the PGA path here. If you
> check Figure 13 in the datasheet, you can route IN3R to
> MIXINR either through the IN3R input or through the PGA input.
> I suspect we want to come through the PGA. Using the IN3R path
> should mean the PGA volume has no effect, it is effectively
> bypassing the PGA. You may need to also add:
> 
> cset "name='MIXINR PGA Switch' on"

ah ok, I think I read Figure 13 wrong then. thanks!

> 
> Although your previous control dumps had that input set
> on. I suspect if you have both enabled you will get some slightly
> weird effects, there is probably a slightly phase delay through
> the PGA and there won't be on the direct path, so when they mix
> together it will likely sound weird.

it was not that bad but with your changes, especially a recorded "s"
sounds indeed better now.

> 
> Hopefully that gets us to a clean signal. The settings described
> in your commit message give +9dB analogue gain which seems
> reasonable to me, and from the patch itself looks like you have
> +15dB digital gain, which feels a little high but not total
> unreasonable.

I left MIXINR PGA Volume at 1 and Capture Volume ("Input PGA Volume
Control") at 39 for now since I think it shouldn't be quieter than that
at least.

> 
> Thanks,
> Charles





[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux