1 #ifndef AIC3XXX_CFW_OPS_H_
2 #define AIC3XXX_CFW_OPS_H_
4 #ifdef AIC3XXX_CFW_HOST_BLD
5 void *aic3xxx_cfw_init(void *pcfw, int n);
6 void *aic3xxx_cfw_getpjt(void *ps);
7 cfw_project *aic3xxx_cfw_unpickle(void *,int);
8 unsigned int crc32(unsigned int *pdata, int n);
11 int aic3xxx_cfw_reload(void *pv, void *pcfw, int n);
12 int aic3xxx_cfw_setmode(void *pv, int mode);
13 int aic3xxx_cfw_setmode_cfg(void *pv, int mode, int cfg);
14 int aic3xxx_cfw_setcfg(void *pv, int cfg);
15 int aic3xxx_cfw_transition(void *pv, char *ttype);
16 int aic3xxx_cfw_set_pll(void *pv, int asi);
19 #define AIC3XX_COPS_MDSP_D (0x00000003u)
20 #define AIC3XX_COPS_MDSP_A (0x00000030u)
21 #define AIC3XX_COPS_MDSP_ALL (AIC3XX_COPS_MDSP_D|AIC3XX_COPS_MDSP_A)
23 #define AIC3XX_ABUF_MDSP_D1 (0x00000001u)
24 #define AIC3XX_ABUF_MDSP_D2 (0x00000002u)
25 #define AIC3XX_ABUF_MDSP_A (0x00000010u)
26 #define AIC3XX_ABUF_MDSP_ALL \
27 (AIC3XX_ABUF_MDSP_D1| AIC3XX_ABUF_MDSP_D2| AIC3XX_ABUF_MDSP_A)
29 typedef struct aic3xxx_codec_ops {
30 int (*reg_read)(void *p, unsigned int reg);
31 int (*reg_write)(void *p, unsigned int reg,
33 int (*set_bits)(void *p, unsigned int reg,
34 unsigned char mask, unsigned char val);
35 int (*bulk_read)(void *p, unsigned int reg,
37 int (*bulk_write)(void *p, unsigned int reg,
38 int count, const u8 *buf);
41 int (*unlock)(void *p);
42 int (*stop)(void *p, int mask);
43 int (*restore)(void *p, int runstate);
44 int (*bswap)(void *p,int mask);
47 typedef struct cfw_state {
49 const aic3xxx_codec_ops *ops;
57 #ifndef AIC3XXX_CFW_HOST_BLD
60 # define DBG(fmt,...) printk("CFW[%s:%d]: " fmt "\n", \
61 __FILE__, __LINE__, ##__VA_ARGS__)