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