diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-10-09 21:59:24 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-10-14 22:51:33 -0400 |
commit | 0ffecd7d869a156b710b7b6cb59153748c6de3ae (patch) | |
tree | 76d8202b9d312701fe469052e5928efbd2c53cce /sound/soc/codecs/wm8958-dsp2.c | |
parent | f95be9d6162adf1dba3f85060e24d14744bfaeb2 (diff) |
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 <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8958-dsp2.c')
-rw-r--r-- | sound/soc/codecs/wm8958-dsp2.c | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c index 00121ba36597..bff96500c3f3 100644 --- a/sound/soc/codecs/wm8958-dsp2.c +++ b/sound/soc/codecs/wm8958-dsp2.c | |||
@@ -883,13 +883,6 @@ static void wm8958_mbc_vss_loaded(const struct firmware *fw, void *context) | |||
883 | wm8994->mbc_vss = fw; | 883 | wm8994->mbc_vss = fw; |
884 | mutex_unlock(&codec->mutex); | 884 | mutex_unlock(&codec->mutex); |
885 | } | 885 | } |
886 | |||
887 | /* We can't have more than one request outstanding at once so | ||
888 | * we daisy chain. | ||
889 | */ | ||
890 | request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, | ||
891 | "wm8958_enh_eq.wfw", codec->dev, GFP_KERNEL, | ||
892 | codec, wm8958_enh_eq_loaded); | ||
893 | } | 886 | } |
894 | 887 | ||
895 | static void wm8958_mbc_loaded(const struct firmware *fw, void *context) | 888 | 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) | |||
897 | struct snd_soc_codec *codec = context; | 890 | struct snd_soc_codec *codec = context; |
898 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 891 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
899 | 892 | ||
900 | if (wm8958_dsp2_fw(codec, "MBC", fw, true) != 0) | 893 | if (fw && (wm8958_dsp2_fw(codec, "MBC", fw, true) == 0)) { |
901 | return; | 894 | mutex_lock(&codec->mutex); |
902 | 895 | wm8994->mbc = fw; | |
903 | mutex_lock(&codec->mutex); | 896 | mutex_unlock(&codec->mutex); |
904 | wm8994->mbc = fw; | 897 | } |
905 | mutex_unlock(&codec->mutex); | ||
906 | |||
907 | /* We can't have more than one request outstanding at once so | ||
908 | * we daisy chain. | ||
909 | */ | ||
910 | request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, | ||
911 | "wm8958_mbc_vss.wfw", codec->dev, GFP_KERNEL, | ||
912 | codec, wm8958_mbc_vss_loaded); | ||
913 | } | 898 | } |
914 | 899 | ||
915 | void wm8958_dsp2_init(struct snd_soc_codec *codec) | 900 | void wm8958_dsp2_init(struct snd_soc_codec *codec) |
@@ -932,6 +917,12 @@ void wm8958_dsp2_init(struct snd_soc_codec *codec) | |||
932 | request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, | 917 | request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, |
933 | "wm8958_mbc.wfw", codec->dev, GFP_KERNEL, | 918 | "wm8958_mbc.wfw", codec->dev, GFP_KERNEL, |
934 | codec, wm8958_mbc_loaded); | 919 | codec, wm8958_mbc_loaded); |
920 | request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, | ||
921 | "wm8958_mbc_vss.wfw", codec->dev, GFP_KERNEL, | ||
922 | codec, wm8958_mbc_vss_loaded); | ||
923 | request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, | ||
924 | "wm8958_enh_eq.wfw", codec->dev, GFP_KERNEL, | ||
925 | codec, wm8958_enh_eq_loaded); | ||
935 | 926 | ||
936 | if (!pdata) | 927 | if (!pdata) |
937 | return; | 928 | return; |