diff options
Diffstat (limited to 'include/sound/control.h')
-rw-r--r-- | include/sound/control.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/sound/control.h b/include/sound/control.h index 042613938a1d..75f3054023f7 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -93,12 +93,17 @@ struct snd_kctl_event { | |||
93 | 93 | ||
94 | struct pid; | 94 | struct pid; |
95 | 95 | ||
96 | enum { | ||
97 | SND_CTL_SUBDEV_PCM, | ||
98 | SND_CTL_SUBDEV_RAWMIDI, | ||
99 | SND_CTL_SUBDEV_ITEMS, | ||
100 | }; | ||
101 | |||
96 | struct snd_ctl_file { | 102 | struct snd_ctl_file { |
97 | struct list_head list; /* list of all control files */ | 103 | struct list_head list; /* list of all control files */ |
98 | struct snd_card *card; | 104 | struct snd_card *card; |
99 | struct pid *pid; | 105 | struct pid *pid; |
100 | int prefer_pcm_subdevice; | 106 | int preferred_subdevice[SND_CTL_SUBDEV_ITEMS]; |
101 | int prefer_rawmidi_subdevice; | ||
102 | wait_queue_head_t change_sleep; | 107 | wait_queue_head_t change_sleep; |
103 | spinlock_t read_lock; | 108 | spinlock_t read_lock; |
104 | struct fasync_struct *fasync; | 109 | struct fasync_struct *fasync; |
@@ -138,6 +143,8 @@ int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn); | |||
138 | #define snd_ctl_unregister_ioctl_compat(fcn) | 143 | #define snd_ctl_unregister_ioctl_compat(fcn) |
139 | #endif | 144 | #endif |
140 | 145 | ||
146 | int snd_ctl_get_preferred_subdevice(struct snd_card *card, int type); | ||
147 | |||
141 | static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id) | 148 | static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id) |
142 | { | 149 | { |
143 | return id->numid - kctl->id.numid; | 150 | return id->numid - kctl->id.numid; |