aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-15 11:08:38 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-15 11:09:27 -0500
commit15e4ba666ca6c2fcc00184cef56fb971a20e8e04 (patch)
tree23e087228a67e547102827c30c1912d96e121e13 /sound/pci/hda
parent406261ce998589dc980d9a6683a5ef3153eec1a5 (diff)
Revert "ALSA: hda - Add firmware caching to CA0132 codec"
This reverts commit c3b4eea26208b8e247ece9d3a9ec8b2eab48c464. 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: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_ca0132.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 2b026e2733c8..0d2c2f83ca7d 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -2602,24 +2602,6 @@ static int dspload_image(struct hda_codec *codec,
2602 return status; 2602 return status;
2603} 2603}
2604 2604
2605static const struct firmware *fw_efx;
2606
2607static int request_firmware_cached(const struct firmware **firmware_p,
2608 const char *name, struct device *device)
2609{
2610 if (*firmware_p)
2611 return 0; /* already loaded */
2612 return request_firmware(firmware_p, name, device);
2613}
2614
2615static void release_cached_firmware(void)
2616{
2617 if (fw_efx) {
2618 release_firmware(fw_efx);
2619 fw_efx = NULL;
2620 }
2621}
2622
2623static bool dspload_is_loaded(struct hda_codec *codec) 2605static bool dspload_is_loaded(struct hda_codec *codec)
2624{ 2606{
2625 unsigned int data = 0; 2607 unsigned int data = 0;
@@ -4351,15 +4333,18 @@ static bool ca0132_download_dsp_images(struct hda_codec *codec)
4351{ 4333{
4352 bool dsp_loaded = false; 4334 bool dsp_loaded = false;
4353 const struct dsp_image_seg *dsp_os_image; 4335 const struct dsp_image_seg *dsp_os_image;
4336 const struct firmware *fw_entry;
4354 4337
4355 if (request_firmware_cached(&fw_efx, EFX_FILE, 4338 if (request_firmware(&fw_entry, EFX_FILE, codec->bus->card->dev) != 0)
4356 codec->bus->card->dev) != 0)
4357 return false; 4339 return false;
4358 4340
4359 dsp_os_image = (struct dsp_image_seg *)(fw_efx->data); 4341 dsp_os_image = (struct dsp_image_seg *)(fw_entry->data);
4360 dspload_image(codec, dsp_os_image, 0, 0, true, 0); 4342 dspload_image(codec, dsp_os_image, 0, 0, true, 0);
4361 dsp_loaded = dspload_wait_loaded(codec); 4343 dsp_loaded = dspload_wait_loaded(codec);
4362 4344
4345 release_firmware(fw_entry);
4346
4347
4363 return dsp_loaded; 4348 return dsp_loaded;
4364} 4349}
4365 4350
@@ -4701,7 +4686,6 @@ static int __init patch_ca0132_init(void)
4701 4686
4702static void __exit patch_ca0132_exit(void) 4687static void __exit patch_ca0132_exit(void)
4703{ 4688{
4704 release_cached_firmware();
4705 snd_hda_delete_codec_preset(&ca0132_list); 4689 snd_hda_delete_codec_preset(&ca0132_list);
4706} 4690}
4707 4691