int snd_ctl_rawmidi_next_device(snd_ctl_t *ctl, int * device);
int snd_ctl_rawmidi_info(snd_ctl_t *ctl, snd_rawmidi_info_t * info);
int snd_ctl_rawmidi_prefer_subdevice(snd_ctl_t *ctl, int subdev);
+int snd_ctl_ump_next_device(snd_ctl_t *ctl, int *device);
#endif
int snd_ctl_set_power_state(snd_ctl_t *ctl, unsigned int state);
int snd_ctl_get_power_state(snd_ctl_t *ctl, unsigned int *state);
global:
@SYMBOL_PREFIX@snd_ump_*;
+ @SYMBOL_PREFIX@snd_ctl_ump_next_device;
} ALSA_1.2.9;
return ctl->ops->rawmidi_prefer_subdevice(ctl, subdev);
}
+/**
+ * \brief Get next UMP device number
+ * \param ctl CTL handle
+ * \param device current device on entry and next device on return
+ * \return 0 on success otherwise a negative error code
+ */
+int snd_ctl_ump_next_device(snd_ctl_t *ctl, int *device)
+{
+ assert(ctl && device);
+ if (ctl->ops->ump_next_device)
+ return ctl->ops->ump_next_device(ctl, device);
+ return -ENXIO;
+}
+
/**
* \brief Set Power State to given SND_CTL_POWER_* value and do the power management
* \param ctl CTL handle
return 0;
}
+static int snd_ctl_hw_ump_next_device(snd_ctl_t *handle, int *device)
+{
+ snd_ctl_hw_t *hw = handle->private_data;
+ if (ioctl(hw->fd, SNDRV_CTL_IOCTL_UMP_NEXT_DEVICE, device) < 0)
+ return -errno;
+ return 0;
+}
+
static int snd_ctl_hw_set_power_state(snd_ctl_t *handle, unsigned int state)
{
snd_ctl_hw_t *hw = handle->private_data;
.rawmidi_next_device = snd_ctl_hw_rawmidi_next_device,
.rawmidi_info = snd_ctl_hw_rawmidi_info,
.rawmidi_prefer_subdevice = snd_ctl_hw_rawmidi_prefer_subdevice,
+ .ump_next_device = snd_ctl_hw_ump_next_device,
.set_power_state = snd_ctl_hw_set_power_state,
.get_power_state = snd_ctl_hw_get_power_state,
.read = snd_ctl_hw_read,
int (*rawmidi_next_device)(snd_ctl_t *handle, int *device);
int (*rawmidi_info)(snd_ctl_t *handle, snd_rawmidi_info_t * info);
int (*rawmidi_prefer_subdevice)(snd_ctl_t *handle, int subdev);
+ int (*ump_next_device)(snd_ctl_t *handle, int *device);
int (*set_power_state)(snd_ctl_t *handle, unsigned int state);
int (*get_power_state)(snd_ctl_t *handle, unsigned int *state);
int (*read)(snd_ctl_t *handle, snd_ctl_event_t *event);