ASoC: wm_adsp: Add codec_probe and codec_remove stubs
Currently the only init function in wm_adsp is called by the codec driver early in its probe before the codec has been registered with SOC. This patch adds stubs for the codec_probe and codec_remove stages and calls them from WM5102 and WM5110 codec drivers. This allows us to hang anything that needs setup during the codec probe stage off these functions without further modification of the codec drivers. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
这个提交包含在:
@@ -1875,6 +1875,10 @@ static int wm5102_codec_probe(struct snd_soc_codec *codec)
|
||||
struct wm5102_priv *priv = snd_soc_codec_get_drvdata(codec);
|
||||
int ret;
|
||||
|
||||
ret = wm_adsp2_codec_probe(&priv->core.adsp[0], codec);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = snd_soc_add_codec_controls(codec, wm_adsp2_fw_controls, 2);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
@@ -1893,6 +1897,8 @@ static int wm5102_codec_remove(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct wm5102_priv *priv = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
wm_adsp2_codec_remove(&priv->core.adsp[0], codec);
|
||||
|
||||
priv->core.arizona->dapm = NULL;
|
||||
|
||||
return 0;
|
||||
|
在新工单中引用
屏蔽一个用户