ASoC: wm8958: Load firmwares simultaneously
Subsystems (3)
PATCH 1/1 ASoC: wm8958: Load firmwares simultaneously
As of commit 99c2aa (firmware loader: fix creation failure of fw loader device) we can have more than one firmware request outstanding at once so there is no need to daisychain our requests any more.
Signed-off-by Mark Brown <[email protected]>
--- sound/soc/codecs/wm8958-dsp2.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-)
sound/soc/codecs/wm8958-dsp2.c +11 -20
@@ -883,13 +883,6 @@ static void wm8958_mbc_vss_loaded(const struct firmware *fw, void *context) wm8994->mbc_vss = fw;mutex_unlock (&codec->mutex); } - -/* We can't have more than one request outstanding at once so -* we daisy chain. -*/ -request_firmware_nowait (THIS_MODULE ,FW_ACTION_HOTPLUG , -"wm8958_enh_eq.wfw" , codec->dev,GFP_KERNEL , - codec, wm8958_enh_eq_loaded); }static void wm8958_mbc_loaded (const struct firmware *fw,void *context)
@@ -897,19 +890,11 @@ static void wm8958_mbc_loaded(const struct firmware *fw, void *context)struct snd_soc_codec *codec = context;struct wm8994_priv *wm8994 =snd_soc_codec_get_drvdata (codec); -if (wm8958_dsp2_fw (codec,"MBC" , fw, true) !=0 ) -return ; - -mutex_lock (&codec->mutex); - wm8994->mbc = fw; -mutex_unlock (&codec->mutex); - -/* We can't have more than one request outstanding at once so -* we daisy chain. -*/ -request_firmware_nowait (THIS_MODULE ,FW_ACTION_HOTPLUG , -"wm8958_mbc_vss.wfw" , codec->dev,GFP_KERNEL , - codec, wm8958_mbc_vss_loaded); +if (fw && (wm8958_dsp2_fw (codec,"MBC" , fw, true) ==0 )) { +mutex_lock (&codec->mutex); + wm8994->mbc = fw; +mutex_unlock (&codec->mutex); + } }void wm8958_dsp2_init (struct snd_soc_codec *codec)
@@ -933,6 +918,12 @@ void wm8958_dsp2_init(struct snd_soc_codec *codec)request_firmware_nowait (THIS_MODULE ,FW_ACTION_HOTPLUG ,"wm8958_mbc.wfw" , codec->dev,GFP_KERNEL , codec, wm8958_mbc_loaded); +request_firmware_nowait (THIS_MODULE ,FW_ACTION_HOTPLUG , +"wm8958_mbc_vss.wfw" , codec->dev,GFP_KERNEL , + codec, wm8958_mbc_vss_loaded); +request_firmware_nowait (THIS_MODULE ,FW_ACTION_HOTPLUG , +"wm8958_enh_eq.wfw" , codec->dev,GFP_KERNEL , + codec, wm8958_enh_eq_loaded);if (pdata->num_mbc_cfgs) {struct snd_kcontrol_new control[] = {
Signature · 1 line
1.7.10.4