struct ac97_codec<`a::A, `r::TR> {
  `a *`r private_data;
  
  char *name;
  int id;
  int dev_mixer;
  int type;

  int modem; //ignore width declaration-- can't override this anyway

  struct ac97_ops *codec_ops;


  u16 (*codec_read) (struct ac97_codec<`a,`r> *codec, u8 reg) __attribute__((no_throw));
  void (*codec_write) (struct ac97_codec<`a,`r> *codec, u8 reg, u16 val) __attribute__((no_throw));

  
  void (*codec_wait) (struct ac97_codec<`a,`r> *codec) __attribute__((no_throw));


  int modcnt;
  int supported_mixers;
  int stereo_mixers;
  int record_sources;


  int flags;

  int bit_resolution;


  int (*read_mixer) (struct ac97_codec<`a,`r> *codec, int oss_channel) __attribute__((no_throw));
  void (*write_mixer)(struct ac97_codec<`a,`r> *codec, int oss_channel,
		      unsigned int left, unsigned int right) __attribute__((no_throw)) ;
  int (*recmask_io) (struct ac97_codec<`a,`r> *codec, int rw, int mask) __attribute__((no_throw));
  int (*mixer_ioctl)(struct ac97_codec<`a,`r> *codec, unsigned int cmd, unsigned long arg) __attribute__((no_throw));


  unsigned int mixer_state[25];


  int (*modem_ioctl)(struct ac97_codec<`a,`r> *codec, unsigned int cmd, unsigned long arg) __attribute__((no_throw));
};

extern unsigned int ac97_set_dac_rate(struct ac97_codec<`a,`r::TR> *codec, unsigned int rate);
extern unsigned int ac97_set_adc_rate(struct ac97_codec<`a,`r::TR> *codec, unsigned int rate);
extern int ac97_probe_codec(struct ac97_codec<`a,`r::TR> *);

//sound.h
extern int register_sound_mixer(struct file_operations<`a,`r::TR> *fops, int dev);
extern int register_sound_dsp(struct file_operations<`a,`r::TR> *fops, int dev);
