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
|
|
@ -94,6 +94,14 @@ static int snd_ctl_hw_cwrite(snd_ctl_t *handle, snd_control_t *control)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ctl_hw_hwdep_next_device(snd_ctl_t *handle, int * device)
|
||||
{
|
||||
snd_ctl_hw_t *hw = handle->private;
|
||||
if (ioctl(hw->fd, SND_CTL_IOCTL_HWDEP_NEXT_DEVICE, device) < 0)
|
||||
return -errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ctl_hw_hwdep_info(snd_ctl_t *handle, snd_hwdep_info_t * info)
|
||||
{
|
||||
snd_ctl_hw_t *hw = handle->private;
|
||||
|
|
@ -102,6 +110,14 @@ static int snd_ctl_hw_hwdep_info(snd_ctl_t *handle, snd_hwdep_info_t * info)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ctl_hw_pcm_next_device(snd_ctl_t *handle, int * device)
|
||||
{
|
||||
snd_ctl_hw_t *hw = handle->private;
|
||||
if (ioctl(hw->fd, SND_CTL_IOCTL_PCM_NEXT_DEVICE, device) < 0)
|
||||
return -errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ctl_hw_pcm_info(snd_ctl_t *handle, snd_pcm_info_t * info)
|
||||
{
|
||||
snd_ctl_hw_t *hw = handle->private;
|
||||
|
|
@ -118,6 +134,14 @@ static int snd_ctl_hw_pcm_prefer_subdevice(snd_ctl_t *handle, int subdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ctl_hw_rawmidi_next_device(snd_ctl_t *handle, int * device)
|
||||
{
|
||||
snd_ctl_hw_t *hw = handle->private;
|
||||
if (ioctl(hw->fd, SND_CTL_IOCTL_RAWMIDI_NEXT_DEVICE, device) < 0)
|
||||
return -errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ctl_hw_rawmidi_info(snd_ctl_t *handle, snd_rawmidi_info_t * info)
|
||||
{
|
||||
snd_ctl_hw_t *hw = handle->private;
|
||||
|
|
@ -148,9 +172,12 @@ snd_ctl_ops_t snd_ctl_hw_ops = {
|
|||
cinfo: snd_ctl_hw_cinfo,
|
||||
cread: snd_ctl_hw_cread,
|
||||
cwrite: snd_ctl_hw_cwrite,
|
||||
hwdep_next_device: snd_ctl_hw_hwdep_next_device,
|
||||
hwdep_info: snd_ctl_hw_hwdep_info,
|
||||
pcm_next_device: snd_ctl_hw_pcm_next_device,
|
||||
pcm_info: snd_ctl_hw_pcm_info,
|
||||
pcm_prefer_subdevice: snd_ctl_hw_pcm_prefer_subdevice,
|
||||
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,
|
||||
read: snd_ctl_hw_read,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue