Bug 156874

Summary: [sound] [patch] OSS lacks SNDCTL_DSP_HALT
Product: Base System Reporter: gerald
Component: kernAssignee: Andriy Gapon <avg>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 8.2-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description gerald 2011-05-08 03:00:18 UTC
	When compiling current versions of Wine, I ran into the problem
	that FreeBSD does not feature SNDCTL_DSP_HALT in its OSS stack.

	The standard documentation at
	  http://manuals.opensound.com/developer/SNDCTL_DSP_HALT.html
	notes that
	  In the earlier OSS versions this ioctl call was called as
	  SNDCTL_DSP_RESET. This name is still valid but for clarity
	  reasons it is not recommended in new programs (designed for
	  OSS 4.0 or later). 

	Indeed FreeBSD features SNDCTL_DSP_RESET, so this should just
	be a matter of something like the patch below?

	(I'm a ports committer, not src, and cannot test/commit.)

Fix: Submitted by: 	gerald
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-05-10 20:12:06 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-multimedia

Over to maintainer(s).
Comment 2 Andriy Gapon freebsd_committer freebsd_triage 2011-05-11 11:49:43 UTC
The patch looks good to me.
I think that I will commit it if nobody objects.

Thanks!
-- 
Andriy Gapon
Comment 3 gerald 2011-06-04 14:09:29 UTC
On Wed, 11 May 2011, Andriy Gapon wrote:
> The patch looks good to me.
> I think that I will commit it if nobody objects.

Thanks, Andriy.  I did not see any objections and am wondering whether
you can commit this for FreeBSD 9.0 and the next 8.x release?

Gerald
Comment 4 dfilter service freebsd_committer freebsd_triage 2011-06-05 22:01:56 UTC
Author: avg
Date: Sun Jun  5 21:01:41 2011
New Revision: 222723
URL: http://svn.freebsd.org/changeset/base/222723

Log:
  add SNDCTL_DSP_HALT specified by OSS
  
  This is really a new name for SNDCTL_DSP_RESET.
  
  PR:		kern/156874
  Submitted by:	gerald
  MFC after:	1 week

Modified:
  head/sys/sys/soundcard.h

Modified: head/sys/sys/soundcard.h
==============================================================================
--- head/sys/sys/soundcard.h	Sun Jun  5 20:22:56 2011	(r222722)
+++ head/sys/sys/soundcard.h	Sun Jun  5 21:01:41 2011	(r222723)
@@ -311,7 +311,8 @@ typedef struct _snd_capabilities {
  * IOCTL Commands for /dev/sequencer
  */
 
-#define SNDCTL_SEQ_RESET	_IO  ('Q', 0)
+#define SNDCTL_SEQ_HALT		_IO  ('Q', 0)
+#define SNDCTL_SEQ_RESET	SNDCTL_SEQ_HALT	/* Historic interface */
 #define SNDCTL_SEQ_SYNC		_IO  ('Q', 1)
 #define SNDCTL_SYNTH_INFO	_IOWR('Q', 2, struct synth_info)
 #define SNDCTL_SEQ_CTRLRATE	_IOWR('Q', 3, int) /* Set/get timer res.(hz) */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 5 Andriy Gapon freebsd_committer freebsd_triage 2011-06-05 22:03:30 UTC
on 04/06/2011 16:09 Gerald Pfeifer said the following:
> On Wed, 11 May 2011, Andriy Gapon wrote:
>> The patch looks good to me.
>> I think that I will commit it if nobody objects.
> 
> Thanks, Andriy.  I did not see any objections and am wondering whether
> you can commit this for FreeBSD 9.0 and the next 8.x release?


Done, r222723 with MFC planned in ~ 1 week.
Maybe __FreeBSD_version bump is needed for this?

-- 
Andriy Gapon
Comment 6 dfilter service freebsd_committer freebsd_triage 2011-06-29 09:32:52 UTC
Author: avg
Date: Wed Jun 29 08:32:37 2011
New Revision: 223663
URL: http://svn.freebsd.org/changeset/base/223663

Log:
  add SNDCTL_DSP_HALT specified by OSS
  
  This is really a new name for SNDCTL_DSP_RESET.
  And this what commit r222723 should really have been in the first place.
  
  PR:		kern/156874
  Submitted by:	gerald
  MFC after:	1 week

Modified:
  head/sys/sys/soundcard.h

Modified: head/sys/sys/soundcard.h
==============================================================================
--- head/sys/sys/soundcard.h	Wed Jun 29 08:28:39 2011	(r223662)
+++ head/sys/sys/soundcard.h	Wed Jun 29 08:32:37 2011	(r223663)
@@ -775,7 +775,8 @@ typedef struct {
  * IOCTL commands for /dev/dsp and /dev/audio
  */
 
-#define SNDCTL_DSP_RESET	_IO  ('P', 0)
+#define SNDCTL_DSP_HALT		_IO  ('P', 0)
+#define SNDCTL_DSP_RESET	SNDCTL_DSP_HALT
 #define SNDCTL_DSP_SYNC		_IO  ('P', 1)
 #define SNDCTL_DSP_SPEED	_IOWR('P', 2, int)
 #define SNDCTL_DSP_STEREO	_IOWR('P', 3, int)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 7 dfilter service freebsd_committer freebsd_triage 2011-07-29 23:00:51 UTC
Author: avg
Date: Fri Jul 29 22:00:32 2011
New Revision: 224500
URL: http://svn.freebsd.org/changeset/base/224500

Log:
  MFC r223663: add SNDCTL_DSP_HALT specified by OSS
  
  PR:		kern/156874

Modified:
  stable/8/sys/sys/soundcard.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)
  stable/8/sys/geom/label/   (props changed)

Modified: stable/8/sys/sys/soundcard.h
==============================================================================
--- stable/8/sys/sys/soundcard.h	Fri Jul 29 20:38:06 2011	(r224499)
+++ stable/8/sys/sys/soundcard.h	Fri Jul 29 22:00:32 2011	(r224500)
@@ -775,7 +775,8 @@ typedef struct {
  * IOCTL commands for /dev/dsp and /dev/audio
  */
 
-#define SNDCTL_DSP_RESET	_IO  ('P', 0)
+#define SNDCTL_DSP_HALT		_IO  ('P', 0)
+#define SNDCTL_DSP_RESET	SNDCTL_DSP_HALT
 #define SNDCTL_DSP_SYNC		_IO  ('P', 1)
 #define SNDCTL_DSP_SPEED	_IOWR('P', 2, int)
 #define SNDCTL_DSP_STEREO	_IOWR('P', 3, int)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 8 dfilter service freebsd_committer freebsd_triage 2011-07-29 23:11:17 UTC
Author: avg
Date: Fri Jul 29 22:11:05 2011
New Revision: 224501
URL: http://svn.freebsd.org/changeset/base/224501

Log:
  MFC r223663: add SNDCTL_DSP_HALT specified by OSS
  
  PR:		kern/156874

Modified:
  stable/7/sys/sys/soundcard.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/sys/soundcard.h
==============================================================================
--- stable/7/sys/sys/soundcard.h	Fri Jul 29 22:00:32 2011	(r224500)
+++ stable/7/sys/sys/soundcard.h	Fri Jul 29 22:11:05 2011	(r224501)
@@ -752,7 +752,8 @@ typedef struct {
  * IOCTL commands for /dev/dsp and /dev/audio
  */
 
-#define SNDCTL_DSP_RESET	_IO  ('P', 0)
+#define SNDCTL_DSP_HALT		_IO  ('P', 0)
+#define SNDCTL_DSP_RESET	SNDCTL_DSP_HALT
 #define SNDCTL_DSP_SYNC		_IO  ('P', 1)
 #define SNDCTL_DSP_SPEED	_IOWR('P', 2, int)
 #define SNDCTL_DSP_STEREO	_IOWR('P', 3, int)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 9 Andriy Gapon freebsd_committer freebsd_triage 2011-07-29 23:13:30 UTC
State Changed
From-To: open->closed

The patch is committed. Take and resolve. 


Comment 10 Andriy Gapon freebsd_committer freebsd_triage 2011-07-29 23:13:30 UTC
Responsible Changed
From-To: freebsd-multimedia->avg

The patch is committed. Take and resolve.