Re: [PATCH] ASoC: wm8978: Support the recording function of codec

From: Mark Brown
Date: Mon Sep 12 2022 - 05:23:25 EST


On Mon, Sep 12, 2022 at 04:23:05PM +0800, Mengchen Li wrote:

> @@ -822,7 +822,9 @@ static int wm8978_hw_params(struct snd_pcm_substream *substream,
>
> snd_soc_component_write(component, WM8978_AUDIO_INTERFACE, iface_ctl);
> snd_soc_component_write(component, WM8978_ADDITIONAL_CONTROL, add_ctl);
> -
> + /* Enable MICBEN */
> + snd_soc_component_write(component, WM8978_POWER_MANAGEMENT_1,
> + snd_soc_component_read(component, WM8978_POWER_MANAGEMENT_1) | 0x10);

This should be done by creating a supply widget for the MICBIAS
which will be connected by the machine driver to the microphone
widget. This will mean that the MICBIAS is only enabled when
it's actively being used which saves power. Look for MICBIAS
widgets in other CODEC drivers for examples.

Attachment: signature.asc
Description: PGP signature