mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
Changes and cleanups for the timer API.
The device lists use the next device syntax now.
This commit is contained in:
parent
61e95094e7
commit
35cb79860d
12 changed files with 204 additions and 78 deletions
|
|
@ -184,6 +184,20 @@ static int snd_ctl_shm_cwrite(snd_ctl_t *ctl, snd_control_t *control)
|
|||
return err;
|
||||
}
|
||||
|
||||
static int snd_ctl_shm_hwdep_next_device(snd_ctl_t *ctl, int * device)
|
||||
{
|
||||
snd_ctl_shm_t *shm = ctl->private;
|
||||
snd_ctl_shm_ctrl_t *ctrl = shm->ctrl;
|
||||
int err;
|
||||
ctrl->u.device = *device;
|
||||
ctrl->cmd = SND_CTL_IOCTL_HWDEP_NEXT_DEVICE;
|
||||
err = snd_ctl_shm_action(ctl);
|
||||
if (err < 0)
|
||||
return err;
|
||||
*device = ctrl->u.device;
|
||||
return err;
|
||||
}
|
||||
|
||||
static int snd_ctl_shm_hwdep_info(snd_ctl_t *ctl, snd_hwdep_info_t * info)
|
||||
{
|
||||
snd_ctl_shm_t *shm = ctl->private;
|
||||
|
|
@ -198,6 +212,20 @@ static int snd_ctl_shm_hwdep_info(snd_ctl_t *ctl, snd_hwdep_info_t * info)
|
|||
return err;
|
||||
}
|
||||
|
||||
static int snd_ctl_shm_pcm_next_device(snd_ctl_t *ctl, int * device)
|
||||
{
|
||||
snd_ctl_shm_t *shm = ctl->private;
|
||||
snd_ctl_shm_ctrl_t *ctrl = shm->ctrl;
|
||||
int err;
|
||||
ctrl->u.device = *device;
|
||||
ctrl->cmd = SND_CTL_IOCTL_PCM_NEXT_DEVICE;
|
||||
err = snd_ctl_shm_action(ctl);
|
||||
if (err < 0)
|
||||
return err;
|
||||
*device = ctrl->u.device;
|
||||
return err;
|
||||
}
|
||||
|
||||
static int snd_ctl_shm_pcm_info(snd_ctl_t *ctl, snd_pcm_info_t * info)
|
||||
{
|
||||
snd_ctl_shm_t *shm = ctl->private;
|
||||
|
|
@ -225,6 +253,20 @@ static int snd_ctl_shm_pcm_prefer_subdevice(snd_ctl_t *ctl, int subdev)
|
|||
return err;
|
||||
}
|
||||
|
||||
static int snd_ctl_shm_rawmidi_next_device(snd_ctl_t *ctl, int * device)
|
||||
{
|
||||
snd_ctl_shm_t *shm = ctl->private;
|
||||
snd_ctl_shm_ctrl_t *ctrl = shm->ctrl;
|
||||
int err;
|
||||
ctrl->u.device = *device;
|
||||
ctrl->cmd = SND_CTL_IOCTL_RAWMIDI_NEXT_DEVICE;
|
||||
err = snd_ctl_shm_action(ctl);
|
||||
if (err < 0)
|
||||
return err;
|
||||
*device = ctrl->u.device;
|
||||
return err;
|
||||
}
|
||||
|
||||
static int snd_ctl_shm_rawmidi_info(snd_ctl_t *ctl, snd_rawmidi_info_t * info)
|
||||
{
|
||||
snd_ctl_shm_t *shm = ctl->private;
|
||||
|
|
@ -274,9 +316,12 @@ snd_ctl_ops_t snd_ctl_shm_ops = {
|
|||
cinfo: snd_ctl_shm_cinfo,
|
||||
cread: snd_ctl_shm_cread,
|
||||
cwrite: snd_ctl_shm_cwrite,
|
||||
hwdep_next_device: snd_ctl_shm_hwdep_next_device,
|
||||
hwdep_info: snd_ctl_shm_hwdep_info,
|
||||
pcm_next_device: snd_ctl_shm_pcm_next_device,
|
||||
pcm_info: snd_ctl_shm_pcm_info,
|
||||
pcm_prefer_subdevice: snd_ctl_shm_pcm_prefer_subdevice,
|
||||
rawmidi_next_device: snd_ctl_shm_rawmidi_next_device,
|
||||
rawmidi_info: snd_ctl_shm_rawmidi_info,
|
||||
rawmidi_prefer_subdevice: snd_ctl_shm_rawmidi_prefer_subdevice,
|
||||
read: snd_ctl_shm_read,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue