vserver 1.9.5.x5
[linux-2.6.git] / include / sound / vx_core.h
index d3d90e1..a7e2993 100644 (file)
 #include <sound/hwdep.h>
 #include <linux/interrupt.h>
 
+#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
+#if !defined(CONFIG_USE_VXLOADER) && !defined(CONFIG_SND_VX_LIB) /* built-in kernel */
+#define SND_VX_FW_LOADER       /* use the standard firmware loader */
+#endif
+#endif
+
+struct firmware;
+struct device;
+
 typedef struct snd_vx_core vx_core_t;
 typedef struct vx_pipe vx_pipe_t;
 
@@ -100,7 +109,7 @@ struct snd_vx_ops {
        void (*change_audio_source)(vx_core_t *chip, int src);
        void (*set_clock_source)(vx_core_t *chp, int src);
        /* chip init */
-       int (*load_dsp)(vx_core_t *chip, const snd_hwdep_dsp_image_t *dsp);
+       int (*load_dsp)(vx_core_t *chip, int idx, const struct firmware *fw);
        void (*reset_dsp)(vx_core_t *chip);
        void (*reset_board)(vx_core_t *chip, int cold_reset);
        int (*add_controls)(vx_core_t *chip);
@@ -169,6 +178,7 @@ struct snd_vx_core {
        unsigned int chip_status;
        unsigned int pcm_running;
 
+       struct device *dev;
        snd_hwdep_t *hwdep;
 
        struct vx_rmh irq_rmh;  /* RMH used in interrupts */
@@ -198,6 +208,8 @@ struct snd_vx_core {
        unsigned char audio_monitor_active[4];  /* playback hw-monitor mute/unmute */
 
        struct semaphore mixer_mutex;
+
+       const struct firmware *firmware[4]; /* loaded firmware data */
 };
 
 
@@ -206,25 +218,18 @@ struct snd_vx_core {
  */
 vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw,
                         struct snd_vx_ops *ops, int extra_size);
-int snd_vx_hwdep_new(vx_core_t *chip);
-int snd_vx_load_boot_image(vx_core_t *chip, const snd_hwdep_dsp_image_t *boot);
-int snd_vx_dsp_boot(vx_core_t *chip, const snd_hwdep_dsp_image_t *boot);
-int snd_vx_dsp_load(vx_core_t *chip, const snd_hwdep_dsp_image_t *dsp);
+int snd_vx_setup_firmware(vx_core_t *chip);
+int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *dsp);
+int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *dsp);
+int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp);
+
+void snd_vx_free_firmware(vx_core_t *chip);
 
 /*
  * interrupt handler; exported for pcmcia
  */
 irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs);
 
-/*
- * power-management routines
- */
-#ifdef CONFIG_PM
-void snd_vx_suspend(vx_core_t *chip);
-void snd_vx_resume(vx_core_t *chip);
-#endif
-
-
 /*
  * lowlevel functions
  */
@@ -340,7 +345,6 @@ int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active);
  */
 void vx_set_iec958_status(vx_core_t *chip, unsigned int bits);
 int vx_set_clock(vx_core_t *chip, unsigned int freq);
-void vx_change_clock_source(vx_core_t *chip, int source);
 void vx_set_internal_clock(vx_core_t *chip, unsigned int freq);
 int vx_change_frequency(vx_core_t *chip);