Skip to content
Snippets Groups Projects
Commit fa6e1350 authored by Martin Kepplinger's avatar Martin Kepplinger
Browse files

ucm2: Librem_5: create a first working profile for the external mic

the settings are all based on a discussion with Charles:
https://lore.kernel.org/alsa-devel/20220207142129.GB112838@ediswmail.ad.cirrus.com/

Currently we don't get any signal from the external mic. These settings
result in at least a usable signal (we can try to further improve later).

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

we don't use that since we can either route from PGA or IN3R to MIXINR.

("quotes" are from the datasheet)
parent 35e18bf6
No related branches found
No related tags found
1 merge request!296ucm2: fix the external (headset) mic description
Pipeline #75320 passed
......@@ -156,22 +156,24 @@ SectionDevice."Headset" {
]
EnableSequence [
cset "name='MIXINR IN3R Switch' on"
cset "name='MIXINR IN3R Volume' 7"
cset "name='Digital Capture Volume' 116,116"
cset "name='Input Mode' Analog"
cset "name='MIXINR PGA Volume' 1,1"
cset "name='MIXINR PGA Switch' on,on"
cset "name='Capture Volume' 39,39"
cset "name='Capture Switch' on,on"
]
DisableSequence [
cset "name='MIXINR IN3R Switch' off"
cset "name='MIXINR IN3R Volume' 0"
cset "name='Capture Switch' off,off"
cset "name='MIXINR PGA Switch' off,off"
cset "name='Input Mode' Digital"
]
Value {
CapturePriority "100"
CaptureChannels "2"
CaptureVolume "name='MIXINR IN3R Volume'"
CaptureSwitch "name='MIXINR IN3R Switch'"
CaptureVolume "name='Capture Volume'"
CapturePCM "hw:${CardId},0"
JackControl "Headphones Jack"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment