mixer.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. int channels;
  32. int val_type;
  33. int min, max, res;
  34. int dBmin, dBmax;
  35. int cached;
  36. int cache_val[MAX_CHANNELS];
  37. u8 initialized;
  38. };
  39. int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif,
  40. int ignore_error);
  41. void snd_usb_mixer_disconnect(struct list_head *p);
  42. void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer, int unitid);
  43. int snd_usb_mixer_set_ctl_value(struct usb_mixer_elem_info *cval,
  44. int request, int validx, int value_set);
  45. #endif /* __USBMIXER_H */