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
@@ -193,6 +195,7 @@ struct tasdevice_priv {
193195 bool force_fwload_status ;
194196 bool playback_started ;
195197 bool isacpi ;
198+ bool isspi ;
196199 bool is_user_space_calidata ;
197200 unsigned int global_addr ;
198201
@@ -210,41 +213,31 @@ struct tasdevice_priv {
210213 int (* tasdevice_load_block )(struct tasdevice_priv * tas_priv ,
211214 struct tasdev_blk * block );
212215
216+ int (* change_chn_book )(struct tasdevice_priv * tas_priv ,
217+ unsigned short chn , int book );
218+ int (* update_bits )(struct tasdevice_priv * tas_priv ,
219+ unsigned short chn , unsigned int reg , unsigned int mask ,
220+ unsigned int value );
221+ int (* dev_read )(struct tasdevice_priv * tas_priv ,
222+ unsigned short chn , unsigned int reg , unsigned int * value );
223+ int (* dev_bulk_read )(struct tasdevice_priv * tas_priv ,
224+ unsigned short chn , unsigned int reg , unsigned char * p_data ,
225+ unsigned int n_length );
213226 int (* save_calibration )(struct tasdevice_priv * tas_priv );
214227 void (* apply_calibration )(struct tasdevice_priv * tas_priv );
215228};
216229
217- void tasdevice_reset (struct tasdevice_priv * tas_dev );
218- int tascodec_init (struct tasdevice_priv * tas_priv , void * codec ,
219- struct module * module ,
220- void (* cont )(const struct firmware * fw , void * context ));
221- struct tasdevice_priv * tasdevice_kzalloc (struct i2c_client * i2c );
222- int tasdevice_init (struct tasdevice_priv * tas_priv );
223- void tasdevice_remove (struct tasdevice_priv * tas_priv );
224- int tasdevice_save_calibration (struct tasdevice_priv * tas_priv );
225- void tasdevice_apply_calibration (struct tasdevice_priv * tas_priv );
226- int tasdev_chn_switch (struct tasdevice_priv * tas_priv ,
227- unsigned short chn );
228230int tasdevice_dev_read (struct tasdevice_priv * tas_priv ,
229231 unsigned short chn , unsigned int reg , unsigned int * value );
232+ int tasdevice_dev_bulk_read (struct tasdevice_priv * tas_priv ,
233+ unsigned short chn , unsigned int reg , unsigned char * p_data ,
234+ unsigned int n_length );
230235int tasdevice_dev_write (struct tasdevice_priv * tas_priv ,
231236 unsigned short chn , unsigned int reg , unsigned int value );
232237int tasdevice_dev_bulk_write (
233238 struct tasdevice_priv * tas_priv , unsigned short chn ,
234239 unsigned int reg , unsigned char * p_data , unsigned int n_length );
235- int tasdevice_dev_bulk_read (struct tasdevice_priv * tas_priv ,
236- unsigned short chn , unsigned int reg , unsigned char * p_data ,
237- unsigned int n_length );
238- int tasdevice_dev_update_bits (
239- struct tasdevice_priv * tasdevice , unsigned short chn ,
240- unsigned int reg , unsigned int mask , unsigned int value );
241- int tasdevice_amp_putvol (struct tasdevice_priv * tas_priv ,
242- struct snd_ctl_elem_value * ucontrol , struct soc_mixer_control * mc );
243- int tasdevice_amp_getvol (struct tasdevice_priv * tas_priv ,
244- struct snd_ctl_elem_value * ucontrol , struct soc_mixer_control * mc );
245- int tasdevice_digital_putvol (struct tasdevice_priv * tas_priv ,
246- struct snd_ctl_elem_value * ucontrol , struct soc_mixer_control * mc );
247- int tasdevice_digital_getvol (struct tasdevice_priv * tas_priv ,
248- struct snd_ctl_elem_value * ucontrol , struct soc_mixer_control * mc );
249-
240+ void tasdevice_remove (struct tasdevice_priv * tas_priv );
241+ int tasdevice_save_calibration (struct tasdevice_priv * tas_priv );
242+ void tasdevice_apply_calibration (struct tasdevice_priv * tas_priv );
250243#endif /* __TAS2781_H__ */
0 commit comments