All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] wm8962: add a simple DMIC enable control
       [not found] <20220201150113.880330-1-martin.kepplinger@puri.sm>
@ 2022-02-02  9:53 ` Charles Keepax
       [not found]   ` <3542af028b622ec1513810b014c35a94b82a94c0.camel@puri.sm>
  0 siblings, 1 reply; 16+ messages in thread
From: Charles Keepax @ 2022-02-02  9:53 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

On Tue, Feb 01, 2022 at 04:01:13PM +0100, Martin Kepplinger wrote:
> In order to use the external mic we need to switch DMIC_ENA off.

When you say external mic do you mean an analogue mic connected
to the INxy pins on the chip?

> I know when DMIC is not used at all, the codec driver does
> snd_soc_dapm_nc_pin(dapm, "DMICDAT"); but I'm not sure how I'd create
> a control based on that.

snd_soc_dapm_nc_pin should be called on DMICDAT if the GPIOs are
not configured for use of a DMIC. And if called DMIC_ENA should
never be set by the driver, since it can't be used as the pins
are not configured to operate as DMICs.

> I'm not yet looking into detection - only making it work when selected
> manually, via ucm. Although I need detection too later.
> 
> While this works when I set the control in ucm, AFAIK the way I do it
> here is not correct though due to dapm.
> 
> I guess this conflicts with the widget:
> SND_SOC_DAPM_AIF_IN("DMIC_ENA", NULL, 0, WM8962_PWR_MGMT_1, 10, 0),
> 
> Do you have any advice for me on how to do what I want?
> 

Yes the DMIC enable should be controlled through DAPM when the
relevant audio path is enabled.

Just to check I understand the problem correctly. You have a system
that has both analogue and digital mics connected, and the
problem is that DMIC_ENA is then permanently enabled, meaning you
can't access the audio from the analogue mics?

Assuming I am correct above, looking through the DAPM graph it does
look like the DMIC is oddly wired. It does appear to be hard wired
into ADCL, which would indeed cause it to be permanently enabled
if the pins are configured for DMIC. Assuming there isn't some
reason the chip can't switch between digital and analogue modes
(I can't see an obvious one in the datasheet), I think really there
is a DAPM mux missing here. There should be a mux connecting both
MIXINL and DMIC_ENA to ADCL/ADCR, rather than them both being
directly connected that would let the user switch between
analogue and digital inputs.

Thanks,
Charles

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
       [not found]   ` <3542af028b622ec1513810b014c35a94b82a94c0.camel@puri.sm>
@ 2022-02-02 10:46     ` Charles Keepax
       [not found]       ` <99b847d17e8ac399dba10842ec20091df926aa06.camel@puri.sm>
  0 siblings, 1 reply; 16+ messages in thread
From: Charles Keepax @ 2022-02-02 10:46 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

On Wed, Feb 02, 2022 at 11:17:34AM +0100, Martin Kepplinger wrote:
> Am Mittwoch, dem 02.02.2022 um 09:53 +0000 schrieb Charles Keepax:
> > On Tue, Feb 01, 2022 at 04:01:13PM +0100, Martin Kepplinger wrote:
> Do you have a code example from a different codec that has roughly what
> is missing here? (the sound subsystem is new to me)

Full disclosure this is complete untested, but it should be
pretty close. Let me know if it does the trick and I will send a
proper patch to the list. I do have a Librem 5 in a draw
somewhere so can pull that out if we get really stuck, but that
might have to wait until the weekend :-).

I don't know if you guys are using the analogue bypass paths
around the digital core on the chip. I think those will still
work with the mics set to digital, so I have left the routes as
is, but that might require some checking at some point.

Thanks,
Charles


diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index a5584ba962dcf..2c41d31956aa8 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -2049,6 +2049,13 @@ static SOC_ENUM_SINGLE_DECL(hpoutl_enum,
 static const struct snd_kcontrol_new hpoutl_mux =
 	SOC_DAPM_ENUM("HPOUTL Mux", hpoutl_enum);
 
+static const char * const input_mode_text[] = { "Analog", "Digital" };
+
+static SOC_ENUM_SINGLE_VIRT_DECL(input_mode_enum, input_mode_text);
+
+static const struct snd_kcontrol_new input_mode_mux =
+	SOC_DAPM_ENUM("Input Mode", input_mode_enum);
+
 static const struct snd_kcontrol_new inpgal[] = {
 SOC_DAPM_SINGLE("IN1L Switch", WM8962_LEFT_INPUT_PGA_CONTROL, 3, 1, 0),
 SOC_DAPM_SINGLE("IN2L Switch", WM8962_LEFT_INPUT_PGA_CONTROL, 2, 1, 0),
@@ -2147,6 +2154,9 @@ SND_SOC_DAPM_MIXER("MIXINR", WM8962_PWR_MGMT_1, 4, 0,
 
 SND_SOC_DAPM_AIF_IN("DMIC_ENA", NULL, 0, WM8962_PWR_MGMT_1, 10, 0),
 
+SND_SOC_DAPM_MUX("Input Mode L", SND_SOC_NOPM, 0, 0, &input_mode_mux),
+SND_SOC_DAPM_MUX("Input Mode R", SND_SOC_NOPM, 0, 0, &input_mode_mux),
+
 SND_SOC_DAPM_ADC("ADCL", "Capture", WM8962_PWR_MGMT_1, 3, 0),
 SND_SOC_DAPM_ADC("ADCR", "Capture", WM8962_PWR_MGMT_1, 2, 0),
 
@@ -2226,16 +2236,19 @@ static const struct snd_soc_dapm_route wm8962_intercon[] = {
 
 	{ "DMIC_ENA", NULL, "DMICDAT" },
 
+	{ "Input Mode L", "Analog", "MIXINL" },
+	{ "Input Mode L", "Digital", "DMIC_ENA" },
+	{ "Input Mode R", "Analog", "MIXINR" },
+	{ "Input Mode R", "Digital", "DMIC_ENA" },
+
 	{ "ADCL", NULL, "SYSCLK" },
 	{ "ADCL", NULL, "TOCLK" },
-	{ "ADCL", NULL, "MIXINL" },
-	{ "ADCL", NULL, "DMIC_ENA" },
+	{ "ADCL", NULL, "Input Mode L" },
 	{ "ADCL", NULL, "DSP2" },
 
 	{ "ADCR", NULL, "SYSCLK" },
 	{ "ADCR", NULL, "TOCLK" },
-	{ "ADCR", NULL, "MIXINR" },
-	{ "ADCR", NULL, "DMIC_ENA" },
+	{ "ADCR", NULL, "Input Mode R" },
 	{ "ADCR", NULL, "DSP2" },
 
 	{ "STL", "Left", "ADCL" },
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
       [not found]       ` <99b847d17e8ac399dba10842ec20091df926aa06.camel@puri.sm>
@ 2022-02-02 13:35         ` Charles Keepax
  2022-02-03  9:57           ` Martin Kepplinger
  0 siblings, 1 reply; 16+ messages in thread
From: Charles Keepax @ 2022-02-02 13:35 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

On Wed, Feb 02, 2022 at 12:55:04PM +0100, Martin Kepplinger wrote:
> Am Mittwoch, dem 02.02.2022 um 10:46 +0000 schrieb Charles Keepax:
> > On Wed, Feb 02, 2022 at 11:17:34AM +0100, Martin Kepplinger wrote:
> > > Am Mittwoch, dem 02.02.2022 um 09:53 +0000 schrieb Charles Keepax:
> > > > On Tue, Feb 01, 2022 at 04:01:13PM +0100, Martin Kepplinger
> > > > wrote:
> > > Do you have a code example from a different codec that has roughly
> > > what
> > > is missing here? (the sound subsystem is new to me)
> > 
> > Full disclosure this is complete untested, but it should be
> > pretty close. Let me know if it does the trick and I will send a
> > proper patch to the list. I do have a Librem 5 in a draw
> > somewhere so can pull that out if we get really stuck, but that
> > might have to wait until the weekend :-).
> > 
> > I don't know if you guys are using the analogue bypass paths
> > around the digital core on the chip. I think those will still
> > work with the mics set to digital, so I have left the routes as
> > is, but that might require some checking at some point.
> 
> ok that's great and seems to work! that's luxury.
> 

Excellent glad that is working for you, I will prep up a proper
patch and send it to the list. Should get that done tomorrow
morning, if I don't manage it this afternoon.

> Volume / sensitivity of Analog input is too low, I saw that before.
> What would you try to change that?
> 

Hmm... you say you saw this before? I assume the input volume
is always low, not just low sometimes? I would probably start by
checking the voltage you have on the micbias, make sure that is
as expected. Does the signal coming into the IN3R pin look low on
a scope or is it just the level after it has been through the ADC
on the chip that seems low?

The input routing on this chip is pretty byzantine, the output of
just "amixer" showing all the controls in the relevant use-case
would probably be helpful to look over. I suspect there is a
reasonable chance something around the input PGA is not
configured to match the hardware, although I am not the most
familiar with this part so hard to guess at exactly what off the
top of my head.

Finally, do you know how much the amplitude is off by?

> you can do all of our tasks if you want to :)
> 

Ha! Not sure about that, but happy to help out where I can.

Thanks,
Charles

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
  2022-02-02 13:35         ` Charles Keepax
@ 2022-02-03  9:57           ` Martin Kepplinger
  2022-02-03 11:05             ` Charles Keepax
  0 siblings, 1 reply; 16+ messages in thread
From: Martin Kepplinger @ 2022-02-03  9:57 UTC (permalink / raw)
  To: Charles Keepax
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

[-- Attachment #1: Type: text/plain, Size: 3121 bytes --]

Am Mittwoch, dem 02.02.2022 um 13:35 +0000 schrieb Charles Keepax:
> On Wed, Feb 02, 2022 at 12:55:04PM +0100, Martin Kepplinger wrote:
> > Am Mittwoch, dem 02.02.2022 um 10:46 +0000 schrieb Charles Keepax:
> > > On Wed, Feb 02, 2022 at 11:17:34AM +0100, Martin Kepplinger
> > > wrote:
> > > > Am Mittwoch, dem 02.02.2022 um 09:53 +0000 schrieb Charles
> > > > Keepax:
> > > > > On Tue, Feb 01, 2022 at 04:01:13PM +0100, Martin Kepplinger
> > > > > wrote:
> > > > Do you have a code example from a different codec that has
> > > > roughly
> > > > what
> > > > is missing here? (the sound subsystem is new to me)
> > > 
> > > Full disclosure this is complete untested, but it should be
> > > pretty close. Let me know if it does the trick and I will send a
> > > proper patch to the list. I do have a Librem 5 in a draw
> > > somewhere so can pull that out if we get really stuck, but that
> > > might have to wait until the weekend :-).
> > > 
> > > I don't know if you guys are using the analogue bypass paths
> > > around the digital core on the chip. I think those will still
> > > work with the mics set to digital, so I have left the routes as
> > > is, but that might require some checking at some point.
> > 
> > ok that's great and seems to work! that's luxury.
> > 
> 
> Excellent glad that is working for you, I will prep up a proper
> patch and send it to the list. Should get that done tomorrow
> morning, if I don't manage it this afternoon.
> 
> > Volume / sensitivity of Analog input is too low, I saw that before.
> > What would you try to change that?
> > 
> 
> Hmm... you say you saw this before? I assume the input volume
> is always low, not just low sometimes? I would probably start by
> checking the voltage you have on the micbias, make sure that is
> as expected. Does the signal coming into the IN3R pin look low on
> a scope or is it just the level after it has been through the ADC
> on the chip that seems low?

Literally *no* effort went into this yet :) All I see is when I set the
"headset mic" volume to max in gnome settings, the recorded volume is
something like "almost usable", so that's off a bit.

I can't easily measure, but different headset mics produce similar
volume.

> 
> The input routing on this chip is pretty byzantine, the output of
> just "amixer" showing all the controls in the relevant use-case
> would probably be helpful to look over. I suspect there is a
> reasonable chance something around the input PGA is not
> configured to match the hardware, although I am not the most
> familiar with this part so hard to guess at exactly what off the
> top of my head.
> 

I append the output of `amixer contents` below.

> Finally, do you know how much the amplitude is off by?

no

> 
> > you can do all of our tasks if you want to :)
> > 
> 
> Ha! Not sure about that, but happy to help out where I can.
> 
> Thanks,
> Charles

:) thank you very much so far. You already really helped. We can even
make the mic available now (to enable manually by the user) while we
look into the volume and detection.

so long, all the best,

                                martin


[-- Attachment #2: amixer_contents.txt --]
[-- Type: text/plain, Size: 19036 bytes --]

numid=1,iface=CARD,name='Headphones Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=off
numid=30,iface=MIXER,name='Headphone Aux Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=7,step=0
  : values=0,0
  | dBscale-min=-7.00dB,step=1.00dB,mute=0
numid=31,iface=MIXER,name='Headphone Mixer Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=29,iface=MIXER,name='Headphone ZC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=28,iface=MIXER,name='Headphone Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=27,iface=MIXER,name='Headphone Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=121,121
  | dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=25,iface=MIXER,name='ADC High Performance Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=22,iface=MIXER,name='ADC L/R Swap Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=24,iface=MIXER,name='ADC Monomix Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=15,iface=MIXER,name='Capture HPF Cutoff'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=0
numid=14,iface=MIXER,name='Capture HPF Mode'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Hi-fi'
  ; Item #1 'Application'
  : values=0
numid=13,iface=MIXER,name='Capture HPF Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=17,iface=MIXER,name='Capture LHPF Mode'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'LPF'
  ; Item #1 'HPF'
  : values=0
numid=16,iface=MIXER,name='Capture LHPF Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=12,iface=MIXER,name='Capture ZC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=11,iface=MIXER,name='Capture Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=10,iface=MIXER,name='Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
  : values=29,29
  | dBscale-min=-23.25dB,step=0.75dB,mute=0
numid=50,iface=MIXER,name='3D Coefficients'
  ; type=BYTES,access=rw------,values=8
  : values=0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
numid=49,iface=MIXER,name='3D Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=63,iface=MIXER,name='ALC Coefficients'
  ; type=BYTES,access=rw------,values=8
  : values=0x00,0x7b,0x00,0x00,0x1c,0x32,0x32,0x00
numid=62,iface=MIXER,name='ALC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=26,iface=MIXER,name='Beep Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=15,step=0
  : values=0
  | dBscale-min=-96.00dB,step=6.00dB,mute=1
numid=20,iface=MIXER,name='DAC High Performance Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=21,iface=MIXER,name='DAC L/R Swap Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=23,iface=MIXER,name='DAC Monomix Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=52,iface=MIXER,name='DF1 Coefficients'
  ; type=BYTES,access=rw------,values=14
  : values=0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
numid=51,iface=MIXER,name='DF1 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=54,iface=MIXER,name='DRC Coefficients'
  ; type=BYTES,access=rw------,values=10
  : values=0x00,0x0c,0x09,0x25,0x00,0x00,0x00,0x00,0x00,0x00
numid=53,iface=MIXER,name='DRC Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=9,iface=MIXER,name='Digital Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=116,116
  | dBscale-min=-72.00dB,step=0.75dB,mute=1
numid=19,iface=MIXER,name='Digital Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=100,100
  | dBscale-min=-72.00dB,step=0.75dB,mute=1
numid=41,iface=MIXER,name='EQ Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=42,iface=MIXER,name='EQ1 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=12,12
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=43,iface=MIXER,name='EQ2 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=12,12
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=44,iface=MIXER,name='EQ3 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=12,12
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=45,iface=MIXER,name='EQ4 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=12,12
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=46,iface=MIXER,name='EQ5 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=13,13
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=47,iface=MIXER,name='EQL Coefficients'
  ; type=BYTES,access=rw------,values=36
  : values=0x0f,0xca,0x04,0x00,0x00,0xd8,0x1e,0xb5,0xf1,0x45,0x0b,0x75,0x01,0xc5,0x1c,0x58,0xf3,0x73,0x0a,0x54,0x05,0x58,0x16,0x8e,0xf8,0x29,0x07,0xad,0x11,0x03,0x05,0x64,0x05,0x59,0x40,0x00
numid=48,iface=MIXER,name='EQR Coefficients'
  ; type=BYTES,access=rw------,values=36
  : values=0x0f,0xca,0x04,0x00,0x00,0xd8,0x1e,0xb5,0xf1,0x45,0x0b,0x75,0x01,0xc5,0x1c,0x58,0xf3,0x73,0x0a,0x54,0x05,0x58,0x16,0x8e,0xf8,0x29,0x07,0xad,0x11,0x03,0x05,0x64,0x05,0x59,0x40,0x00
numid=61,iface=MIXER,name='HD Bass Coefficients'
  ; type=BYTES,access=rw------,values=60
  : values=0x00,0x02,0xbd,0x12,0x00,0x7c,0x58,0x6c,0x00,0x53,0x81,0x21,0x00,0x3f,0x8b,0xd8,0x00,0x32,0xf5,0x2d,0x00,0x65,0xac,0x8c,0x00,0x6b,0xe0,0x87,0x00,0x72,0x14,0x83,0x00,0x72,0x14,0x83,0x00,0x43,0x35,0x25,0x00,0x06,0x6a,0x4a,0x00,0x43,0x60,0x79,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x59,0x99,0x9a
numid=60,iface=MIXER,name='HD Bass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=59,iface=MIXER,name='HPF Coefficients'
  ; type=BYTES,access=rw------,values=2
  : values=0x00,0x00
numid=57,iface=MIXER,name='HPF1 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=58,iface=MIXER,name='HPF2 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=97,iface=MIXER,name='HPMIXL DACL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=98,iface=MIXER,name='HPMIXL DACR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=101,iface=MIXER,name='HPMIXL IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=32,iface=MIXER,name='HPMIXL IN4L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=102,iface=MIXER,name='HPMIXL IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=33,iface=MIXER,name='HPMIXL IN4R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=99,iface=MIXER,name='HPMIXL MIXINL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=34,iface=MIXER,name='HPMIXL MIXINL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=100,iface=MIXER,name='HPMIXL MIXINR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=35,iface=MIXER,name='HPMIXL MIXINR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=103,iface=MIXER,name='HPMIXR DACL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=104,iface=MIXER,name='HPMIXR DACR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=107,iface=MIXER,name='HPMIXR IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=36,iface=MIXER,name='HPMIXR IN4L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=108,iface=MIXER,name='HPMIXR IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=37,iface=MIXER,name='HPMIXR IN4R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=105,iface=MIXER,name='HPMIXR MIXINL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=38,iface=MIXER,name='HPMIXR MIXINL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=106,iface=MIXER,name='HPMIXR MIXINR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=39,iface=MIXER,name='HPMIXR MIXINR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=109,iface=MIXER,name='HPOUTL PGA'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'DAC'
  ; Item #1 'Mixer'
  : values=0
numid=110,iface=MIXER,name='HPOUTR PGA'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'DAC'
  ; Item #1 'Mixer'
  : values=0
numid=80,iface=MIXER,name='INPGAL IN1L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=81,iface=MIXER,name='INPGAL IN2L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=82,iface=MIXER,name='INPGAL IN3L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=83,iface=MIXER,name='INPGAL IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=84,iface=MIXER,name='INPGAR IN1R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=85,iface=MIXER,name='INPGAR IN2R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=86,iface=MIXER,name='INPGAR IN3R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=87,iface=MIXER,name='INPGAR IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=2,iface=MIXER,name='Input Mixer Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,on
numid=94,iface=MIXER,name='Input Mode'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Analog'
  ; Item #1 'Digital'
  : values=1
numid=88,iface=MIXER,name='MIXINL IN2L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=3,iface=MIXER,name='MIXINL IN2L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=89,iface=MIXER,name='MIXINL IN3L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=5,iface=MIXER,name='MIXINL IN3L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=90,iface=MIXER,name='MIXINL PGA Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=4,iface=MIXER,name='MIXINL 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

numid=91,iface=MIXER,name='MIXINR IN2R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=6,iface=MIXER,name='MIXINR IN2R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=92,iface=MIXER,name='MIXINR IN3R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=8,iface=MIXER,name='MIXINR IN3R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=0
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=93,iface=MIXER,name='MIXINR PGA Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
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

numid=111,iface=MIXER,name='SPKOUTL Mixer DACL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=72,iface=MIXER,name='SPKOUTL Mixer DACL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=0
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=112,iface=MIXER,name='SPKOUTL Mixer DACR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=73,iface=MIXER,name='SPKOUTL Mixer DACR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=0
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=115,iface=MIXER,name='SPKOUTL Mixer IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=68,iface=MIXER,name='SPKOUTL Mixer IN4L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=116,iface=MIXER,name='SPKOUTL Mixer IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=69,iface=MIXER,name='SPKOUTL Mixer IN4R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=113,iface=MIXER,name='SPKOUTL Mixer MIXINL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=70,iface=MIXER,name='SPKOUTL Mixer MIXINL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=114,iface=MIXER,name='SPKOUTL Mixer MIXINR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=71,iface=MIXER,name='SPKOUTL Mixer MIXINR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=123,iface=MIXER,name='SPKOUTL PGA'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'DAC'
  ; Item #1 'Mixer'
  : values=0
numid=117,iface=MIXER,name='SPKOUTR Mixer DACL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=78,iface=MIXER,name='SPKOUTR Mixer DACL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=0
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=118,iface=MIXER,name='SPKOUTR Mixer DACR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=79,iface=MIXER,name='SPKOUTR Mixer DACR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=0
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=121,iface=MIXER,name='SPKOUTR Mixer IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=74,iface=MIXER,name='SPKOUTR Mixer IN4L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=122,iface=MIXER,name='SPKOUTR Mixer IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=75,iface=MIXER,name='SPKOUTR Mixer IN4R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=119,iface=MIXER,name='SPKOUTR Mixer MIXINL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=76,iface=MIXER,name='SPKOUTR Mixer MIXINL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=120,iface=MIXER,name='SPKOUTR Mixer MIXINR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=77,iface=MIXER,name='SPKOUTR Mixer MIXINR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=124,iface=MIXER,name='SPKOUTR PGA'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'DAC'
  ; Item #1 'Mixer'
  : values=1
numid=95,iface=MIXER,name='STL'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'None'
  ; Item #1 'Left'
  ; Item #2 'Right'
  : values=0
numid=96,iface=MIXER,name='STR'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'None'
  ; Item #1 'Left'
  ; Item #2 'Right'
  : values=0
numid=18,iface=MIXER,name='Sidetone Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=12,step=0
  : values=0,0
  | dBscale-min=-36.00dB,step=3.00dB,mute=0
numid=40,iface=MIXER,name='Speaker Boost Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=6
  | dBrange-
    rangemin=0,,rangemax=6
      | dBscale-min=0.00dB,step=1.50dB,mute=0
    rangemin=7,,rangemax=7
      | dBscale-min=12.00dB,step=0.00dB,mute=0

numid=67,iface=MIXER,name='Speaker Mixer Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=65,iface=MIXER,name='Speaker Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,off
numid=64,iface=MIXER,name='Speaker Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=121,121
  | dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=66,iface=MIXER,name='Speaker ZC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=56,iface=MIXER,name='VSS Coefficients'
  ; type=BYTES,access=rw------,values=296
  : values=0x00,0x8c,0x02,0x00,0x00,0x35,0x07,0x00,0x00,0x3a,0x41,0x00,0x00,0x8b,0x7d,0x00,0x00,0x3a,0x41,0x00,0x00,0x8c,0xfe,0xe8,0x00,0x78,0x00,0x00,0x00,0x3f,0xb2,0x60,0x00,0x2d,0x18,0x18,0x00,0x20,0x00,0x00,0x00,0xf1,0x83,0x40,0x00,0xfb,0x83,0x00,0x00,0xee,0xae,0xc0,0x00,0xfb,0xac,0x40,0x00,0xf1,0x7f,0x80,0x00,0xf4,0x3b,0x40,0x00,0xf5,0xfb,0x00,0x00,0xea,0x10,0xc0,0x00,0xfc,0xc5,0x80,0x00,0xe2,0x75,0xc0,0x00,0x04,0xb4,0x80,0x00,0xd4,0xf9,0x80,0x00,0x04,0x91,0x40,0x00,0xd8,0xa4,0x80,0x00,0x02,0x3d,0xc0,0x00,0xcf,0x7a,0x80,0x00,0xdc,0x06,0x00,0x00,0xf2,0xda,0xc0,0x00,0xba,0xf3,0x40,0x00,0x0a,0x79,0x40,0x00,0x1c,0x06,0x80,0x00,0xfd,0x2d,0x00,0x00,0x1c,0xe8,0x40,0x00,0x0d,0xdc,0x40,0x00,0xfc,0x9d,0x00,0x00,0x09,0x55,0x80,0x00,0xfe,0x7e,0x80,0x00,0x0e,0xab,0x40,0x00,0xf9,0x98,0x80,0x00,0x09,0x87,0xc0,0x00,0xfd,0x2c,0x40,0x00,0x09,0x48,0x00,0x00,0x03,0x5f,0x40,0x00,0x00,0x87,0x00,0x00,0xfa,0xe4,0xc0,0x00,0x00,0x0b,0x40,0x00,0x04,0xe1,0x80,0x00,0x01,0x1f,0x40,0x00,0xf8,0xb0,0x00,0x00,0xfb,0xcb,0xc0,0x00,0x04,0xf3,0x80,0x00,0x07,0xdf,0x40,0x00,0xff,0x07,0x00,0x00,0xef,0xd7,0x00,0x00,0xfb,0xaf,0x40,0x00,0x10,0x8a,0x80,0x00,0x11,0x07,0xc0,0x00,0xe0,0x08,0x00,0x00,0xd2,0x76,0x00,0x00,0x20,0xcf,0x40,0x00,0x30,0x23,0x40,0x00,0xfd,0x69,0xc0,0x00,0x28,0x35,0x00,0x00,0x06,0x33,0x00,0x00,0xd9,0xf6,0xc0,0x00,0xf3,0x33,0x40,0x00,0x0f,0x42,0x00,0x00,0x04,0x0c,0x80,0x00,0xfb,0x3f,0x80,0x00,0xf7,0x57,0xc0,0x00,0x03,0x54,0x00,0x00,0x00,0xc6,0xc0,0x00,0x03,0x12,0xc0,0x00,0xfd,0x85,0x80
numid=55,iface=MIXER,name='VSS Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
  2022-02-03  9:57           ` Martin Kepplinger
@ 2022-02-03 11:05             ` Charles Keepax
  2022-02-04  9:43               ` Martin Kepplinger
  0 siblings, 1 reply; 16+ messages in thread
From: Charles Keepax @ 2022-02-03 11:05 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

On Thu, Feb 03, 2022 at 10:57:44AM +0100, Martin Kepplinger wrote:
> Am Mittwoch, dem 02.02.2022 um 13:35 +0000 schrieb Charles Keepax:
> > On Wed, Feb 02, 2022 at 12:55:04PM +0100, Martin Kepplinger wrote:
> > > Am Mittwoch, dem 02.02.2022 um 10:46 +0000 schrieb Charles Keepax:
> > > > On Wed, Feb 02, 2022 at 11:17:34AM +0100, Martin Kepplinger
> > > > wrote:
> > > > > Am Mittwoch, dem 02.02.2022 um 09:53 +0000 schrieb Charles
> > > > > Keepax:
> > > > > > On Tue, Feb 01, 2022 at 04:01:13PM +0100, Martin Kepplinger
> > > > > > wrote:
> > > Volume / sensitivity of Analog input is too low, I saw that before.
> > > What would you try to change that?
> > > 
> > 
> > Hmm... you say you saw this before? I assume the input volume
> > is always low, not just low sometimes? I would probably start by
> > checking the voltage you have on the micbias, make sure that is
> > as expected. Does the signal coming into the IN3R pin look low on
> > a scope or is it just the level after it has been through the ADC
> > on the chip that seems low?
> 
> Literally *no* effort went into this yet :) All I see is when I set the
> "headset mic" volume to max in gnome settings, the recorded volume is
> something like "almost usable", so that's off a bit.
> 
> I can't easily measure, but different headset mics produce similar
> volume.
> 

No problem keep me posted any additional tests/info you guys get
might help out here. Looking through your routing I think you are
sending the mic directly to the speaker, I would definitely test
capturing the signal over the I2S as well to confirm it is
consistently a low volume on both paths.

> :) thank you very much so far. You already really helped. We can even
> make the mic available now (to enable manually by the user) while we
> look into the volume and detection.
> 

Happy to help, please feel free to keep the questions/debug info
coming.

> numid=11,iface=MIXER,name='Capture Switch'
>   ; type=BOOLEAN,access=rw------,values=2
>   : values=off,off

Ermm.... this should be muting the input PGA? I wouldn't expect
any input from the analogue here.

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

This is the PGA volume on the inputs and appears to be set to
-1.5dB. Not sure if that might be part of the problem?

> numid=23,iface=MIXER,name='DAC Monomix Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=9,iface=MIXER,name='Digital Capture Volume'
>   ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
>   : values=116,116
>   | dBscale-min=-72.00dB,step=0.75dB,mute=1

This looks set to +15dB at the moment, so presumably no problem
here.

> numid=84,iface=MIXER,name='INPGAR IN1R Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off

This is a total random hunch and might just be my unfamilarity
with the chip. But I would definitely try a test with this switch
turned on. From the input circuitry diagrams in the data sheet
kinda looks like it will be needed to connect one side of the
input PGA to the grounded output in your schematic.

> numid=85,iface=MIXER,name='INPGAR IN2R Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=86,iface=MIXER,name='INPGAR IN3R Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=87,iface=MIXER,name='INPGAR IN4R Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=2,iface=MIXER,name='Input Mixer Switch'
>   ; type=BOOLEAN,access=rw------,values=2
>   : values=off,on
> numid=94,iface=MIXER,name='Input Mode'
>   ; type=ENUMERATED,access=rw------,values=1,items=2
>   ; Item #0 'Analog'
>   ; Item #1 'Digital'
>   : values=1

Ah... I think you have the wrong path configured here. This
appears to be coming from the digital mics. Just to confirm it is
the analog mics you are having issues with?

> numid=91,iface=MIXER,name='MIXINR IN2R Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=6,iface=MIXER,name='MIXINR IN2R Volume'
>   ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
>   : values=7
>   | dBscale-min=-15.00dB,step=3.00dB,mute=0
> numid=92,iface=MIXER,name='MIXINR IN3R Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=8,iface=MIXER,name='MIXINR IN3R Volume'
>   ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
>   : values=0
>   | dBscale-min=-15.00dB,step=3.00dB,mute=0
> numid=93,iface=MIXER,name='MIXINR PGA Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> 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
> 

Plenty of gain on the PGA.

> numid=65,iface=MIXER,name='Speaker Switch'
>   ; type=BOOLEAN,access=rw------,values=2
>   : values=on,off
> numid=64,iface=MIXER,name='Speaker Volume'
>   ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
>   : values=121,121
>   | dBscale-min=-121.00dB,step=1.00dB,mute=1

Thanks,
Charles

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
  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
  0 siblings, 2 replies; 16+ messages in thread
From: Martin Kepplinger @ 2022-02-04  9:43 UTC (permalink / raw)
  To: Charles Keepax
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

[-- Attachment #1: Type: text/plain, Size: 4187 bytes --]

Am Donnerstag, dem 03.02.2022 um 11:05 +0000 schrieb Charles Keepax:
> On Thu, Feb 03, 2022 at 10:57:44AM +0100, Martin Kepplinger wrote:
> > Am Mittwoch, dem 02.02.2022 um 13:35 +0000 schrieb Charles Keepax:
> > > On Wed, Feb 02, 2022 at 12:55:04PM +0100, Martin Kepplinger
> > > wrote:
> > > > Am Mittwoch, dem 02.02.2022 um 10:46 +0000 schrieb Charles
> > > > Keepax:
> > > > > On Wed, Feb 02, 2022 at 11:17:34AM +0100, Martin Kepplinger
> > > > > wrote:
> > > > > > Am Mittwoch, dem 02.02.2022 um 09:53 +0000 schrieb Charles
> > > > > > Keepax:
> > > > > > > On Tue, Feb 01, 2022 at 04:01:13PM +0100, Martin
> > > > > > > Kepplinger
> > > > > > > wrote:
> > > > Volume / sensitivity of Analog input is too low, I saw that
> > > > before.
> > > > What would you try to change that?
> > > > 
> > > 
> > > Hmm... you say you saw this before? I assume the input volume
> > > is always low, not just low sometimes? I would probably start by
> > > checking the voltage you have on the micbias, make sure that is
> > > as expected. Does the signal coming into the IN3R pin look low on
> > > a scope or is it just the level after it has been through the ADC
> > > on the chip that seems low?
> > 
> > Literally *no* effort went into this yet :) All I see is when I set
> > the
> > "headset mic" volume to max in gnome settings, the recorded volume
> > is
> > something like "almost usable", so that's off a bit.
> > 
> > I can't easily measure, but different headset mics produce similar
> > volume.
> > 
> 
> No problem keep me posted any additional tests/info you guys get
> might help out here. Looking through your routing I think you are
> sending the mic directly to the speaker, I would definitely test
> capturing the signal over the I2S as well to confirm it is
> consistently a low volume on both paths.
> 
> > :) thank you very much so far. You already really helped. We can
> > even
> > make the mic available now (to enable manually by the user) while
> > we
> > look into the volume and detection.
> > 
> 
> Happy to help, please feel free to keep the questions/debug info
> coming.

yes my bad :) If I may, just let me describe my situation again and see
whether anything else comes to your mind.

It's weird but I when I set "Capture Volume" to 60 instead of 29, I
didn't hear a difference.

So far I don't hear a difference when setting "INPGAR IN1R Switch" on.

Does "Value" in this ucm description make any sense to you?

EnableSequence [                                                      
                cset "name='Digital Capture Volume' 127,127"          
                cset "name='Capture Volume' 63,63"                    
                cset "name='MIXINR IN3R Switch' on"                   
                cset "name='MIXINR IN3R Volume' 7"                    
                cset "name='INPGAR IN1R Switch' on"                   
                cset "name='Input Mode' Analog"                       
        ]                                                             
                                                                      
DisableSequence [                                                     
                cset "name='INPGAR IN1R Switch' off"                  
                cset "name='MIXINR IN3R Switch' off"                  
                cset "name='MIXINR IN3R Volume' 0"                    
                cset "name='Input Mode' Digital"                      
        ]                                                             
                                                                      
Value {                                                               
                CapturePriority "100"                                 
                CaptureChannels "2"                                   
                CaptureSwitch "name='MIXINR IN3R Volume'"             
                CaptureSwitch "name='MIXINR IN3R Switch'"             
                CapturePCM "hw:${CardId},0"                           
                JackControl "Headphones Jack"                         
        }


Let me just append the correct amixer contents where I hear my usual
"quiet and bad signal" recording:



[-- Attachment #2: amixer_contents_headset.txt --]
[-- Type: text/plain, Size: 19034 bytes --]

numid=1,iface=CARD,name='Headphones Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=30,iface=MIXER,name='Headphone Aux Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=7,step=0
  : values=0,0
  | dBscale-min=-7.00dB,step=1.00dB,mute=0
numid=31,iface=MIXER,name='Headphone Mixer Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=29,iface=MIXER,name='Headphone ZC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=28,iface=MIXER,name='Headphone Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=27,iface=MIXER,name='Headphone Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=121,121
  | dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=25,iface=MIXER,name='ADC High Performance Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=22,iface=MIXER,name='ADC L/R Swap Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=24,iface=MIXER,name='ADC Monomix Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=15,iface=MIXER,name='Capture HPF Cutoff'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=0
numid=14,iface=MIXER,name='Capture HPF Mode'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Hi-fi'
  ; Item #1 'Application'
  : values=0
numid=13,iface=MIXER,name='Capture HPF Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=17,iface=MIXER,name='Capture LHPF Mode'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'LPF'
  ; Item #1 'HPF'
  : values=0
numid=16,iface=MIXER,name='Capture LHPF Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=12,iface=MIXER,name='Capture ZC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=11,iface=MIXER,name='Capture Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
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
numid=50,iface=MIXER,name='3D Coefficients'
  ; type=BYTES,access=rw------,values=8
  : values=0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
numid=49,iface=MIXER,name='3D Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=63,iface=MIXER,name='ALC Coefficients'
  ; type=BYTES,access=rw------,values=8
  : values=0x00,0x7b,0x00,0x00,0x1c,0x32,0x32,0x00
numid=62,iface=MIXER,name='ALC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=26,iface=MIXER,name='Beep Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=15,step=0
  : values=0
  | dBscale-min=-96.00dB,step=6.00dB,mute=1
numid=20,iface=MIXER,name='DAC High Performance Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=21,iface=MIXER,name='DAC L/R Swap Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=23,iface=MIXER,name='DAC Monomix Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=52,iface=MIXER,name='DF1 Coefficients'
  ; type=BYTES,access=rw------,values=14
  : values=0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
numid=51,iface=MIXER,name='DF1 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=54,iface=MIXER,name='DRC Coefficients'
  ; type=BYTES,access=rw------,values=10
  : values=0x00,0x0c,0x09,0x25,0x00,0x00,0x00,0x00,0x00,0x00
numid=53,iface=MIXER,name='DRC Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=9,iface=MIXER,name='Digital Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=127,127
  | dBscale-min=-72.00dB,step=0.75dB,mute=1
numid=19,iface=MIXER,name='Digital Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=100,100
  | dBscale-min=-72.00dB,step=0.75dB,mute=1
numid=41,iface=MIXER,name='EQ Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=42,iface=MIXER,name='EQ1 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=12,12
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=43,iface=MIXER,name='EQ2 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=12,12
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=44,iface=MIXER,name='EQ3 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=12,12
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=45,iface=MIXER,name='EQ4 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=12,12
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=46,iface=MIXER,name='EQ5 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=13,13
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=47,iface=MIXER,name='EQL Coefficients'
  ; type=BYTES,access=rw------,values=36
  : values=0x0f,0xca,0x04,0x00,0x00,0xd8,0x1e,0xb5,0xf1,0x45,0x0b,0x75,0x01,0xc5,0x1c,0x58,0xf3,0x73,0x0a,0x54,0x05,0x58,0x16,0x8e,0xf8,0x29,0x07,0xad,0x11,0x03,0x05,0x64,0x05,0x59,0x40,0x00
numid=48,iface=MIXER,name='EQR Coefficients'
  ; type=BYTES,access=rw------,values=36
  : values=0x0f,0xca,0x04,0x00,0x00,0xd8,0x1e,0xb5,0xf1,0x45,0x0b,0x75,0x01,0xc5,0x1c,0x58,0xf3,0x73,0x0a,0x54,0x05,0x58,0x16,0x8e,0xf8,0x29,0x07,0xad,0x11,0x03,0x05,0x64,0x05,0x59,0x40,0x00
numid=61,iface=MIXER,name='HD Bass Coefficients'
  ; type=BYTES,access=rw------,values=60
  : values=0x00,0x02,0xbd,0x12,0x00,0x7c,0x58,0x6c,0x00,0x53,0x81,0x21,0x00,0x3f,0x8b,0xd8,0x00,0x32,0xf5,0x2d,0x00,0x65,0xac,0x8c,0x00,0x6b,0xe0,0x87,0x00,0x72,0x14,0x83,0x00,0x72,0x14,0x83,0x00,0x43,0x35,0x25,0x00,0x06,0x6a,0x4a,0x00,0x43,0x60,0x79,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x59,0x99,0x9a
numid=60,iface=MIXER,name='HD Bass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=59,iface=MIXER,name='HPF Coefficients'
  ; type=BYTES,access=rw------,values=2
  : values=0x00,0x00
numid=57,iface=MIXER,name='HPF1 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=58,iface=MIXER,name='HPF2 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=97,iface=MIXER,name='HPMIXL DACL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=98,iface=MIXER,name='HPMIXL DACR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=101,iface=MIXER,name='HPMIXL IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=32,iface=MIXER,name='HPMIXL IN4L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=102,iface=MIXER,name='HPMIXL IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=33,iface=MIXER,name='HPMIXL IN4R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=99,iface=MIXER,name='HPMIXL MIXINL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=34,iface=MIXER,name='HPMIXL MIXINL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=100,iface=MIXER,name='HPMIXL MIXINR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=35,iface=MIXER,name='HPMIXL MIXINR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=103,iface=MIXER,name='HPMIXR DACL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=104,iface=MIXER,name='HPMIXR DACR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=107,iface=MIXER,name='HPMIXR IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=36,iface=MIXER,name='HPMIXR IN4L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=108,iface=MIXER,name='HPMIXR IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=37,iface=MIXER,name='HPMIXR IN4R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=105,iface=MIXER,name='HPMIXR MIXINL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=38,iface=MIXER,name='HPMIXR MIXINL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=106,iface=MIXER,name='HPMIXR MIXINR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=39,iface=MIXER,name='HPMIXR MIXINR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=109,iface=MIXER,name='HPOUTL PGA'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'DAC'
  ; Item #1 'Mixer'
  : values=0
numid=110,iface=MIXER,name='HPOUTR PGA'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'DAC'
  ; Item #1 'Mixer'
  : values=0
numid=80,iface=MIXER,name='INPGAL IN1L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=81,iface=MIXER,name='INPGAL IN2L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=82,iface=MIXER,name='INPGAL IN3L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=83,iface=MIXER,name='INPGAL IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=84,iface=MIXER,name='INPGAR IN1R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=85,iface=MIXER,name='INPGAR IN2R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=86,iface=MIXER,name='INPGAR IN3R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=87,iface=MIXER,name='INPGAR IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=2,iface=MIXER,name='Input Mixer Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,on
numid=94,iface=MIXER,name='Input Mode'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Analog'
  ; Item #1 'Digital'
  : values=0
numid=88,iface=MIXER,name='MIXINL IN2L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=3,iface=MIXER,name='MIXINL IN2L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=89,iface=MIXER,name='MIXINL IN3L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=5,iface=MIXER,name='MIXINL IN3L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=90,iface=MIXER,name='MIXINL PGA Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=4,iface=MIXER,name='MIXINL 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

numid=91,iface=MIXER,name='MIXINR IN2R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=6,iface=MIXER,name='MIXINR IN2R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=92,iface=MIXER,name='MIXINR IN3R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=8,iface=MIXER,name='MIXINR IN3R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=93,iface=MIXER,name='MIXINR PGA Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
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

numid=111,iface=MIXER,name='SPKOUTL Mixer DACL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=72,iface=MIXER,name='SPKOUTL Mixer DACL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=0
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=112,iface=MIXER,name='SPKOUTL Mixer DACR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=73,iface=MIXER,name='SPKOUTL Mixer DACR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=0
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=115,iface=MIXER,name='SPKOUTL Mixer IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=68,iface=MIXER,name='SPKOUTL Mixer IN4L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=116,iface=MIXER,name='SPKOUTL Mixer IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=69,iface=MIXER,name='SPKOUTL Mixer IN4R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=113,iface=MIXER,name='SPKOUTL Mixer MIXINL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=70,iface=MIXER,name='SPKOUTL Mixer MIXINL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=114,iface=MIXER,name='SPKOUTL Mixer MIXINR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=71,iface=MIXER,name='SPKOUTL Mixer MIXINR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=123,iface=MIXER,name='SPKOUTL PGA'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'DAC'
  ; Item #1 'Mixer'
  : values=1
numid=117,iface=MIXER,name='SPKOUTR Mixer DACL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=78,iface=MIXER,name='SPKOUTR Mixer DACL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=0
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=118,iface=MIXER,name='SPKOUTR Mixer DACR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=79,iface=MIXER,name='SPKOUTR Mixer DACR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=0
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=121,iface=MIXER,name='SPKOUTR Mixer IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=74,iface=MIXER,name='SPKOUTR Mixer IN4L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=122,iface=MIXER,name='SPKOUTR Mixer IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=75,iface=MIXER,name='SPKOUTR Mixer IN4R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=119,iface=MIXER,name='SPKOUTR Mixer MIXINL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=76,iface=MIXER,name='SPKOUTR Mixer MIXINL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=120,iface=MIXER,name='SPKOUTR Mixer MIXINR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=77,iface=MIXER,name='SPKOUTR Mixer MIXINR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=124,iface=MIXER,name='SPKOUTR PGA'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'DAC'
  ; Item #1 'Mixer'
  : values=1
numid=95,iface=MIXER,name='STL'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'None'
  ; Item #1 'Left'
  ; Item #2 'Right'
  : values=0
numid=96,iface=MIXER,name='STR'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'None'
  ; Item #1 'Left'
  ; Item #2 'Right'
  : values=0
numid=18,iface=MIXER,name='Sidetone Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=12,step=0
  : values=0,0
  | dBscale-min=-36.00dB,step=3.00dB,mute=0
numid=40,iface=MIXER,name='Speaker Boost Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=6
  | dBrange-
    rangemin=0,,rangemax=6
      | dBscale-min=0.00dB,step=1.50dB,mute=0
    rangemin=7,,rangemax=7
      | dBscale-min=12.00dB,step=0.00dB,mute=0

numid=67,iface=MIXER,name='Speaker Mixer Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=65,iface=MIXER,name='Speaker Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=64,iface=MIXER,name='Speaker Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=121,121
  | dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=66,iface=MIXER,name='Speaker ZC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=56,iface=MIXER,name='VSS Coefficients'
  ; type=BYTES,access=rw------,values=296
  : values=0x00,0x8c,0x02,0x00,0x00,0x35,0x07,0x00,0x00,0x3a,0x41,0x00,0x00,0x8b,0x7d,0x00,0x00,0x3a,0x41,0x00,0x00,0x8c,0xfe,0xe8,0x00,0x78,0x00,0x00,0x00,0x3f,0xb2,0x60,0x00,0x2d,0x18,0x18,0x00,0x20,0x00,0x00,0x00,0xf1,0x83,0x40,0x00,0xfb,0x83,0x00,0x00,0xee,0xae,0xc0,0x00,0xfb,0xac,0x40,0x00,0xf1,0x7f,0x80,0x00,0xf4,0x3b,0x40,0x00,0xf5,0xfb,0x00,0x00,0xea,0x10,0xc0,0x00,0xfc,0xc5,0x80,0x00,0xe2,0x75,0xc0,0x00,0x04,0xb4,0x80,0x00,0xd4,0xf9,0x80,0x00,0x04,0x91,0x40,0x00,0xd8,0xa4,0x80,0x00,0x02,0x3d,0xc0,0x00,0xcf,0x7a,0x80,0x00,0xdc,0x06,0x00,0x00,0xf2,0xda,0xc0,0x00,0xba,0xf3,0x40,0x00,0x0a,0x79,0x40,0x00,0x1c,0x06,0x80,0x00,0xfd,0x2d,0x00,0x00,0x1c,0xe8,0x40,0x00,0x0d,0xdc,0x40,0x00,0xfc,0x9d,0x00,0x00,0x09,0x55,0x80,0x00,0xfe,0x7e,0x80,0x00,0x0e,0xab,0x40,0x00,0xf9,0x98,0x80,0x00,0x09,0x87,0xc0,0x00,0xfd,0x2c,0x40,0x00,0x09,0x48,0x00,0x00,0x03,0x5f,0x40,0x00,0x00,0x87,0x00,0x00,0xfa,0xe4,0xc0,0x00,0x00,0x0b,0x40,0x00,0x04,0xe1,0x80,0x00,0x01,0x1f,0x40,0x00,0xf8,0xb0,0x00,0x00,0xfb,0xcb,0xc0,0x00,0x04,0xf3,0x80,0x00,0x07,0xdf,0x40,0x00,0xff,0x07,0x00,0x00,0xef,0xd7,0x00,0x00,0xfb,0xaf,0x40,0x00,0x10,0x8a,0x80,0x00,0x11,0x07,0xc0,0x00,0xe0,0x08,0x00,0x00,0xd2,0x76,0x00,0x00,0x20,0xcf,0x40,0x00,0x30,0x23,0x40,0x00,0xfd,0x69,0xc0,0x00,0x28,0x35,0x00,0x00,0x06,0x33,0x00,0x00,0xd9,0xf6,0xc0,0x00,0xf3,0x33,0x40,0x00,0x0f,0x42,0x00,0x00,0x04,0x0c,0x80,0x00,0xfb,0x3f,0x80,0x00,0xf7,0x57,0xc0,0x00,0x03,0x54,0x00,0x00,0x00,0xc6,0xc0,0x00,0x03,0x12,0xc0,0x00,0xfd,0x85,0x80
numid=55,iface=MIXER,name='VSS Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
  2022-02-04  9:43               ` Martin Kepplinger
@ 2022-02-04  9:50                 ` Martin Kepplinger
  2022-02-04 17:21                 ` Charles Keepax
  1 sibling, 0 replies; 16+ messages in thread
From: Martin Kepplinger @ 2022-02-04  9:50 UTC (permalink / raw)
  To: Charles Keepax
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

Am Freitag, dem 04.02.2022 um 10:43 +0100 schrieb Martin Kepplinger:
> Am Donnerstag, dem 03.02.2022 um 11:05 +0000 schrieb Charles Keepax:
> > On Thu, Feb 03, 2022 at 10:57:44AM +0100, Martin Kepplinger wrote:
> > > Am Mittwoch, dem 02.02.2022 um 13:35 +0000 schrieb Charles
> > > Keepax:
> > > > On Wed, Feb 02, 2022 at 12:55:04PM +0100, Martin Kepplinger
> > > > wrote:
> > > > > Am Mittwoch, dem 02.02.2022 um 10:46 +0000 schrieb Charles
> > > > > Keepax:
> > > > > > On Wed, Feb 02, 2022 at 11:17:34AM +0100, Martin Kepplinger
> > > > > > wrote:
> > > > > > > Am Mittwoch, dem 02.02.2022 um 09:53 +0000 schrieb
> > > > > > > Charles
> > > > > > > Keepax:
> > > > > > > > On Tue, Feb 01, 2022 at 04:01:13PM +0100, Martin
> > > > > > > > Kepplinger
> > > > > > > > wrote:
> > > > > Volume / sensitivity of Analog input is too low, I saw that
> > > > > before.
> > > > > What would you try to change that?
> > > > > 
> > > > 
> > > > Hmm... you say you saw this before? I assume the input volume
> > > > is always low, not just low sometimes? I would probably start
> > > > by
> > > > checking the voltage you have on the micbias, make sure that is
> > > > as expected. Does the signal coming into the IN3R pin look low
> > > > on
> > > > a scope or is it just the level after it has been through the
> > > > ADC
> > > > on the chip that seems low?
> > > 
> > > Literally *no* effort went into this yet :) All I see is when I
> > > set
> > > the
> > > "headset mic" volume to max in gnome settings, the recorded
> > > volume
> > > is
> > > something like "almost usable", so that's off a bit.
> > > 
> > > I can't easily measure, but different headset mics produce
> > > similar
> > > volume.
> > > 
> > 
> > No problem keep me posted any additional tests/info you guys get
> > might help out here. Looking through your routing I think you are
> > sending the mic directly to the speaker, I would definitely test
> > capturing the signal over the I2S as well to confirm it is
> > consistently a low volume on both paths.
> > 
> > > :) thank you very much so far. You already really helped. We can
> > > even
> > > make the mic available now (to enable manually by the user) while
> > > we
> > > look into the volume and detection.
> > > 
> > 
> > Happy to help, please feel free to keep the questions/debug info
> > coming.
> 
> yes my bad :) If I may, just let me describe my situation again and
> see
> whether anything else comes to your mind.
> 
> It's weird but I when I set "Capture Volume" to 60 instead of 29, I
> didn't hear a difference.
> 
> So far I don't hear a difference when setting "INPGAR IN1R Switch"
> on.
> 
> Does "Value" in this ucm description make any sense to you?
> 
> EnableSequence [                                                     
>                 cset "name='Digital Capture Volume' 127,127"         
>                 cset "name='Capture Volume' 63,63"                   
>                 cset "name='MIXINR IN3R Switch' on"                  
>                 cset "name='MIXINR IN3R Volume' 7"                   
>                 cset "name='INPGAR IN1R Switch' on"                  
>                 cset "name='Input Mode' Analog"                      
>         ]                                                            
>                                                                      
> DisableSequence [                                                    
>                 cset "name='INPGAR IN1R Switch' off"                 
>                 cset "name='MIXINR IN3R Switch' off"                 
>                 cset "name='MIXINR IN3R Volume' 0"                   
>                 cset "name='Input Mode' Digital"                     
>         ]                                                            
>                                                                      
> Value {                                                              
>                 CapturePriority "100"                                
>                 CaptureChannels "2"                                  
>                 CaptureSwitch "name='MIXINR IN3R Volume'"

sorry, of course this is a typo I've fixed: CaptureVolume

>             
>                 CaptureSwitch "name='MIXINR IN3R Switch'"            
>                 CapturePCM "hw:${CardId},0"                          
>                 JackControl "Headphones Jack"

I know this is a workaround until I have mic detection.

>  
>         }
> 
> 
> Let me just append the correct amixer contents where I hear my usual
> "quiet and bad signal" recording:
> 
> 



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
  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
  1 sibling, 1 reply; 16+ messages in thread
From: Charles Keepax @ 2022-02-04 17:21 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

On Fri, Feb 04, 2022 at 10:43:53AM +0100, Martin Kepplinger wrote:
> yes my bad :) If I may, just let me describe my situation again and see
> whether anything else comes to your mind.
> 
> It's weird but I when I set "Capture Volume" to 60 instead of 29, I
> didn't hear a difference.
> 
> So far I don't hear a difference when setting "INPGAR IN1R Switch" on.
> 
> Does "Value" in this ucm description make any sense to you?

Mostly a couple comments inline.

> 
> EnableSequence [                                                      
>                 cset "name='Digital Capture Volume' 127,127"          
>                 cset "name='Capture Volume' 63,63"                    
>                 cset "name='MIXINR IN3R Switch' on"                   
>                 cset "name='MIXINR IN3R Volume' 7"                    
>                 cset "name='INPGAR IN1R Switch' on"                   
>                 cset "name='Input Mode' Analog"                       

Little hard to say without the rest of the ucm file (happy to
have a look at that if you had a handy link?), but this
looks a bit weird. Why are you connecting the MIXINR IN3R stuff
here, you want to go through the PGA most likely?

>         ]                                                             
>                                                                       
> DisableSequence [                                                     
>                 cset "name='INPGAR IN1R Switch' off"                  
>                 cset "name='MIXINR IN3R Switch' off"                  
>                 cset "name='MIXINR IN3R Volume' 0"                    
>                 cset "name='Input Mode' Digital"                      
>         ]                                                             
>                                                                       
> Value {                                                               
>                 CapturePriority "100"                                 
>                 CaptureChannels "2"                                   
>                 CaptureSwitch "name='MIXINR IN3R Volume'"             

This should probably be CaptureVolume, rather than CaptureSwitch.

>                 CaptureSwitch "name='MIXINR IN3R Switch'"             
>                 CapturePCM "hw:${CardId},0"                           
>                 JackControl "Headphones Jack"                         

Assuming your machine driver creates an appropriately named
control.

>         }
> 
> 
> Let me just append the correct amixer contents where I hear my usual
> "quiet and bad signal" recording:

> numid=11,iface=MIXER,name='Capture Switch'
>   ; type=BOOLEAN,access=rw------,values=2
>   : values=off,off

This still looks weird, I wouldn't expect you would hear anything
with the "Capture Switch" off, it mutes the PGA. Can you confirm
if this is on whilst you are actually capturing audio?

> numid=84,iface=MIXER,name='INPGAR IN1R Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on

I definitely would consider turning this on as just a test thing
not a recommendation on how the part should be used, until we see
if it helps. It was just a weird hunch, I feel the routing is
probably more sensible without it.

> 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.

Thanks,
Charles

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
  2022-02-04 17:21                 ` Charles Keepax
@ 2022-02-07 10:49                   ` Martin Kepplinger
  2022-02-07 14:21                     ` Charles Keepax
  0 siblings, 1 reply; 16+ messages in thread
From: Martin Kepplinger @ 2022-02-07 10:49 UTC (permalink / raw)
  To: Charles Keepax
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

[-- Attachment #1: Type: text/plain, Size: 6191 bytes --]

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:
> > yes my bad :) If I may, just let me describe my situation again and
> > see
> > whether anything else comes to your mind.
> > 
> > It's weird but I when I set "Capture Volume" to 60 instead of 29, I
> > didn't hear a difference.
> > 
> > So far I don't hear a difference when setting "INPGAR IN1R Switch"
> > on.
> > 
> > Does "Value" in this ucm description make any sense to you?
> 
> Mostly a couple comments inline.
> 
> > 
> > EnableSequence
> > [                                                      
> >                 cset "name='Digital Capture Volume'
> > 127,127"          
> >                 cset "name='Capture Volume'
> > 63,63"                    
> >                 cset "name='MIXINR IN3R Switch'
> > on"                   
> >                 cset "name='MIXINR IN3R Volume'
> > 7"                    
> >                 cset "name='INPGAR IN1R Switch'
> > on"                   
> >                 cset "name='Input Mode'
> > Analog"                       
> 
> Little hard to say without the rest of the ucm file (happy to
> have a look at that if you had a handy link?), but this
> looks a bit weird. Why are you connecting the MIXINR IN3R stuff
> here, you want to go through the PGA most likely?

sure, this is the changing (force-pushing) file I'm working on:
https://source.puri.sm/martin.kepplinger/librem5-base/-/blob/headset/default/audio/ucm2/Librem_5/HiFi.conf


> 
> >        
> > ]                                                             
> >                                                                    
> >    
> > DisableSequence
> > [                                                     
> >                 cset "name='INPGAR IN1R Switch'
> > off"                  
> >                 cset "name='MIXINR IN3R Switch'
> > off"                  
> >                 cset "name='MIXINR IN3R Volume'
> > 0"                    
> >                 cset "name='Input Mode'
> > Digital"                      
> >        
> > ]                                                             
> >                                                                    
> >    
> > Value
> > {                                                               
> >                 CapturePriority
> > "100"                                 
> >                 CaptureChannels
> > "2"                                   
> >                 CaptureSwitch "name='MIXINR IN3R
> > Volume'"             
> 
> This should probably be CaptureVolume, rather than CaptureSwitch.
> 
> >                 CaptureSwitch "name='MIXINR IN3R
> > Switch'"             
> >                 CapturePCM
> > "hw:${CardId},0"                           
> >                 JackControl "Headphones
> > Jack"                         
> 
> Assuming your machine driver creates an appropriately named
> control.
> 
> >         }
> > 
> > 
> > Let me just append the correct amixer contents where I hear my
> > usual
> > "quiet and bad signal" recording:
> 
> > numid=11,iface=MIXER,name='Capture Switch'
> >   ; type=BOOLEAN,access=rw------,values=2
> >   : values=off,off
> 
> This still looks weird, I wouldn't expect you would hear anything
> with the "Capture Switch" off, it mutes the PGA. Can you confirm
> if this is on whilst you are actually capturing audio?

you're right. I append my current setting, now while gnome audio
settings are open (where the signal volume is shown), then it's on.

> 
> > numid=84,iface=MIXER,name='INPGAR IN1R Switch'
> >   ; type=BOOLEAN,access=rw------,values=1
> >   : values=on
> 
> I definitely would consider turning this on as just a test thing
> not a recommendation on how the part should be used, until we see
> if it helps. It was just a weird hunch, I feel the routing is
> probably more sensible without it.

removed that.

> 
> > 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.

> 
> Thanks,
> Charles

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

                                 martin


[-- Attachment #2: amixer_contents_headset_20220207.txt --]
[-- Type: text/plain, Size: 19034 bytes --]

numid=1,iface=CARD,name='Headphones Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=30,iface=MIXER,name='Headphone Aux Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=7,step=0
  : values=0,0
  | dBscale-min=-7.00dB,step=1.00dB,mute=0
numid=31,iface=MIXER,name='Headphone Mixer Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=29,iface=MIXER,name='Headphone ZC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=28,iface=MIXER,name='Headphone Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=27,iface=MIXER,name='Headphone Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=121,121
  | dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=25,iface=MIXER,name='ADC High Performance Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=22,iface=MIXER,name='ADC L/R Swap Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=24,iface=MIXER,name='ADC Monomix Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=15,iface=MIXER,name='Capture HPF Cutoff'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=0
numid=14,iface=MIXER,name='Capture HPF Mode'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Hi-fi'
  ; Item #1 'Application'
  : values=0
numid=13,iface=MIXER,name='Capture HPF Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=17,iface=MIXER,name='Capture LHPF Mode'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'LPF'
  ; Item #1 'HPF'
  : values=0
numid=16,iface=MIXER,name='Capture LHPF Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=12,iface=MIXER,name='Capture ZC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=11,iface=MIXER,name='Capture Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
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
numid=50,iface=MIXER,name='3D Coefficients'
  ; type=BYTES,access=rw------,values=8
  : values=0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
numid=49,iface=MIXER,name='3D Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=63,iface=MIXER,name='ALC Coefficients'
  ; type=BYTES,access=rw------,values=8
  : values=0x00,0x7b,0x00,0x00,0x1c,0x32,0x32,0x00
numid=62,iface=MIXER,name='ALC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=26,iface=MIXER,name='Beep Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=15,step=0
  : values=0
  | dBscale-min=-96.00dB,step=6.00dB,mute=1
numid=20,iface=MIXER,name='DAC High Performance Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=21,iface=MIXER,name='DAC L/R Swap Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=23,iface=MIXER,name='DAC Monomix Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=52,iface=MIXER,name='DF1 Coefficients'
  ; type=BYTES,access=rw------,values=14
  : values=0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
numid=51,iface=MIXER,name='DF1 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=54,iface=MIXER,name='DRC Coefficients'
  ; type=BYTES,access=rw------,values=10
  : values=0x00,0x0c,0x09,0x25,0x00,0x00,0x00,0x00,0x00,0x00
numid=53,iface=MIXER,name='DRC Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=9,iface=MIXER,name='Digital Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=100,100
  | dBscale-min=-72.00dB,step=0.75dB,mute=1
numid=19,iface=MIXER,name='Digital Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=100,100
  | dBscale-min=-72.00dB,step=0.75dB,mute=1
numid=41,iface=MIXER,name='EQ Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=42,iface=MIXER,name='EQ1 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=12,12
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=43,iface=MIXER,name='EQ2 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=12,12
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=44,iface=MIXER,name='EQ3 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=12,12
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=45,iface=MIXER,name='EQ4 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=12,12
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=46,iface=MIXER,name='EQ5 Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=13,13
  | dBscale-min=-12.00dB,step=1.00dB,mute=0
numid=47,iface=MIXER,name='EQL Coefficients'
  ; type=BYTES,access=rw------,values=36
  : values=0x0f,0xca,0x04,0x00,0x00,0xd8,0x1e,0xb5,0xf1,0x45,0x0b,0x75,0x01,0xc5,0x1c,0x58,0xf3,0x73,0x0a,0x54,0x05,0x58,0x16,0x8e,0xf8,0x29,0x07,0xad,0x11,0x03,0x05,0x64,0x05,0x59,0x40,0x00
numid=48,iface=MIXER,name='EQR Coefficients'
  ; type=BYTES,access=rw------,values=36
  : values=0x0f,0xca,0x04,0x00,0x00,0xd8,0x1e,0xb5,0xf1,0x45,0x0b,0x75,0x01,0xc5,0x1c,0x58,0xf3,0x73,0x0a,0x54,0x05,0x58,0x16,0x8e,0xf8,0x29,0x07,0xad,0x11,0x03,0x05,0x64,0x05,0x59,0x40,0x00
numid=61,iface=MIXER,name='HD Bass Coefficients'
  ; type=BYTES,access=rw------,values=60
  : values=0x00,0x02,0xbd,0x12,0x00,0x7c,0x58,0x6c,0x00,0x53,0x81,0x21,0x00,0x3f,0x8b,0xd8,0x00,0x32,0xf5,0x2d,0x00,0x65,0xac,0x8c,0x00,0x6b,0xe0,0x87,0x00,0x72,0x14,0x83,0x00,0x72,0x14,0x83,0x00,0x43,0x35,0x25,0x00,0x06,0x6a,0x4a,0x00,0x43,0x60,0x79,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x59,0x99,0x9a
numid=60,iface=MIXER,name='HD Bass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=59,iface=MIXER,name='HPF Coefficients'
  ; type=BYTES,access=rw------,values=2
  : values=0x00,0x00
numid=57,iface=MIXER,name='HPF1 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=58,iface=MIXER,name='HPF2 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=97,iface=MIXER,name='HPMIXL DACL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=98,iface=MIXER,name='HPMIXL DACR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=101,iface=MIXER,name='HPMIXL IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=32,iface=MIXER,name='HPMIXL IN4L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=102,iface=MIXER,name='HPMIXL IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=33,iface=MIXER,name='HPMIXL IN4R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=99,iface=MIXER,name='HPMIXL MIXINL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=34,iface=MIXER,name='HPMIXL MIXINL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=100,iface=MIXER,name='HPMIXL MIXINR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=35,iface=MIXER,name='HPMIXL MIXINR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=103,iface=MIXER,name='HPMIXR DACL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=104,iface=MIXER,name='HPMIXR DACR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=107,iface=MIXER,name='HPMIXR IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=36,iface=MIXER,name='HPMIXR IN4L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=108,iface=MIXER,name='HPMIXR IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=37,iface=MIXER,name='HPMIXR IN4R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=105,iface=MIXER,name='HPMIXR MIXINL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=38,iface=MIXER,name='HPMIXR MIXINL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=106,iface=MIXER,name='HPMIXR MIXINR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=39,iface=MIXER,name='HPMIXR MIXINR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=109,iface=MIXER,name='HPOUTL PGA'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'DAC'
  ; Item #1 'Mixer'
  : values=0
numid=110,iface=MIXER,name='HPOUTR PGA'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'DAC'
  ; Item #1 'Mixer'
  : values=0
numid=80,iface=MIXER,name='INPGAL IN1L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=81,iface=MIXER,name='INPGAL IN2L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=82,iface=MIXER,name='INPGAL IN3L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=83,iface=MIXER,name='INPGAL IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=84,iface=MIXER,name='INPGAR IN1R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=85,iface=MIXER,name='INPGAR IN2R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=86,iface=MIXER,name='INPGAR IN3R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=87,iface=MIXER,name='INPGAR IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=2,iface=MIXER,name='Input Mixer Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,on
numid=94,iface=MIXER,name='Input Mode'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Analog'
  ; Item #1 'Digital'
  : values=0
numid=88,iface=MIXER,name='MIXINL IN2L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=3,iface=MIXER,name='MIXINL IN2L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=89,iface=MIXER,name='MIXINL IN3L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=5,iface=MIXER,name='MIXINL IN3L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=90,iface=MIXER,name='MIXINL PGA Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=4,iface=MIXER,name='MIXINL 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

numid=91,iface=MIXER,name='MIXINR IN2R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=6,iface=MIXER,name='MIXINR IN2R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=92,iface=MIXER,name='MIXINR IN3R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=8,iface=MIXER,name='MIXINR IN3R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=0
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=93,iface=MIXER,name='MIXINR PGA Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
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

numid=111,iface=MIXER,name='SPKOUTL Mixer DACL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=72,iface=MIXER,name='SPKOUTL Mixer DACL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=0
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=112,iface=MIXER,name='SPKOUTL Mixer DACR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=73,iface=MIXER,name='SPKOUTL Mixer DACR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=0
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=115,iface=MIXER,name='SPKOUTL Mixer IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=68,iface=MIXER,name='SPKOUTL Mixer IN4L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=116,iface=MIXER,name='SPKOUTL Mixer IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=69,iface=MIXER,name='SPKOUTL Mixer IN4R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=113,iface=MIXER,name='SPKOUTL Mixer MIXINL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=70,iface=MIXER,name='SPKOUTL Mixer MIXINL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=114,iface=MIXER,name='SPKOUTL Mixer MIXINR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=71,iface=MIXER,name='SPKOUTL Mixer MIXINR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=123,iface=MIXER,name='SPKOUTL PGA'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'DAC'
  ; Item #1 'Mixer'
  : values=1
numid=117,iface=MIXER,name='SPKOUTR Mixer DACL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=78,iface=MIXER,name='SPKOUTR Mixer DACL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=0
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=118,iface=MIXER,name='SPKOUTR Mixer DACR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=79,iface=MIXER,name='SPKOUTR Mixer DACR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=0
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=121,iface=MIXER,name='SPKOUTR Mixer IN4L Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=74,iface=MIXER,name='SPKOUTR Mixer IN4L Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=122,iface=MIXER,name='SPKOUTR Mixer IN4R Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=75,iface=MIXER,name='SPKOUTR Mixer IN4R Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=7
  | dBscale-min=-15.00dB,step=3.00dB,mute=0
numid=119,iface=MIXER,name='SPKOUTR Mixer MIXINL Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=76,iface=MIXER,name='SPKOUTR Mixer MIXINL Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=120,iface=MIXER,name='SPKOUTR Mixer MIXINR Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=77,iface=MIXER,name='SPKOUTR Mixer MIXINR Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=1
  | dBscale-min=-6.00dB,step=6.00dB,mute=0
numid=124,iface=MIXER,name='SPKOUTR PGA'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'DAC'
  ; Item #1 'Mixer'
  : values=1
numid=95,iface=MIXER,name='STL'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'None'
  ; Item #1 'Left'
  ; Item #2 'Right'
  : values=0
numid=96,iface=MIXER,name='STR'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'None'
  ; Item #1 'Left'
  ; Item #2 'Right'
  : values=0
numid=18,iface=MIXER,name='Sidetone Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=12,step=0
  : values=0,0
  | dBscale-min=-36.00dB,step=3.00dB,mute=0
numid=40,iface=MIXER,name='Speaker Boost Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=6
  | dBrange-
    rangemin=0,,rangemax=6
      | dBscale-min=0.00dB,step=1.50dB,mute=0
    rangemin=7,,rangemax=7
      | dBscale-min=12.00dB,step=0.00dB,mute=0

numid=67,iface=MIXER,name='Speaker Mixer Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=65,iface=MIXER,name='Speaker Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=64,iface=MIXER,name='Speaker Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=121,121
  | dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=66,iface=MIXER,name='Speaker ZC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=56,iface=MIXER,name='VSS Coefficients'
  ; type=BYTES,access=rw------,values=296
  : values=0x00,0x8c,0x02,0x00,0x00,0x35,0x07,0x00,0x00,0x3a,0x41,0x00,0x00,0x8b,0x7d,0x00,0x00,0x3a,0x41,0x00,0x00,0x8c,0xfe,0xe8,0x00,0x78,0x00,0x00,0x00,0x3f,0xb2,0x60,0x00,0x2d,0x18,0x18,0x00,0x20,0x00,0x00,0x00,0xf1,0x83,0x40,0x00,0xfb,0x83,0x00,0x00,0xee,0xae,0xc0,0x00,0xfb,0xac,0x40,0x00,0xf1,0x7f,0x80,0x00,0xf4,0x3b,0x40,0x00,0xf5,0xfb,0x00,0x00,0xea,0x10,0xc0,0x00,0xfc,0xc5,0x80,0x00,0xe2,0x75,0xc0,0x00,0x04,0xb4,0x80,0x00,0xd4,0xf9,0x80,0x00,0x04,0x91,0x40,0x00,0xd8,0xa4,0x80,0x00,0x02,0x3d,0xc0,0x00,0xcf,0x7a,0x80,0x00,0xdc,0x06,0x00,0x00,0xf2,0xda,0xc0,0x00,0xba,0xf3,0x40,0x00,0x0a,0x79,0x40,0x00,0x1c,0x06,0x80,0x00,0xfd,0x2d,0x00,0x00,0x1c,0xe8,0x40,0x00,0x0d,0xdc,0x40,0x00,0xfc,0x9d,0x00,0x00,0x09,0x55,0x80,0x00,0xfe,0x7e,0x80,0x00,0x0e,0xab,0x40,0x00,0xf9,0x98,0x80,0x00,0x09,0x87,0xc0,0x00,0xfd,0x2c,0x40,0x00,0x09,0x48,0x00,0x00,0x03,0x5f,0x40,0x00,0x00,0x87,0x00,0x00,0xfa,0xe4,0xc0,0x00,0x00,0x0b,0x40,0x00,0x04,0xe1,0x80,0x00,0x01,0x1f,0x40,0x00,0xf8,0xb0,0x00,0x00,0xfb,0xcb,0xc0,0x00,0x04,0xf3,0x80,0x00,0x07,0xdf,0x40,0x00,0xff,0x07,0x00,0x00,0xef,0xd7,0x00,0x00,0xfb,0xaf,0x40,0x00,0x10,0x8a,0x80,0x00,0x11,0x07,0xc0,0x00,0xe0,0x08,0x00,0x00,0xd2,0x76,0x00,0x00,0x20,0xcf,0x40,0x00,0x30,0x23,0x40,0x00,0xfd,0x69,0xc0,0x00,0x28,0x35,0x00,0x00,0x06,0x33,0x00,0x00,0xd9,0xf6,0xc0,0x00,0xf3,0x33,0x40,0x00,0x0f,0x42,0x00,0x00,0x04,0x0c,0x80,0x00,0xfb,0x3f,0x80,0x00,0xf7,0x57,0xc0,0x00,0x03,0x54,0x00,0x00,0x00,0xc6,0xc0,0x00,0x03,0x12,0xc0,0x00,0xfd,0x85,0x80
numid=55,iface=MIXER,name='VSS Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
  2022-02-07 10:49                   ` Martin Kepplinger
@ 2022-02-07 14:21                     ` Charles Keepax
  2022-03-01 13:44                       ` Charles Keepax
  0 siblings, 1 reply; 16+ messages in thread
From: Charles Keepax @ 2022-02-07 14:21 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
  2022-02-07 14:21                     ` Charles Keepax
@ 2022-03-01 13:44                       ` Charles Keepax
  2022-03-01 14:00                         ` Martin Kepplinger
  0 siblings, 1 reply; 16+ messages in thread
From: Charles Keepax @ 2022-03-01 13:44 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

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 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:
> > 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,
> > 
> 

Hey, just wanted to check everything was going ok on this stuff?
Did the volume tweaks get things sounding more normal, and any
other problems you guys are having?

Thanks,
charles

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
  2022-03-01 13:44                       ` Charles Keepax
@ 2022-03-01 14:00                         ` Martin Kepplinger
  2022-03-02 11:48                           ` Martin Kepplinger
  0 siblings, 1 reply; 16+ messages in thread
From: Martin Kepplinger @ 2022-03-01 14:00 UTC (permalink / raw)
  To: Charles Keepax
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

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 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:
> > > 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,
> > > 
> > 
> 
> Hey, just wanted to check everything was going ok on this stuff?
> Did the volume tweaks get things sounding more normal, and any
> other problems you guys are having?
> 
> Thanks,
> charles

Hi Charles!

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.

Of course we already use your "Input Mode" control.

thanks,

                                martin



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
  2022-03-01 14:00                         ` Martin Kepplinger
@ 2022-03-02 11:48                           ` Martin Kepplinger
  2022-03-02 13:40                             ` Charles Keepax
  0 siblings, 1 reply; 16+ messages in thread
From: Martin Kepplinger @ 2022-03-02 11:48 UTC (permalink / raw)
  To: Charles Keepax
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

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
> > > 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:
> > > > 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,
> > > > 
> > > 
> > 
> > Hey, just wanted to check everything was going ok on this stuff?
> > Did the volume tweaks get things sounding more normal, and any
> > other problems you guys are having?
> > 
> > Thanks,
> > charles
> 
> Hi Charles!
> 
> 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.
> 
> Of course we already use your "Input Mode" control.
> 
> thanks,
> 
>                                 martin
> 
> 

Hi Charles,

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.


thanks for having a look,

                         martin



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
  2022-03-02 11:48                           ` Martin Kepplinger
@ 2022-03-02 13:40                             ` Charles Keepax
  2022-03-02 14:11                               ` Martin Kepplinger
  0 siblings, 1 reply; 16+ messages in thread
From: Charles Keepax @ 2022-03-02 13:40 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

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"

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.

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.

Thanks,
Charles

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
  2022-03-02 13:40                             ` Charles Keepax
@ 2022-03-02 14:11                               ` Martin Kepplinger
  2022-03-03 11:27                                 ` Charles Keepax
  0 siblings, 1 reply; 16+ messages in thread
From: Martin Kepplinger @ 2022-03-02 14:11 UTC (permalink / raw)
  To: Charles Keepax
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

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



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] wm8962: add a simple DMIC enable control
  2022-03-02 14:11                               ` Martin Kepplinger
@ 2022-03-03 11:27                                 ` Charles Keepax
  0 siblings, 0 replies; 16+ messages in thread
From: Charles Keepax @ 2022-03-03 11:27 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: alsa-devel, kernel, patches, tiwai, lgirdwood, broonie, geert,
	daniel.baluta

On Wed, Mar 02, 2022 at 03:11:00PM +0100, Martin Kepplinger wrote:
> 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
> > > > Am Dienstag, dem 01.03.2022 um 13:44 +0000 schrieb Charles
> > > > > 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
> > 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.
> 

Awesome hopefully that should be us getting pretty close.

> > 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.

I think we probably bump the PGA gain up another 3dB, maybe even
6dB if you really need to, I would just be careful to test some
very loud sound levels to make sure your not starting to clip the
signal.

Thanks,
Charles

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-03-03 11:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.