direct plugins (dmix) - suspend/resume fixes

- this patch adds support for suspend & result for dmix and other
  direct plugins
- the timer detection / initialization (TREAD support) was redesigned and
  the check for proper driver version was moved to the timer_hw.c
This commit is contained in:
Jaroslav Kysela 2005-08-16 12:19:15 +00:00
parent 7450dbcf36
commit bac9a7de83
8 changed files with 70 additions and 36 deletions

View file

@ -258,9 +258,14 @@ int snd_timer_hw_open(snd_timer_t **handle, const char *name, int dev_class, int
}
if (mode & SND_TIMER_OPEN_TREAD) {
int arg = 1;
if (ver < SNDRV_PROTOCOL_VERSION(2, 0, 3)) {
ret = -ENOTTY;
goto __no_tread;
}
if (ioctl(fd, SNDRV_TIMER_IOCTL_TREAD, &arg) < 0) {
ret = -errno;
close(fd);
__no_tread:
SNDERR("extended read is not supported (SNDRV_TIMER_IOCTL_TREAD)");
return ret;
}