Add ossaudio support for COMPAT_LINUX32, with help from mrg. With this
change, audio now works on amd64 with native firefox, nspluginwrapper, and the 32-bit linux flash binaries.
This commit is contained in:
parent
c40d447080
commit
c0e43ab0d6
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux32_ioctl.c,v 1.9 2007/12/20 23:02:58 dsl Exp $ */
|
||||
/* $NetBSD: linux32_ioctl.c,v 1.10 2008/01/22 01:05:05 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_ioctl.c,v 1.9 2007/12/20 23:02:58 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_ioctl.c,v 1.10 2008/01/22 01:05:05 jmcneill Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -53,6 +53,9 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_ioctl.c,v 1.9 2007/12/20 23:02:58 dsl Exp $"
|
||||
#include <compat/linux32/common/linux32_sysctl.h>
|
||||
#include <compat/linux32/linux32_syscallargs.h>
|
||||
|
||||
#include <compat/ossaudio/ossaudio.h>
|
||||
#include <compat/ossaudio/ossaudiovar.h>
|
||||
|
||||
extern int linux_ioctl_socket(struct lwp *,
|
||||
struct linux_sys_ioctl_args *, register_t *);
|
||||
|
||||
@ -64,6 +67,7 @@ linux32_sys_ioctl(struct lwp *l, const struct linux32_sys_ioctl_args *uap, regis
|
||||
syscallarg(netbsd32_u_long) com;
|
||||
syscallarg(netbsd32_charp) data;
|
||||
} */
|
||||
struct oss_sys_ioctl_args ossuap;
|
||||
int group;
|
||||
int error;
|
||||
|
||||
@ -78,6 +82,27 @@ linux32_sys_ioctl(struct lwp *l, const struct linux32_sys_ioctl_args *uap, regis
|
||||
case 'T':
|
||||
error = linux32_ioctl_termios(l, uap, retval);
|
||||
break;
|
||||
case 'M':
|
||||
case 'Q':
|
||||
case 'P':
|
||||
SCARG(&ossuap, fd) = SCARG(uap, fd);
|
||||
SCARG(&ossuap, com) = (u_long)SCARG(uap, com);
|
||||
SCARG(&ossuap, data) = SCARG_P32(uap, data);
|
||||
switch (group) {
|
||||
case 'M':
|
||||
error = oss_ioctl_mixer(l, &ossuap, retval);
|
||||
break;
|
||||
case 'Q':
|
||||
error = oss_ioctl_sequencer(l, &ossuap, retval);
|
||||
break;
|
||||
case 'P':
|
||||
error = oss_ioctl_audio(l, &ossuap, retval);
|
||||
break;
|
||||
default:
|
||||
error = EINVAL; /* shutup gcc */
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 0x89: {
|
||||
struct linux_sys_ioctl_args cup;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ossaudiovar.h,v 1.13 2007/09/18 19:49:53 mlelstv Exp $ */
|
||||
/* $NetBSD: ossaudiovar.h,v 1.14 2008/01/22 01:05:05 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -44,7 +44,7 @@ struct oss_sys_ioctl_args {
|
||||
#define OSS_IOC_IN 0x40000000 /* copy in parameters */
|
||||
#define OSS_IOC_OUT 0x80000000 /* copy out parameters */
|
||||
#define OSS_IOC_INOUT (OSS_IOC_IN | OSS_IOC_OUT)
|
||||
#define _OSS_IOCTL(w,x,y,z) ((int)((w)|(((z)&OSS_IOCPARM_MASK)<<16)|((x)<<8)|(y)))
|
||||
#define _OSS_IOCTL(w,x,y,z) ((uint)((w)|(((z)&OSS_IOCPARM_MASK)<<16)|((x)<<8)|(y)))
|
||||
#define _OSS_IO(x,y) _OSS_IOCTL(OSS_IOC_VOID, x, y, 0)
|
||||
#define _OSS_IOR(x,y,t) _OSS_IOCTL(OSS_IOC_OUT, x, y, sizeof(t))
|
||||
#define _OSS_IOW(x,y,t) _OSS_IOCTL(OSS_IOC_IN, x, y, sizeof(t))
|
||||
|
Loading…
Reference in New Issue
Block a user