Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > cf93d8a8acdcc6fe2225039da0502495 > files > 4144

kernel-doc-2.6.32-131.17.1.el6.centos.plus.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Chapter&#160;5.&#160;PCM Interface</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Writing an ALSA Driver" /><link rel="up" href="index.html" title="Writing an ALSA Driver" /><link rel="prev" href="ch04s05.html" title="PCI Entries" /><link rel="next" href="ch05s02.html" title="Full Code Example" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&#160;5.&#160;PCM Interface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s05.html">Prev</a>&#160;</td><th width="60%" align="center">&#160;</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch05s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter&#160;5.&#160;PCM Interface"><div class="titlepage"><div><div><h2 class="title"><a id="pcm-interface"></a>Chapter&#160;5.&#160;PCM Interface</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch05.html#pcm-interface-general">General</a></span></dt><dt><span class="section"><a href="ch05s02.html">Full Code Example</a></span></dt><dt><span class="section"><a href="ch05s03.html">Constructor</a></span></dt><dt><span class="section"><a href="ch05s04.html">... And the Destructor?</a></span></dt><dt><span class="section"><a href="ch05s05.html">Runtime Pointer - The Chest of PCM Information</a></span></dt><dd><dl><dt><span class="section"><a href="ch05s05.html#pcm-interface-runtime-hw">Hardware Description</a></span></dt><dt><span class="section"><a href="ch05s05.html#pcm-interface-runtime-config">PCM Configurations</a></span></dt><dt><span class="section"><a href="ch05s05.html#pcm-interface-runtime-dma">DMA Buffer Information</a></span></dt><dt><span class="section"><a href="ch05s05.html#pcm-interface-runtime-status">Running Status</a></span></dt><dt><span class="section"><a href="ch05s05.html#pcm-interface-runtime-private">Private Data</a></span></dt><dt><span class="section"><a href="ch05s05.html#pcm-interface-runtime-intr">Interrupt Callbacks</a></span></dt></dl></dd><dt><span class="section"><a href="ch05s06.html">Operators</a></span></dt><dd><dl><dt><span class="section"><a href="ch05s06.html#pcm-interface-operators-open-callback">open callback</a></span></dt><dt><span class="section"><a href="ch05s06.html#pcm-interface-operators-close-callback">close callback</a></span></dt><dt><span class="section"><a href="ch05s06.html#pcm-interface-operators-ioctl-callback">ioctl callback</a></span></dt><dt><span class="section"><a href="ch05s06.html#pcm-interface-operators-hw-params-callback">hw_params callback</a></span></dt><dt><span class="section"><a href="ch05s06.html#pcm-interface-operators-hw-free-callback">hw_free callback</a></span></dt><dt><span class="section"><a href="ch05s06.html#pcm-interface-operators-prepare-callback">prepare callback</a></span></dt><dt><span class="section"><a href="ch05s06.html#pcm-interface-operators-trigger-callback">trigger callback</a></span></dt><dt><span class="section"><a href="ch05s06.html#pcm-interface-operators-pointer-callback">pointer callback</a></span></dt><dt><span class="section"><a href="ch05s06.html#pcm-interface-operators-copy-silence">copy and silence callbacks</a></span></dt><dt><span class="section"><a href="ch05s06.html#pcm-interface-operators-ack">ack callback</a></span></dt><dt><span class="section"><a href="ch05s06.html#pcm-interface-operators-page-callback">page callback</a></span></dt></dl></dd><dt><span class="section"><a href="ch05s07.html">Interrupt Handler</a></span></dt><dd><dl><dt><span class="section"><a href="ch05s07.html#pcm-interface-interrupt-handler-boundary">Interrupts at the period (fragment) boundary</a></span></dt><dt><span class="section"><a href="ch05s07.html#pcm-interface-interrupt-handler-timer">High frequency timer interrupts</a></span></dt><dt><span class="section"><a href="ch05s07.html#pcm-interface-interrupt-handler-both">On calling <code class="function">snd_pcm_period_elapsed()</code></a></span></dt></dl></dd><dt><span class="section"><a href="ch05s08.html">Atomicity</a></span></dt><dt><span class="section"><a href="ch05s09.html">Constraints</a></span></dt></dl></div><div class="section" title="General"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="pcm-interface-general"></a>General</h2></div></div></div><p>
        The PCM middle layer of ALSA is quite powerful and it is only
      necessary for each driver to implement the low-level functions
      to access its hardware.
      </p><p>
        For accessing to the PCM layer, you need to include
      <code class="filename">&lt;sound/pcm.h&gt;</code> first. In addition,
      <code class="filename">&lt;sound/pcm_params.h&gt;</code> might be needed
      if you access to some functions related with hw_param. 
      </p><p>
        Each card device can have up to four pcm instances. A pcm
      instance corresponds to a pcm device file. The limitation of
      number of instances comes only from the available bit size of
      the Linux's device numbers. Once when 64bit device number is
      used, we'll have more pcm instances available. 
      </p><p>
        A pcm instance consists of pcm playback and capture streams,
      and each pcm stream consists of one or more pcm substreams. Some
      soundcards support multiple playback functions. For example,
      emu10k1 has a PCM playback of 32 stereo substreams. In this case, at
      each open, a free substream is (usually) automatically chosen
      and opened. Meanwhile, when only one substream exists and it was
      already opened, the successful open will either block
      or error with <code class="constant">EAGAIN</code> according to the
      file open mode. But you don't have to care about such details in your
      driver. The PCM middle layer will take care of such work.
      </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s05.html">Prev</a>&#160;</td><td width="20%" align="center">&#160;</td><td width="40%" align="right">&#160;<a accesskey="n" href="ch05s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PCI Entries&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Full Code Example</td></tr></table></div></body></html>