From 4bc4dc4c4ba2a75a53aa3d9e43300c2b3fc11946 Mon Sep 17 00:00:00 2001 From: Alexander Leidinger Date: Sun, 26 Nov 2006 11:55:48 +0000 Subject: [PATCH] MFP4 (109713): Add OSS_GETVERSION ioctl for compatibility. Some ports expect this and fail to compile on -current ATM. Submitted by: ryanb --- sys/dev/sound/pcm/mixer.c | 3 +++ sys/sys/soundcard.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 1682c547ae4..d0f6946d1b9 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -830,6 +830,9 @@ mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread case SNDCTL_DSP_SET_RECSRC: ret = mixer_set_recroute(m, *arg_i); break; + case OSS_GETVERSION: + *arg_i = SOUND_VERSION; + break; default: ret = ENXIO; } diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h index 0342da33a22..0ae59698285 100644 --- a/sys/sys/soundcard.h +++ b/sys/sys/soundcard.h @@ -1608,6 +1608,11 @@ typedef unsigned short oss_peaks_t[MAX_PEAK_CHANNELS]; #define SNDCTL_DSP_GETOPEAKS _IOR('P', 44, oss_peaks_t) #define SNDCTL_DSP_POLICY _IOW('P', 45, int) /* See the manual */ +/* + * OSS_SYSIFO is obsolete. Use SNDCTL_SYSINFO insteads. + */ +#define OSS_GETVERSION _IOR ('M', 118, int) + /** * @brief Argument for SNDCTL_SYSINFO ioctl. *