Unverified Commit 889dd56f authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: soc-dapm: tidyup idle_bias handling - step1



Current soc-dapm is using  "idle_bias_off", and its default settings
came from snd_soc_component "idle_bias_on". It is complicated/confusable.

Let's handling it as "idle_bias".

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/874itix06a.wl-kuninori.morimoto.gx@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3bc0a92c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -583,8 +583,7 @@ struct snd_soc_dapm_update {
struct snd_soc_dapm_context {
	enum snd_soc_bias_level bias_level;

	/* bit field */
	unsigned int idle_bias_off:1;		/* Use BIAS_OFF instead of STANDBY */
	bool idle_bias;				/* Use BIAS_OFF instead of STANDBY when false */

	struct device *dev;			/* from parent - for debug */ /* REMOVE ME */
	struct snd_soc_component *component;	/* parent component */
+1 −1
Original line number Diff line number Diff line
@@ -1536,7 +1536,7 @@ static int wm8993_probe(struct snd_soc_component *component)
	 * VMID as an output and can disable it.
	 */
	if (wm8993->pdata.lineout1_diff && wm8993->pdata.lineout2_diff)
		dapm->idle_bias_off = 1;
		dapm->idle_bias = false;

	return 0;

+3 −3
Original line number Diff line number Diff line
@@ -4182,8 +4182,8 @@ static int wm8994_component_probe(struct snd_soc_component *component)

	wm8994->micdet_irq = control->pdata.micdet_irq;

	/* By default use idle_bias_off, will override for WM8994 */
	dapm->idle_bias_off = 1;
	/* By default use idle_bias false, will override for WM8994 */
	dapm->idle_bias = false;

	/* Set revision-specific configuration */
	switch (control->type) {
@@ -4191,7 +4191,7 @@ static int wm8994_component_probe(struct snd_soc_component *component)
		/* Single ended line outputs should have VMID on. */
		if (!control->pdata.lineout1_diff ||
		    !control->pdata.lineout2_diff)
			dapm->idle_bias_off = 0;
			dapm->idle_bias = true;

		switch (control->revision) {
		case 2:
+1 −1
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ static int avs_es8336_codec_init(struct snd_soc_pcm_runtime *runtime)
	snd_jack_set_key(data->jack.jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
	snd_soc_component_set_jack(component, &data->jack, NULL);

	card->dapm.idle_bias_off = true;
	card->dapm.idle_bias = false;

	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ static int avs_rt274_codec_init(struct snd_soc_pcm_runtime *runtime)
		return ret;
	}

	card->dapm.idle_bias_off = true;
	card->dapm.idle_bias = false;

	return 0;
}
Loading