aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio/echoaudio.h
diff options
context:
space:
mode:
authorGiuliano Pochini <pochini@shiny.it>2010-02-14 18:15:51 +0100
committerTakashi Iwai <tiwai@suse.de>2010-02-15 10:38:10 +0100
commit4f8ada444cc7a7ea70cdc81f098b34c5f1f2df41 (patch)
treeded4e81a8e822ee43bdcaab71084c7b0bd58701f /sound/pci/echoaudio/echoaudio.h
parentALSA: Echoaudio - Add firmware cache #1 (diff)
downloadlinux-dev-4f8ada444cc7a7ea70cdc81f098b34c5f1f2df41.tar.xz
linux-dev-4f8ada444cc7a7ea70cdc81f098b34c5f1f2df41.zip
ALSA: Echoaudio - Add firmware cache #2
This patch implements a simple cache for the firmware files when CONFIG_PM is defined. This patch changes get_firmware(), free_firmware() and adds free_firmware_cache(). The first two functions implement a very simple cache and the latter is used to actually release all the stored firmwares when the module is unloaded. When CONFIG_PM is not enabled those functions act as before, that is free_firmware() releases the firmware immediately and free_firmware_cache() does nothing. Signed-off-by: Giuliano Pochini <pochini@shiny.it> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '')
-rw-r--r--sound/pci/echoaudio/echoaudio.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/echoaudio/echoaudio.h b/sound/pci/echoaudio/echoaudio.h
index be76ef3b829a..a84c0d15cc50 100644
--- a/sound/pci/echoaudio/echoaudio.h
+++ b/sound/pci/echoaudio/echoaudio.h
@@ -449,6 +449,9 @@ struct echoaudio {
volatile u32 __iomem *dsp_registers; /* DSP's register base */
u32 active_mask; /* Chs. active mask or
* punks out */
+#ifdef CONFIG_PM
+ const struct firmware *fw_cache[8]; /* Cached firmwares */
+#endif
#ifdef ECHOCARD_HAS_MIDI
u16 mtc_state; /* State for MIDI input parsing state machine */