Skip to content

Commit

Permalink
sound: implement OSS_GETVERSION.
Browse files Browse the repository at this point in the history
 It's required by some software, emulators/qemu to mention.

 Obtained-from: FreeBSD
  • Loading branch information
Alexander Polakov committed Apr 17, 2010
1 parent aedbaf3 commit 2f1b68b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sys/dev/sound/pcm/mixer.c
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions sys/sys/soundcard.h
Expand Up @@ -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

Expand Down

0 comments on commit 2f1b68b

Please sign in to comment.