diff mbox series

[5/7] ASoC: cs42l51: change mic bias DAPM

Message ID 1554297817-14154-6-git-send-email-olivier.moysan@st.com (mailing list archive)
State Accepted
Commit 4110e9a1868332e305f64d5c5b32368597caeb8f
Headers show
Series ASoC: cs42l51: add some features | expand

Commit Message

Olivier MOYSAN April 3, 2019, 1:23 p.m. UTC
Use SND_SOC_DAPM_SUPPLY for mic bias DAPM
instead of deprecated SND_SOC_DAPM_MICBIAS.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
---
 sound/soc/codecs/cs42l51.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Mark Brown April 4, 2019, 5:47 a.m. UTC | #1
On Wed, Apr 03, 2019 at 03:23:35PM +0200, Olivier Moysan wrote:
> Use SND_SOC_DAPM_SUPPLY for mic bias DAPM
> instead of deprecated SND_SOC_DAPM_MICBIAS.

There are existing users in mainline, have they all been updated to be
compatible with this, or verified that they don't need updates?
Olivier MOYSAN April 4, 2019, 1:35 p.m. UTC | #2
Hello Mark,

There are no routes in cs42l51_routes table using "Mic Bias" widget.

I use this widget in a route defined in audio graph card DT node.
I checked other DTs which are using CS42L51 codec (armada-370-db.dts
kirkwood-openrd-client.dts, kirkwood-openrd-ultimate.dts),but I did not 
find reference to "Mic Bias" widget.
So, my understanding is that the patch should not break the legacy.
If you think this assumption is not correct please let me know.

Regards
Olivier


On 4/4/19 7:47 AM, Mark Brown wrote:
> On Wed, Apr 03, 2019 at 03:23:35PM +0200, Olivier Moysan wrote:
>> Use SND_SOC_DAPM_SUPPLY for mic bias DAPM
>> instead of deprecated SND_SOC_DAPM_MICBIAS.
> 
> There are existing users in mainline, have they all been updated to be
> compatible with this, or verified that they don't need updates?
>
diff mbox series

Patch

diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 397b68901d1c..33298a7a8aab 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -206,7 +206,8 @@  static const struct snd_kcontrol_new cs42l51_adcr_mux_controls =
 	SOC_DAPM_ENUM("Route", cs42l51_adcr_mux_enum);
 
 static const struct snd_soc_dapm_widget cs42l51_dapm_widgets[] = {
-	SND_SOC_DAPM_MICBIAS("Mic Bias", CS42L51_MIC_POWER_CTL, 1, 1),
+	SND_SOC_DAPM_SUPPLY("Mic Bias", CS42L51_MIC_POWER_CTL, 1, 1, NULL,
+			    SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
 	SND_SOC_DAPM_PGA_E("Left PGA", CS42L51_POWER_CTL1, 3, 1, NULL, 0,
 		cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD),
 	SND_SOC_DAPM_PGA_E("Right PGA", CS42L51_POWER_CTL1, 4, 1, NULL, 0,