Updated to new timer API

This commit is contained in:
Jaroslav Kysela 2003-03-04 20:01:06 +00:00
parent 6a949ee804
commit 9c084c4ba6
8 changed files with 234 additions and 18 deletions

View file

@ -233,6 +233,15 @@ int snd_timer_hw_open(snd_timer_t **handle, const char *name, int dev_class, int
close(fd);
return -SND_ERROR_INCOMPATIBLE_VERSION;
}
if (mode & SND_TIMER_OPEN_TREAD) {
int arg = 1;
if (ioctl(fd, SNDRV_TIMER_IOCTL_TREAD, &arg) < 0) {
ret = -errno;
close(fd);
SNDERR("extended read is not supported (SNDRV_TIMER_IOCTL_TREAD)");
return ret;
}
}
memset(&sel, 0, sizeof(sel));
sel.id.dev_class = dev_class;
sel.id.dev_sclass = dev_sclass;