svn commit: r186875 - in head/sys: dev/sound/pcm sys

Alexander Motin mav at FreeBSD.org
Wed Jan 7 13:12:34 PST 2009


Author: mav
Date: Wed Jan  7 21:12:33 2009
New Revision: 186875
URL: http://svn.freebsd.org/changeset/base/186875

Log:
  Add some new oss_sysinfo structure fields from OSSv4.

Modified:
  head/sys/dev/sound/pcm/sound.c
  head/sys/sys/soundcard.h

Modified: head/sys/dev/sound/pcm/sound.c
==============================================================================
--- head/sys/dev/sound/pcm/sound.c	Wed Jan  7 21:10:16 2009	(r186874)
+++ head/sys/dev/sound/pcm/sound.c	Wed Jan  7 21:12:33 2009	(r186875)
@@ -1405,6 +1405,7 @@ sound_oss_sysinfo(oss_sysinfo *si)
 {
 	static char si_product[] = "FreeBSD native OSS ABI";
 	static char si_version[] = __XSTRING(__FreeBSD_version);
+	static char si_license[] = "BSD";
 	static int intnbits = sizeof(int) * 8;	/* Better suited as macro?
 						   Must pester a C guru. */
 
@@ -1417,6 +1418,7 @@ sound_oss_sysinfo(oss_sysinfo *si)
 	strlcpy(si->product, si_product, sizeof(si->product));
 	strlcpy(si->version, si_version, sizeof(si->version));
 	si->versionnum = SOUND_VERSION;
+	strlcpy(si->license, si_license, sizeof(si->license));
 
 	/*
 	 * Iterate over PCM devices and their channels, gathering up data
@@ -1454,6 +1456,7 @@ sound_oss_sysinfo(oss_sysinfo *si)
 
 		pcm_unlock(d);
 	}
+	si->numaudioengines = si->numaudios;
 
 	si->numsynths = 0;	/* OSSv4 docs:  this field is obsolete */
 	/**

Modified: head/sys/sys/soundcard.h
==============================================================================
--- head/sys/sys/soundcard.h	Wed Jan  7 21:10:16 2009	(r186874)
+++ head/sys/sys/soundcard.h	Wed Jan  7 21:12:33 2009	(r186875)
@@ -1639,7 +1639,10 @@ typedef struct oss_sysinfo
 	int	openedmidi[8];	/* Bit mask telling which midi devices
 				   are busy */
 	int	numcards;	/* Number of sound cards in the system */
-	int	filler[241];	/* For future expansion (set to -1) */
+	int	numaudioengines;	/* Number of audio engines in the system */
+	char	license[16];	/* For example "GPL" or "CDDL" */
+	char	revision_info[256];	/* For internal use */
+	int	filler[172];	/* For future expansion (set to -1) */
 } oss_sysinfo;
 
 typedef struct oss_mixext


More information about the svn-src-head mailing list