devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Artur Weber <aweber.kernel@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	alsa-devel@alsa-project.org, linux-sound@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH v3 3/8] ASoC: samsung: midas_wm1811: Add headset mic bias supply support
Date: Wed, 22 May 2024 18:20:14 +0200	[thread overview]
Message-ID: <52428c0d-4b18-4707-9cda-4e6a11e256bc@gmail.com> (raw)
In-Reply-To: <1aed24a7-ab2a-4c2b-a3bc-2b907e091624@sirena.org.uk>

On 20.05.2024 16:35, Mark Brown wrote:
> On Sun, May 19, 2024 at 10:17:49AM +0200, Artur Weber wrote:
> 
>> +static int midas_headset_mic_bias(struct snd_soc_dapm_widget *w,
>> +			     struct snd_kcontrol *kcontrol, int event)
>> +{
>> +	struct snd_soc_card *card = w->dapm->card;
>> +	struct midas_priv *priv = snd_soc_card_get_drvdata(card);
>> +
>> +	if (!priv->reg_headset_mic_bias)
>> +		return 0;
>> +
>> +	switch (event) {
>> +	case SND_SOC_DAPM_PRE_PMU:
>> +		return regulator_enable(priv->reg_headset_mic_bias);
>> +	case SND_SOC_DAPM_POST_PMD:
>> +		return regulator_disable(priv->reg_headset_mic_bias);
>> +	}
> 
> We have SND_SOC_DAPM_REGULATOR_SUPPLY?

This is pretty much copied from the implementation of the mic bias
and sub mic bias regulator handling in the same driver; they all use
SND_SOC_DAPM_MIC combined with an enable/disable function like this one.

What would be the correct thing to do here - add a secondary DAPM widget
of type REGULATOR_SUPPLY and connect it to the MIC widget via audio-
routing, or replace the entire MIC widget with a REGULATOR_SUPPLY (or
something else entirely)?
And should this be done with the Main Mic and Sub Mic as well?

Best regards
Artur

  reply	other threads:[~2024-05-22 16:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-19  8:17 [PATCH v3 0/8] ASoC: samsung: midas-audio: Add GPIO-based headset jack detection Artur Weber
2024-05-19  8:17 ` [PATCH v3 1/8] ASoC: dt-bindings: samsung,midas-audio: Add headset mic bias supply Artur Weber
2024-05-19  8:17 ` [PATCH v3 2/8] ASoC: dt-bindings: samsung,midas-audio: Add GPIO-based headset jack detection Artur Weber
2024-05-19  8:17 ` [PATCH v3 3/8] ASoC: samsung: midas_wm1811: Add headset mic bias supply support Artur Weber
2024-05-20 14:35   ` Mark Brown
2024-05-22 16:20     ` Artur Weber [this message]
2024-05-22 16:22       ` Mark Brown
2024-05-19  8:17 ` [PATCH v3 4/8] ASoC: samsung: midas_wm1811: Add GPIO-based headset jack detection Artur Weber
2024-05-20 14:41   ` Mark Brown
2024-05-19  8:17 ` [PATCH v3 5/8] ASoC: samsung: midas_wm1811: Use dev_err_probe where appropriate Artur Weber
2024-05-19  8:17 ` [PATCH v3 6/8] ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection Artur Weber
2024-05-19  8:17 ` [PATCH v3 7/8] ARM: dts: samsung: exynos4212-tab3: Add MCLK2 clock to WM1811 codec config Artur Weber
2024-05-19  8:17 ` [PATCH v3 8/8] ARM: dts: samsung: exynos4212-tab3: Drop interrupt from WM1811 codec Artur Weber

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=52428c0d-4b18-4707-9cda-4e6a11e256bc@gmail.com \
    --to=aweber.kernel@gmail.com \
    --cc=alim.akhtar@samsung.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=tiwai@suse.com \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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;
as well as URLs for NNTP newsgroup(s).