X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fsound%2Fvx_core.h;h=a7e29933f2d08a493f978eefaad5393abe79a89a;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=d3d90e1f25fd22eabbabd7deda2efdf4ecf624ba;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/sound/vx_core.h b/include/sound/vx_core.h index d3d90e1f2..a7e29933f 100644 --- a/include/sound/vx_core.h +++ b/include/sound/vx_core.h @@ -27,6 +27,15 @@ #include #include +#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);