tanimura implemented SNDCTL_DSP_GETODELAY for pcm.

Submitted by: tanimura
This commit is contained in:
Alfred Perlstein 1999-11-29 23:01:59 +00:00
parent 245efbba4d
commit 4d25c041fe
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53901
2 changed files with 11 additions and 0 deletions

View File

@ -509,6 +509,16 @@ dsp_ioctl(snddev_info *d, int chan, u_long cmd, caddr_t arg)
*arg_i |= PCM_ENABLE_INPUT;
break;
case SNDCTL_DSP_GETODELAY:
if (wrch) {
snd_dbuf *b = &wrch->buffer;
if (b->dl)
chn_dmaupdate(wrch);
*arg = b->total;
} else
ret = EINVAL;
break;
case SNDCTL_DSP_MAPINBUF:
case SNDCTL_DSP_MAPOUTBUF:
case SNDCTL_DSP_SETSYNCRO:

View File

@ -798,6 +798,7 @@ typedef struct buffmem_desc {
#define SNDCTL_DSP_MAPINBUF _IOR ('P', 19, buffmem_desc)
#define SNDCTL_DSP_MAPOUTBUF _IOR ('P', 20, buffmem_desc)
#define SNDCTL_DSP_SETSYNCRO _IO ('P', 21)
#define SNDCTL_DSP_GETODELAY _IOR ('P', 23, int)
/*
* I guess these are the readonly version of the same