Skip to contentSkip to conversation

sof-soundwire: es9356: default the DMIC gain to +12 dB

DISCUSSION GitHub pull_request - opened 1 participant 1 message Nov 14 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

alsa-project/alsa-ucm-conf pull request #913 was opened from kannoy2024:

Set a usable default for the internal DMIC capture gain.

### Problem

The ES9356 DMIC gain control (es9356 FU11 Capture Volume) resets to 0 dB. The control has four 6 dB steps (0/6/12/18 dB), so 0 dB leaves the recorded voice well below the noise floor: the internal microphone is unusable until the mixer is adjusted by hand, and users have no reason to know that the control exists.

### Change

Add an EnableSequence to the Mic device in sof-soundwire/es9356.conf that sets the gain to +12 dB. This follows the pattern used by other codecs (for example codecs/cs42l43-dmic.conf configures its inputs in the device EnableSequence). The control is still a normal mixer control, so the level can be changed at runtime.

| file | change |
|---|---|
| `ucm2/sof-soundwire/es9356.conf` | `Mic`: set `es9356 FU11 Capture Volume` to 2 (+12 dB) in `EnableSequence` |

### Testing

MECHREVO WUJIE 14SAH (AMD ACP6.3, ES9356 on SoundWire link 0). The gain was set to 0 dB by hand and PipeWire was then restarted:

- amixer -c 1 cset numid=10 0
- systemctl --user restart pipewire pipewire-pulse wireplumber
- amixer -c 1 cget numid=10 → : values=2 (the device came up at +12 dB)

wpctl status shows Speaker and Internal Microphone, and recording through the internal microphone is usable without touching the mixer.

Related: the matching dB scale fix for this control is
https://git.kernel.org/broonie/sound/c/412a061ebf8c

Request URL : https://github.com/alsa-project/alsa-ucm-conf/pull/913
Patch URL : https://github.com/alsa-project/alsa-ucm-conf/pull/913.patch
Repository URL: https://github.com/alsa-project/alsa-ucm-conf