Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jan 2011 23:25:23 +0000 (UTC)
From:      Sean Farley <scf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r217867 - stable/8/sys/compat/linux
Message-ID:  <201101252325.p0PNPNrg056228@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: scf
Date: Tue Jan 25 23:25:23 2011
New Revision: 217867
URL: http://svn.freebsd.org/changeset/base/217867

Log:
  Merge from head to stable/8:
  
  r216813:
  Fix the LINUX_SOUND_MIXER_INFO ioctl to return success after the
  information is set to FreeBSD.  It had been falling through to the end
  of linux_ioctl_sound() and returning ENOIOCTL.  Noticed when running the
  Linux ALSA amixer tool.
  
  Add a LINUX_SOUND_MIXER_READ_CAPS ioctl which is used by the Skype
  v2.1.0.81 binary.
  
  Reviewed by:	gavin

Modified:
  stable/8/sys/compat/linux/linux_ioctl.c
  stable/8/sys/compat/linux/linux_ioctl.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/compat/linux/linux_ioctl.c
==============================================================================
--- stable/8/sys/compat/linux/linux_ioctl.c	Tue Jan 25 23:23:45 2011	(r217866)
+++ stable/8/sys/compat/linux/linux_ioctl.c	Tue Jan 25 23:25:23 2011	(r217867)
@@ -1743,7 +1743,7 @@ linux_ioctl_sound(struct thread *td, str
 			strncpy(info.id, "OSS", sizeof(info.id) - 1);
 			strncpy(info.name, "FreeBSD OSS Mixer", sizeof(info.name) - 1);
 			copyout(&info, (void *)args->arg, sizeof(info));
-			break;
+			return (0);
 		}
 		case 0x0030: {	/* SOUND_OLD_MIXER_INFO */
 			struct linux_old_mixer_info info;
@@ -1751,7 +1751,7 @@ linux_ioctl_sound(struct thread *td, str
 			strncpy(info.id, "OSS", sizeof(info.id) - 1);
 			strncpy(info.name, "FreeBSD OSS Mixer", sizeof(info.name) - 1);
 			copyout(&info, (void *)args->arg, sizeof(info));
-			break;
+			return (0);
 		}
 		default:
 			return (ENOIOCTL);
@@ -1768,6 +1768,10 @@ linux_ioctl_sound(struct thread *td, str
 		args->cmd = SOUND_MIXER_READ_STEREODEVS;
 		return (ioctl(td, (struct ioctl_args *)args));
 
+	case LINUX_SOUND_MIXER_READ_CAPS:
+		args->cmd = SOUND_MIXER_READ_CAPS;
+		return (ioctl(td, (struct ioctl_args *)args));
+
 	case LINUX_SOUND_MIXER_READ_RECMASK:
 		args->cmd = SOUND_MIXER_READ_RECMASK;
 		return (ioctl(td, (struct ioctl_args *)args));

Modified: stable/8/sys/compat/linux/linux_ioctl.h
==============================================================================
--- stable/8/sys/compat/linux/linux_ioctl.h	Tue Jan 25 23:23:45 2011	(r217866)
+++ stable/8/sys/compat/linux/linux_ioctl.h	Tue Jan 25 23:25:23 2011	(r217867)
@@ -267,6 +267,7 @@
 #define	LINUX_SOUND_MIXER_INFO		0x4d65
 #define	LINUX_OSS_GETVERSION		0x4d76
 #define	LINUX_SOUND_MIXER_READ_STEREODEVS	0x4dfb
+#define	LINUX_SOUND_MIXER_READ_CAPS	0x4dfc
 #define	LINUX_SOUND_MIXER_READ_RECMASK	0x4dfd
 #define	LINUX_SOUND_MIXER_READ_DEVMASK	0x4dfe
 #define	LINUX_SOUND_MIXER_WRITE_RECSRC	0x4dff



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101252325.p0PNPNrg056228>