ALSA: control: Provide a helper to look for the preferred subdevice
[deliverable/linux.git] / include / sound / control.h
index 042613938a1db4fdf1f5b0b3d5b373d90307887d..75f3054023f71182b6cf4ab89491c65180cb6292 100644 (file)
@@ -93,12 +93,17 @@ struct snd_kctl_event {
 
 struct pid;
 
+enum {
+       SND_CTL_SUBDEV_PCM,
+       SND_CTL_SUBDEV_RAWMIDI,
+       SND_CTL_SUBDEV_ITEMS,
+};
+
 struct snd_ctl_file {
        struct list_head list;          /* list of all control files */
        struct snd_card *card;
        struct pid *pid;
-       int prefer_pcm_subdevice;
-       int prefer_rawmidi_subdevice;
+       int preferred_subdevice[SND_CTL_SUBDEV_ITEMS];
        wait_queue_head_t change_sleep;
        spinlock_t read_lock;
        struct fasync_struct *fasync;
@@ -138,6 +143,8 @@ int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn);
 #define snd_ctl_unregister_ioctl_compat(fcn)
 #endif
 
+int snd_ctl_get_preferred_subdevice(struct snd_card *card, int type);
+
 static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id)
 {
        return id->numid - kctl->id.numid;
This page took 0.041096 seconds and 5 git commands to generate.