mixer.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. /* the usb audio specification version this interface complies to */
  12. int protocol;
  13. /* Sound Blaster remote control stuff */
  14. const struct rc_config *rc_cfg;
  15. u32 rc_code;
  16. wait_queue_head_t rc_waitq;
  17. struct urb *rc_urb;
  18. struct usb_ctrlrequest *rc_setup_packet;
  19. u8 rc_buffer[6];
  20. u8 audigy2nx_leds[3];
  21. u8 xonar_u1_status;
  22. };
  23. #define MAX_CHANNELS 10 /* max logical channels */
  24. struct usb_mixer_elem_info {
  25. struct usb_mixer_interface *mixer;
  26. struct usb_mixer_elem_info *next_id_elem; /* list of controls with same id */
  27. struct snd_ctl_elem_id *elem_id;
  28. unsigned int id;
  29. unsigned int control; /* CS or ICN (high byte) */
  30. unsigned int cmask; /* channel mask bitmap: 0 = master */
  31. unsigned int ch_readonly;
  32. unsigned int master_readonly;
  33. int channels;
  34. int val_type;
  35. int min, max, res;
  36. int dBmin, dBmax;
  37. int cached;
  38. int cache_val[MAX_CHANNELS];
  39. u8 initialized;
  40. };
  41. int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif,
  42. int ignore_error);
  43. void snd_usb_mixer_disconnect(struct list_head *p);
  44. void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer, int unitid);
  45. int snd_usb_mixer_set_ctl_value(struct usb_mixer_elem_info *cval,
  46. int request, int validx, int value_set);
  47. #endif /* __USBMIXER_H */