alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Martin Kepplinger <martin.kepplinger@puri.sm>
Cc: alsa-devel@alsa-project.org, kernel@puri.sm,
	patches@opensource.cirrus.com, tiwai@suse.com,
	lgirdwood@gmail.com, broonie@kernel.org, geert@glider.be,
	daniel.baluta@nxp.com
Subject: Re: [PATCH] wm8962: add a simple DMIC enable control
Date: Mon, 7 Feb 2022 14:21:29 +0000	[thread overview]
Message-ID: <20220207142129.GB112838@ediswmail.ad.cirrus.com> (raw)
In-Reply-To: <fca54f527f619e21c19918ed3165d9ec8f85f6f6.camel@puri.sm>

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

  reply	other threads:[~2022-02-07 14:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220201150113.880330-1-martin.kepplinger@puri.sm>
2022-02-02  9:53 ` [PATCH] wm8962: add a simple DMIC enable control Charles Keepax
     [not found]   ` <3542af028b622ec1513810b014c35a94b82a94c0.camel@puri.sm>
2022-02-02 10:46     ` Charles Keepax
     [not found]       ` <99b847d17e8ac399dba10842ec20091df926aa06.camel@puri.sm>
2022-02-02 13:35         ` Charles Keepax
2022-02-03  9:57           ` Martin Kepplinger
2022-02-03 11:05             ` Charles Keepax
2022-02-04  9:43               ` Martin Kepplinger
2022-02-04  9:50                 ` Martin Kepplinger
2022-02-04 17:21                 ` Charles Keepax
2022-02-07 10:49                   ` Martin Kepplinger
2022-02-07 14:21                     ` Charles Keepax [this message]
2022-03-01 13:44                       ` Charles Keepax
2022-03-01 14:00                         ` Martin Kepplinger
2022-03-02 11:48                           ` Martin Kepplinger
2022-03-02 13:40                             ` Charles Keepax
2022-03-02 14:11                               ` Martin Kepplinger
2022-03-03 11:27                                 ` Charles Keepax

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220207142129.GB112838@ediswmail.ad.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=geert@glider.be \
    --cc=kernel@puri.sm \
    --cc=lgirdwood@gmail.com \
    --cc=martin.kepplinger@puri.sm \
    --cc=patches@opensource.cirrus.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).