mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
Updates for the control interface...
This commit is contained in:
parent
d00535cc1b
commit
227fe9d226
4 changed files with 19 additions and 2 deletions
|
|
@ -29,7 +29,7 @@
|
|||
#include "asoundlib.h"
|
||||
|
||||
#define SND_FILE_CONTROL "/dev/snd/controlC%i"
|
||||
#define SND_CTL_VERSION_MAX SND_PROTOCOL_VERSION( 1, 0, 0 )
|
||||
#define SND_CTL_VERSION_MAX SND_PROTOCOL_VERSION(2, 0, 0)
|
||||
|
||||
struct snd_ctl {
|
||||
int card;
|
||||
|
|
@ -143,6 +143,20 @@ int snd_ctl_switch_write(snd_ctl_t *handle, snd_switch_t *sw)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int snd_ctl_hwdep_info(snd_ctl_t *handle, int dev, snd_hwdep_info_t * info)
|
||||
{
|
||||
snd_ctl_t *ctl;
|
||||
|
||||
ctl = handle;
|
||||
if (!ctl || !info || dev < 0)
|
||||
return -EINVAL;
|
||||
if (ioctl(ctl->fd, SND_CTL_IOCTL_HWDEP_DEVICE, &dev) < 0)
|
||||
return -errno;
|
||||
if (ioctl(ctl->fd, SND_CTL_IOCTL_HWDEP_INFO, info) < 0)
|
||||
return -errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_ctl_pcm_info(snd_ctl_t *handle, int dev, snd_pcm_info_t * info)
|
||||
{
|
||||
snd_ctl_t *ctl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue