From owner-svn-doc-all@freebsd.org Thu Sep 5 16:59:09 2019 Return-Path: Delivered-To: svn-doc-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56047ECCFA; Thu, 5 Sep 2019 16:59:09 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46PRjn1MxWz41Tn; Thu, 5 Sep 2019 16:59:09 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 133C97439; Thu, 5 Sep 2019 16:59:09 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x85Gx8ND093657; Thu, 5 Sep 2019 16:59:08 GMT (envelope-from bcr@FreeBSD.org) Received: (from bcr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x85Gx8dA093656; Thu, 5 Sep 2019 16:59:08 GMT (envelope-from bcr@FreeBSD.org) Message-Id: <201909051659.x85Gx8dA093656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcr set sender to bcr@FreeBSD.org using -f From: Benedict Reuschling Date: Thu, 5 Sep 2019 16:59:08 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r53370 - head/en_US.ISO8859-1/books/arch-handbook/sound X-SVN-Group: doc-head X-SVN-Commit-Author: bcr X-SVN-Commit-Paths: head/en_US.ISO8859-1/books/arch-handbook/sound X-SVN-Commit-Revision: 53370 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2019 16:59:09 -0000 Author: bcr Date: Thu Sep 5 16:59:08 2019 New Revision: 53370 URL: https://svnweb.freebsd.org/changeset/doc/53370 Log: Clean up some errors from textproc/igor by wrapping long lines. Event: vBSDcon Hackathon Modified: head/en_US.ISO8859-1/books/arch-handbook/sound/chapter.xml Modified: head/en_US.ISO8859-1/books/arch-handbook/sound/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/arch-handbook/sound/chapter.xml Thu Sep 5 15:28:22 2019 (r53369) +++ head/en_US.ISO8859-1/books/arch-handbook/sound/chapter.xml Thu Sep 5 16:59:08 2019 (r53370) @@ -4,16 +4,23 @@ $FreeBSD$ --> - - Sound Subsystem + + + Sound Subsystem + - Jean-FrancoisDockesContributed by + + + Jean-Francois + Dockes + + Contributed by + - - - Introduction @@ -96,7 +103,9 @@ Probing, Attaching, etc. Sound drivers probe and attach in almost the same way as any - hardware driver module. You might want to look at the ISA or PCI specific sections of the handbook for + hardware driver module. You might want to look at the ISA or PCI specific sections of the handbook for more information. However, sound drivers differ in some ways: @@ -104,9 +113,9 @@ They declare themselves as pcm - class devices, with a - struct snddev_info device private - structure: + class devices, with a struct snddev_info device + private structure: static driver_t xxx_driver = { "pcm", @@ -117,8 +126,11 @@ DRIVER_MODULE(snd_xxxpci, pci, xxx_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_xxxpci, snd_pcm, PCM_MINVER, PCM_PREFVER,PCM_MAXVER); - Most sound driversdevice - driverssound + Most sound drivers + + device drivers + sound + need to store additional private information about their device. A private data structure is usually allocated in the attach routine. Its address is passed to @@ -134,7 +146,8 @@ The sound driver attach routine should declare its MIXER or AC97 interface to pcm by calling mixer_init(). For a MIXER interface, - this causes in turn a call to xxxmixer_init(). + this causes in turn a call to xxxmixer_init(). @@ -196,7 +209,8 @@ Interfaces The interface between the pcm core - and the sound drivers is defined in terms of kernel objects. + and the sound drivers is defined in terms of kernel objects. There are two main interfaces that a sound driver will usually provide: CHANNEL and either @@ -235,11 +249,12 @@ For sound data transfers, the pcm core and the sound drivers communicate through a shared memory area, described by a - struct snd_dbuf. + struct + snd_dbuf. - struct snd_dbuf is private to - pcm, and sound drivers obtain - values of interest by calls to accessor functions + struct snd_dbuf is + private to pcm, and sound drivers + obtain values of interest by calls to accessor functions (sndbuf_getxxx()). The shared memory area has a size of @@ -253,7 +268,8 @@ pcm initially fills up the - buffer, then calls the sound driver's + buffer, then calls the sound driver's xxxchannel_trigger() function with a parameter of PCMTRIG_START. @@ -273,8 +289,9 @@ chn_intr() arranges to copy new data to the area that was transferred to the device (now - free), and make appropriate updates to the - snd_dbuf structure. + free), and make appropriate updates to the snd_dbuf + structure. @@ -301,8 +318,8 @@ b is the address for the channel - struct snd_dbuf. It should be - initialized in the function by calling + struct snd_dbuf. + It should be initialized in the function by calling sndbuf_alloc(). The buffer size to use is normally a small multiple of the 'typical' unit transfer size for your device. @@ -491,10 +508,10 @@ The routine returns a pointer to a (usually - statically-defined) - pcmchan_caps structure (defined - in sound/pcm/channel.h. The - structure holds the minimum and maximum sampling + statically-defined) pcmchan_caps structure + (defined in sound/pcm/channel.h. + The structure holds the minimum and maximum sampling frequencies, and the accepted sound formats. Look at any sound driver for an example. @@ -626,7 +643,7 @@ xxxmixer_uninit() should ensure that all sound is muted and if possible mixer hardware - should be powered down + should be powered down. xxxmixer_reinit() should ensure that the mixer hardware is powered up and any settings not