提交 15e4ba66 编写于 作者: T Takashi Iwai

Revert "ALSA: hda - Add firmware caching to CA0132 codec"

This reverts commit c3b4eea2.

Since the recent firmware loader code supports caching at S3/S4 by
itself, we don't have to handle f/w caching in the driver.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 406261ce
...@@ -2602,24 +2602,6 @@ static int dspload_image(struct hda_codec *codec, ...@@ -2602,24 +2602,6 @@ static int dspload_image(struct hda_codec *codec,
return status; return status;
} }
static const struct firmware *fw_efx;
static int request_firmware_cached(const struct firmware **firmware_p,
const char *name, struct device *device)
{
if (*firmware_p)
return 0; /* already loaded */
return request_firmware(firmware_p, name, device);
}
static void release_cached_firmware(void)
{
if (fw_efx) {
release_firmware(fw_efx);
fw_efx = NULL;
}
}
static bool dspload_is_loaded(struct hda_codec *codec) static bool dspload_is_loaded(struct hda_codec *codec)
{ {
unsigned int data = 0; unsigned int data = 0;
...@@ -4351,15 +4333,18 @@ static bool ca0132_download_dsp_images(struct hda_codec *codec) ...@@ -4351,15 +4333,18 @@ static bool ca0132_download_dsp_images(struct hda_codec *codec)
{ {
bool dsp_loaded = false; bool dsp_loaded = false;
const struct dsp_image_seg *dsp_os_image; const struct dsp_image_seg *dsp_os_image;
const struct firmware *fw_entry;
if (request_firmware_cached(&fw_efx, EFX_FILE, if (request_firmware(&fw_entry, EFX_FILE, codec->bus->card->dev) != 0)
codec->bus->card->dev) != 0)
return false; return false;
dsp_os_image = (struct dsp_image_seg *)(fw_efx->data); dsp_os_image = (struct dsp_image_seg *)(fw_entry->data);
dspload_image(codec, dsp_os_image, 0, 0, true, 0); dspload_image(codec, dsp_os_image, 0, 0, true, 0);
dsp_loaded = dspload_wait_loaded(codec); dsp_loaded = dspload_wait_loaded(codec);
release_firmware(fw_entry);
return dsp_loaded; return dsp_loaded;
} }
...@@ -4701,7 +4686,6 @@ static int __init patch_ca0132_init(void) ...@@ -4701,7 +4686,6 @@ static int __init patch_ca0132_init(void)
static void __exit patch_ca0132_exit(void) static void __exit patch_ca0132_exit(void)
{ {
release_cached_firmware();
snd_hda_delete_codec_preset(&ca0132_list); snd_hda_delete_codec_preset(&ca0132_list);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册