mixer.h 1.5 KB

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