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