3232 SNDRV_PCM_FMTBIT_S24_LE | \
3333 SNDRV_PCM_FMTBIT_S32_LE)
3434
35+ #define TASDEVICE_CRC8_POLYNOMIAL 0x4d
36+
3537/* PAGE Control Register (available in page0 of each book) */
3638#define TASDEVICE_PAGE_SELECT 0x00
3739#define TASDEVICE_BOOKCTL_PAGE 0x00
@@ -216,6 +218,7 @@ struct tasdevice_priv {
216218 bool force_fwload_status ;
217219 bool playback_started ;
218220 bool isacpi ;
221+ bool isspi ;
219222 bool is_user_space_calidata ;
220223 unsigned int global_addr ;
221224
@@ -233,41 +236,31 @@ struct tasdevice_priv {
233236 int (* tasdevice_load_block )(struct tasdevice_priv * tas_priv ,
234237 struct tasdev_blk * block );
235238
239+ int (* change_chn_book )(struct tasdevice_priv * tas_priv ,
240+ unsigned short chn , int book );
241+ int (* update_bits )(struct tasdevice_priv * tas_priv ,
242+ unsigned short chn , unsigned int reg , unsigned int mask ,
243+ unsigned int value );
244+ int (* dev_read )(struct tasdevice_priv * tas_priv ,
245+ unsigned short chn , unsigned int reg , unsigned int * value );
246+ int (* dev_bulk_read )(struct tasdevice_priv * tas_priv ,
247+ unsigned short chn , unsigned int reg , unsigned char * p_data ,
248+ unsigned int n_length );
236249 int (* save_calibration )(struct tasdevice_priv * tas_priv );
237250 void (* apply_calibration )(struct tasdevice_priv * tas_priv );
238251};
239252
240- void tasdevice_reset (struct tasdevice_priv * tas_dev );
241- int tascodec_init (struct tasdevice_priv * tas_priv , void * codec ,
242- struct module * module ,
243- void (* cont )(const struct firmware * fw , void * context ));
244- struct tasdevice_priv * tasdevice_kzalloc (struct i2c_client * i2c );
245- int tasdevice_init (struct tasdevice_priv * tas_priv );
246- void tasdevice_remove (struct tasdevice_priv * tas_priv );
247- int tasdevice_save_calibration (struct tasdevice_priv * tas_priv );
248- void tasdevice_apply_calibration (struct tasdevice_priv * tas_priv );
249- int tasdev_chn_switch (struct tasdevice_priv * tas_priv ,
250- unsigned short chn );
251253int tasdevice_dev_read (struct tasdevice_priv * tas_priv ,
252254 unsigned short chn , unsigned int reg , unsigned int * value );
255+ int tasdevice_dev_bulk_read (struct tasdevice_priv * tas_priv ,
256+ unsigned short chn , unsigned int reg , unsigned char * p_data ,
257+ unsigned int n_length );
253258int tasdevice_dev_write (struct tasdevice_priv * tas_priv ,
254259 unsigned short chn , unsigned int reg , unsigned int value );
255260int tasdevice_dev_bulk_write (
256261 struct tasdevice_priv * tas_priv , unsigned short chn ,
257262 unsigned int reg , unsigned char * p_data , unsigned int n_length );
258- int tasdevice_dev_bulk_read (struct tasdevice_priv * tas_priv ,
259- unsigned short chn , unsigned int reg , unsigned char * p_data ,
260- unsigned int n_length );
261- int tasdevice_dev_update_bits (
262- struct tasdevice_priv * tasdevice , unsigned short chn ,
263- unsigned int reg , unsigned int mask , unsigned int value );
264- int tasdevice_amp_putvol (struct tasdevice_priv * tas_priv ,
265- struct snd_ctl_elem_value * ucontrol , struct soc_mixer_control * mc );
266- int tasdevice_amp_getvol (struct tasdevice_priv * tas_priv ,
267- struct snd_ctl_elem_value * ucontrol , struct soc_mixer_control * mc );
268- int tasdevice_digital_putvol (struct tasdevice_priv * tas_priv ,
269- struct snd_ctl_elem_value * ucontrol , struct soc_mixer_control * mc );
270- int tasdevice_digital_getvol (struct tasdevice_priv * tas_priv ,
271- struct snd_ctl_elem_value * ucontrol , struct soc_mixer_control * mc );
272-
263+ void tasdevice_remove (struct tasdevice_priv * tas_priv );
264+ int tasdevice_save_calibration (struct tasdevice_priv * tas_priv );
265+ void tasdevice_apply_calibration (struct tasdevice_priv * tas_priv );
273266#endif /* __TAS2781_H__ */
0 commit comments