From 2f1b68b920febe232351fb0c87a982e02ec50e32 Mon Sep 17 00:00:00 2001 From: Alexander Polakov Date: Sat, 3 Apr 2010 00:23:00 +0400 Subject: [PATCH] sound: implement OSS_GETVERSION. It's required by some software, emulators/qemu to mention. Obtained-from: FreeBSD --- sys/dev/sound/pcm/mixer.c | 6 ++++++ sys/sys/soundcard.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index a8f11841fa..8047e3ed19 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -683,6 +683,12 @@ mixer_ioctl(struct dev_ioctl_args *ap) return EBADF; } + if (cmd == OSS_GETVERSION) { + arg = SOUND_VERSION; + snd_mtxunlock(m->lock); + return 0; + } + if ((cmd & MIXER_WRITE(0)) == MIXER_WRITE(0)) { if (j == SOUND_MIXER_RECSRC) ret = mixer_setrecsrc(m, *arg_i); diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h index 8c07c79015..1bc34fe44d 100644 --- a/sys/sys/soundcard.h +++ b/sys/sys/soundcard.h @@ -1092,6 +1092,9 @@ typedef struct mixer_info { #define SOUND_MIXER_INFO _IOR('M', 101, mixer_info) +/* Some apps require this */ +#define OSS_GETVERSION _IOR ('M', 118, int) + #define LEFT_CHN 0 #define RIGHT_CHN 1 -- 2.41.0