Unverified Commit 5f120ccf authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: set bias_level at if

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

ASoC has 2 functions to set bias level.

	(A) snd_soc_dapm_force_bias_level()
	(B) snd_soc_dapm_set_bias_level()

(A) sets dapm->bias_level, but (B) is not.
I think we should set it on both (A) and (B).
I think it is miss or bug, but Samsung is the only vendor that feels a
problem about this.

I think this patch (= [1/5]) is correct approach, but some non-samsung
vendor might get affect from this patch-set, so I added [RFC] on this
patch-set.

Furthermore, (B) cares both Card and Component, (A) cares Component only.
I guess it is the reason why it is called as "force" bias_level function.
(A) is used from each drivers, (B) is used from soc-dapm only.
I'm not 100% sure though, except special cases, each driver should use (B),
I guess ?
parents af241e3f f00e0629
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -133,8 +133,6 @@ static int bells_set_bias_level_post(struct snd_soc_card *card,
		break;
	}

	dapm->bias_level = level;

	return 0;
}

+0 −2
Original line number Diff line number Diff line
@@ -95,8 +95,6 @@ static int littlemill_set_bias_level_post(struct snd_soc_card *card,
		break;
	}

	dapm->bias_level = level;

	return 0;
}

+0 −2
Original line number Diff line number Diff line
@@ -90,8 +90,6 @@ static int speyside_set_bias_level_post(struct snd_soc_card *card,
		break;
	}

	card->dapm.bias_level = level;

	return 0;
}

+0 −2
Original line number Diff line number Diff line
@@ -91,8 +91,6 @@ static int tobermory_set_bias_level_post(struct snd_soc_card *card,
		break;
	}

	dapm->bias_level = level;

	return 0;
}

+4 −0
Original line number Diff line number Diff line
@@ -1030,6 +1030,10 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm,
out:
	trace_snd_soc_bias_level_done(dapm, level);

	/* success */
	if (ret == 0)
		snd_soc_dapm_init_bias_level(dapm, level);

	return ret;
}