From munish@CPE0030ab0ef2bb.cpe.net.cable.rogers.com  Mon Jul 15 11:27:15 2002
Return-Path: <munish@CPE0030ab0ef2bb.cpe.net.cable.rogers.com>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 83D0637B400
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 15 Jul 2002 11:27:15 -0700 (PDT)
Received: from CPE0030ab0ef2bb.cpe.net.cable.rogers.com (CPE0030ab0ef2bb.cpe.net.cable.rogers.com [24.103.202.201])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8740843E67
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 15 Jul 2002 11:27:14 -0700 (PDT)
	(envelope-from munish@CPE0030ab0ef2bb.cpe.net.cable.rogers.com)
Received: by CPE0030ab0ef2bb.cpe.net.cable.rogers.com (Postfix, from userid 1001)
	id 422CEC30; Mon, 15 Jul 2002 14:28:15 -0400 (EDT)
Message-Id: <20020715182815.422CEC30@CPE0030ab0ef2bb.cpe.net.cable.rogers.com>
Date: Mon, 15 Jul 2002 14:28:15 -0400 (EDT)
From: Munish Chopra <mchopra@engmail.uwaterloo.ca>
Reply-To: Munish Chopra <mchopra@engmail.uwaterloo.ca>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Add information about vchans to sound chapter in handbook
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         40609
>Category:       docs
>Synopsis:       Add information about vchans to sound chapter in handbook
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    blackend
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 15 11:30:03 PDT 2002
>Closed-Date:    Fri Jul 26 15:18:26 PDT 2002
>Last-Modified:  Fri Jul 26 15:18:26 PDT 2002
>Originator:     Munish Chopra
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD CPE0030ab0ef2bb.cpe.net.cable.rogers.com 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Sun Jul 14 20:26:50 EDT 2002 munish@CPE0030ab0ef2bb.cpe.net.cable.rogers.com:/usr/obj/usr/src/sys/ARCADIA i386


	
>Description:
        The Handbook has been lacking documentation of the vchans feature for
        quite a while now. Thanks to Orion Hodson <orion@freebsd.org> for
        filling me in on the details. My apologies for the diff, I didn't
        check out the docs sources. It is to be applied to:
        doc/en_US.ISO8859-1/books/handbook/sound/chapter.sgml
>How-To-Repeat:
	
>Fix:

--- chapter.sgml	Mon Jul 15 13:43:02 2002
+++ vchans.sgml	Mon Jul 15 14:22:44 2002
@@ -366,6 +366,36 @@
     </sect2>
   </sect1>
 
+  <sect2>
+    <title>Utilizing Multiple Sound Sources</title>
+
+    <para>It is often desirable to have multiple sources of sound that are able to
+      play simultaneously, such as when <application>esound</application> or
+      <application>artsd</application> don't support sharing of the sound device
+      with a certain application.</para>
+
+    <para>FreeBSD lets you do this through `Virtual Sound Channels', which can be
+      set with the &man.sysctl.8; facility. Virtual channels allow you to multiplex
+      your sound card's playback channels by mixing sound in the kernel.</para>
+
+    <para>To set the number of virtual channels, there are two sysctl knobs which, 
+      if you are the <username>root</username> user, can be set like this:</para>
+
+    <screen>&prompt.root; sysctl hw.snd.pcm0.vchans=4 &prompt.root;
+      sysctl hw.snd.maxautovchans=4</screen>
+
+    <para><literal>hw.snd.pcm0.vchans</literal> is the number of vchans pcm0 has, 
+      and is configurable once a device has been attached.<literal>hw.snd.maxautovchans
+      </literal> is the number of vchans a new audio device is given when it is
+      attached using &man.kldload.8;. Since the pcm module can be loaded independently 
+      of the hardware drivers, <literal>hw.snd.maxautovchans</literal> can store how
+      many vchans any devices which are attached later will be given.</para>
+
+    <para>If you are not using &man.devfs.5;, you will have to point your applications
+      at <devicename>/dev/dsp0</devicename>.x, where 'x' is 0 to 3 if <literal>
+      hw.snd.pcm.0.vchans</literal> is set to 4. On a system using devfs, the above 
+      will automatically be allocated transparently to the user.</para>
+
   <sect1 id="sound-mp3">
     <sect1info>
       <authorgroup>
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->blackend 
Responsible-Changed-By: blackend 
Responsible-Changed-When: Mon Jul 15 11:35:04 PDT 2002 
Responsible-Changed-Why:  
I'll work on it ;-) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=40609 
State-Changed-From-To: open->closed 
State-Changed-By: blackend 
State-Changed-When: Fri Jul 26 15:17:09 PDT 2002 
State-Changed-Why:  
Jim merged it in new Multimedia chapter, Thanks Munish :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=40609 
>Unformatted:
