Implement OSS_SNDCTL_DSP_GETODELAY and provide a no-op function
for OSS_SNDCTL_DSP_PROFILE.
This commit is contained in:
parent
c777421532
commit
6abb2a41f4
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ossaudio.c,v 1.21 2007/06/11 13:05:46 joerg Exp $ */
|
||||
/* $NetBSD: ossaudio.c,v 1.22 2007/09/18 22:57:31 mlelstv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: ossaudio.c,v 1.21 2007/06/11 13:05:46 joerg Exp $");
|
||||
__RCSID("$NetBSD: ossaudio.c,v 1.22 2007/09/18 22:57:31 mlelstv Exp $");
|
||||
|
||||
/*
|
||||
* This is an OSS (Linux) sound API emulator.
|
||||
@ -434,10 +434,21 @@ audio_ioctl(int fd, unsigned long com, void *argp)
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
break;
|
||||
case SNDCTL_DSP_GETODELAY:
|
||||
retval = ioctl(fd, AUDIO_GETBUFINFO, &tmpinfo);
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
idat = tmpinfo.play.seek + tmpinfo.blocksize / 2;
|
||||
INTARG = idat;
|
||||
break;
|
||||
case SNDCTL_DSP_PROFILE:
|
||||
/* This gives just a hint to the driver,
|
||||
* implementing it as a NOP is ok
|
||||
*/
|
||||
break;
|
||||
case SNDCTL_DSP_MAPINBUF:
|
||||
case SNDCTL_DSP_MAPOUTBUF:
|
||||
case SNDCTL_DSP_SETSYNCRO:
|
||||
case SNDCTL_DSP_PROFILE:
|
||||
errno = EINVAL;
|
||||
return -1; /* XXX unimplemented */
|
||||
default:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: soundcard.h,v 1.15 2005/02/09 18:02:53 drochner Exp $ */
|
||||
/* $NetBSD: soundcard.h,v 1.16 2007/09/18 22:57:31 mlelstv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -99,6 +99,7 @@
|
||||
#define SNDCTL_DSP_SETSYNCRO _IO ('P', 21)
|
||||
#define SNDCTL_DSP_SETDUPLEX _IO ('P', 22)
|
||||
#define SNDCTL_DSP_PROFILE _IOW ('P', 23, int)
|
||||
#define SNDCTL_DSP_GETODELAY _IOR ('P', 23, int)
|
||||
#define APF_NORMAL 0
|
||||
#define APF_NETWORK 1
|
||||
#define APF_CPUINTENS 2
|
||||
|
Loading…
Reference in New Issue
Block a user