mixer.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef __USBMIXER_H
  2. #define __USBMIXER_H
  3. struct usb_mixer_interface {
  4. struct snd_usb_audio *chip;
  5. unsigned int ctrlif;
  6. struct list_head list;
  7. unsigned int ignore_ctl_error;
  8. struct urb *urb;
  9. /* array[MAX_ID_ELEMS], indexed by unit id */
  10. struct usb_mixer_elem_info **id_elems;
  11. /* Sound Blaster remote control stuff */
  12. const struct rc_config *rc_cfg;
  13. u32 rc_code;
  14. wait_queue_head_t rc_waitq;
  15. struct urb *rc_urb;
  16. struct usb_ctrlrequest *rc_setup_packet;
  17. u8 rc_buffer[6];
  18. u8 audigy2nx_leds[3];
  19. u8 xonar_u1_status;
  20. };
  21. #define MAX_CHANNELS 10 /* max logical channels */
  22. struct usb_mixer_elem_info {
  23. struct usb_mixer_interface *mixer;
  24. struct usb_mixer_elem_info *next_id_elem; /* list of controls with same id */
  25. struct snd_ctl_elem_id *elem_id;
  26. unsigned int id;
  27. unsigned int control; /* CS or ICN (high byte) */
  28. unsigned int cmask; /* channel mask bitmap: 0 = master */
  29. int channels;
  30. int val_type;
  31. int min, max, res;
  32. int dBmin, dBmax;
  33. int cached;
  34. int cache_val[MAX_CHANNELS];
  35. u8 initialized;
  36. };
  37. int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif,
  38. int ignore_error);
  39. void snd_usb_mixer_disconnect(struct list_head *p);
  40. void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer, int unitid);
  41. int snd_usb_mixer_set_ctl_value(struct usb_mixer_elem_info *cval,
  42. int request, int validx, int value_set);
  43. #endif /* __USBMIXER_H */