From 6448cc8e4d02c5fea899c89a24abe4c87d816d3a Mon Sep 17 00:00:00 2001 From: Lucas Tanure Date: Tue, 20 Feb 2018 13:13:32 +0000 Subject: [PATCH] ASoC: wm_adsp: Make ao_dsp a member of struct wm_adsp To avoid changing the existing API Change-Id: I926118983af26ed706c246cf04e13d60b1908277 Signed-off-by: Lucas Tanure Mot-CRs-fixed: (CR) Reviewed-on: https://gerrit.mot.com/1177444 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Rav(CR) Vembu Submit-Approved: Jira Key --- sound/soc/codecs/cs47l35.c | 2 +- sound/soc/codecs/cs47l90.c | 2 +- sound/soc/codecs/wm_adsp.c | 5 ++--- sound/soc/codecs/wm_adsp.h | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/cs47l35.c b/sound/soc/codecs/cs47l35.c index 2abc0a89713f..f56ca5b2ba24 100644 --- a/sound/soc/codecs/cs47l35.c +++ b/sound/soc/codecs/cs47l35.c @@ -1899,7 +1899,7 @@ static int cs47l35_codec_probe(struct snd_soc_codec *codec) } for (i = 0; i < CS47L35_NUM_ADSP; i++) - wm_adsp2_codec_probe(&cs47l35->core.adsp[i], codec, false); + wm_adsp2_codec_probe(&cs47l35->core.adsp[i], codec); #if IS_ENABLED(CONFIG_SND_SOC_AOV_TRIGGER) aov_trigger_register_notifier(codec); #endif diff --git a/sound/soc/codecs/cs47l90.c b/sound/soc/codecs/cs47l90.c index c2725e8ac44d..9836a9593488 100644 --- a/sound/soc/codecs/cs47l90.c +++ b/sound/soc/codecs/cs47l90.c @@ -2822,7 +2822,7 @@ static int cs47l90_codec_probe(struct snd_soc_codec *codec) } for (i = 0; i < CS47L90_NUM_ADSP; i++) { - wm_adsp2_codec_probe(&cs47l90->core.adsp[i], codec, false); + wm_adsp2_codec_probe(&cs47l90->core.adsp[i], codec); ret = madera_init_bus_error_irq(codec, i, cs47l90_dsp_bus_error); diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 98cafb4cb329..08c8300027d3 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -3809,8 +3809,7 @@ err: } EXPORT_SYMBOL_GPL(wm_halo_event); -int wm_adsp2_codec_probe(struct wm_adsp *dsp, struct snd_soc_codec *codec, - bool ao_dsp) +int wm_adsp2_codec_probe(struct wm_adsp *dsp, struct snd_soc_codec *codec) { struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); char preload[32]; @@ -3829,7 +3828,7 @@ int wm_adsp2_codec_probe(struct wm_adsp *dsp, struct snd_soc_codec *codec, dsp->codec = codec; - if (ao_dsp) + if (dsp->ao_dsp) ret = snd_soc_add_codec_controls(codec, &wm_adsp_ao_fw_controls[dsp->num - 1], 1); diff --git a/sound/soc/codecs/wm_adsp.h b/sound/soc/codecs/wm_adsp.h index e073362fabc0..a23fe12f4b0e 100644 --- a/sound/soc/codecs/wm_adsp.h +++ b/sound/soc/codecs/wm_adsp.h @@ -84,6 +84,7 @@ struct wm_adsp { int rev; int num; int type; + bool ao_dsp; const char *suffix; struct device *dev; struct regmap *regmap; @@ -192,8 +193,7 @@ extern const struct snd_kcontrol_new wm_adsp_fw_controls[]; int wm_adsp1_init(struct wm_adsp *dsp); int wm_adsp2_init(struct wm_adsp *dsp); void wm_adsp2_remove(struct wm_adsp *dsp); -int wm_adsp2_codec_probe(struct wm_adsp *dsp, struct snd_soc_codec *codec, - bool ao_dsp); +int wm_adsp2_codec_probe(struct wm_adsp *dsp, struct snd_soc_codec *codec); int wm_adsp2_codec_remove(struct wm_adsp *dsp, struct snd_soc_codec *codec); int wm_halo_init(struct wm_adsp *dsp, struct mutex *rate_lock); int wm_adsp1_event(struct snd_soc_dapm_widget *w,