mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Mengchen Li <mengchenli64@gmail.com>
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	ckeepax@opensource.cirrus.com, steve@sk2.org,
	patches@opensource.cirrus.com, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: wm8978: Support the recording function of codec
Date: Mon, 12 Sep 2022 10:23:14 +0100	[thread overview]
Message-ID: <Yx76gpaq0wbuek72@sirena.org.uk> (raw)
In-Reply-To: <1662970985-2909-1-git-send-email-mengchenli64@gmail.com>

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

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2022-09-12  9:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12  8:23 Mengchen Li
2022-09-12  9:23 ` Mark Brown [this message]

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=Yx76gpaq0wbuek72@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mengchenli64@gmail.com \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=steve@sk2.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

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

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

all inboxes | Powered by JetHome®