亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? writing-an-alsa-driver.tmpl

?? 優(yōu)龍2410linux2.6.8內(nèi)核源代碼
?? TMPL
?? 第 1 頁 / 共 5 頁
字號:
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN"><book><?dbhtml filename="index.html"><!-- ****************************************************** --><!-- Header  --><!-- ****************************************************** -->  <bookinfo>    <title>Writing an ALSA Driver</title>    <author>      <firstname>Takashi</firstname>      <surname>Iwai</surname>      <affiliation>        <address>          <email>tiwai@suse.de</email>        </address>      </affiliation>     </author>     <date>Mar. 6, 2004</date>     <edition>0.3.1</edition>    <abstract>      <para>        This document describes how to write an ALSA (Advanced Linux        Sound Architecture) driver.      </para>    </abstract>    <legalnotice>    <para>    Copyright (c) 2002-2004  Takashi Iwai <email>tiwai@suse.de</email>    </para>    <para>    This document is free; you can redistribute it and/or modify it    under the terms of the GNU General Public License as published by    the Free Software Foundation; either version 2 of the License, or    (at your option) any later version.     </para>    <para>    This document is distributed in the hope that it will be useful,    but <emphasis>WITHOUT ANY WARRANTY</emphasis>; without even the    implied warranty of <emphasis>MERCHANTABILITY or FITNESS FOR A    PARTICULAR PURPOSE</emphasis>. See the GNU General Public License    for more details.    </para>    <para>    You should have received a copy of the GNU General Public    License along with this program; if not, write to the Free    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,    MA 02111-1307 USA    </para>    </legalnotice>  </bookinfo><!-- ****************************************************** --><!-- Preface  --><!-- ****************************************************** -->  <preface id="preface">    <title>Preface</title>    <para>      This document describes how to write an      <ulink url="http://www.alsa-project.org/"><citetitle>      ALSA (Advanced Linux Sound Architecture)</citetitle></ulink>      driver. The document focuses mainly on the PCI soundcard.      In the case of other device types, the API might      be different, too. However, at least the ALSA kernel API is      consistent, and therefore it would be still a bit help for      writing them.    </para>    <para>    The target of this document is ones who already have enough    skill of C language and have the basic knowledge of linux    kernel programming.  This document doesn't explain the general    topics of linux kernel codes and doesn't cover the detail of    implementation of each low-level driver.  It describes only how is    the standard way to write a PCI sound driver on ALSA.    </para>    <para>      If you are already familiar with the older ALSA ver.0.5.x, you    can check the drivers such as <filename>es1938.c</filename> or    <filename>maestro3.c</filename> which have also almost the same    code-base in the ALSA 0.5.x tree, so you can compare the differences.    </para>    <para>      This document is still a draft version. Any feedbacks and    corrections, please!!    </para>  </preface><!-- ****************************************************** --><!-- File Tree Structure  --><!-- ****************************************************** -->  <chapter id="file-tree">    <title>File Tree Structure</title>    <section id="file-tree-general">      <title>General</title>      <para>        The ALSA drivers are provided in the two ways.      </para>      <para>        One is the the trees provided as a tarball or via cvs from the      ALSA's ftp site, and another is the 2.6 (or later) Linux kernel      tree. To synchronize both, the ALSA driver tree is split to      two different trees: alsa-kernel and alsa-driver. The former      contains purely the source codes for the Linux 2.6 (or later)      tree. This tree is designed only for compilation on 2.6 or      later environment. The latter, alsa-driver, contains many subtle      files for compiling the ALSA driver on the outside of Linux      kernel like configure script, the wrapper functions for older,      2.2 and 2.4 kernels, to adapt the latest kernel API,      and additional drivers which are still in development or in      tests.  The drivers in alsa-driver tree will be moved to      alsa-kernel (eventually 2.6 kernel tree) once when they are      finished and confirmed to work fine.      </para>      <para>        The file tree structure of ALSA driver is depicted below. Both        alsa-kernel and alsa-driver have almost the same file        structure, except for <quote>core</quote> directory. It's        named as <quote>acore</quote> in alsa-driver tree.         <example>          <title>ALSA File Tree Structure</title>          <literallayout>        sound                /core                        /oss                        /seq                                /oss                                /instr                /ioctl32                /include                /drivers                        /mpu401                        /opl3                /i2c                        /l3                /synth                        /emux                /pci                        /(cards)                /isa                        /(cards)                /arm                /ppc                /sparc                /usb                /pcmcia /(cards)                /oss          </literallayout>        </example>      </para>    </section>    <section id="file-tree-core-directory">      <title>core directory</title>      <para>        This directory contains the middle layer, that is, the heart      of ALSA drivers. In this directory, the native ALSA modules are      stored. The sub-directories contain different modules and are      dependent upon the kernel config.       </para>      <section id="file-tree-core-directory-oss">        <title>core/oss</title>        <para>          The codes for PCM and mixer OSS emulation modules are stored        in this directory. The rawmidi OSS emulation is included in        the ALSA rawmidi code since it's quite small. The sequencer        code is stored in core/seq/oss directory (see        <link linkend="file-tree-core-directory-seq-oss"><citetitle>        below</citetitle></link>).        </para>      </section>      <section id="file-tree-core-directory-ioctl32">        <title>core/ioctl32</title>        <para>          This directory contains the 32bit-ioctl wrappers for 64bit        architectures such like x86-64, ppc64 and sparc64. For 32bit        and alpha architectures, these are not compiled.         </para>      </section>      <section id="file-tree-core-directory-seq">        <title>core/seq</title>        <para>          This and its sub-directories are for the ALSA        sequencer. This directory contains the sequencer core and        primary sequencer modules such like snd-seq-midi,        snd-seq-virmidi, etc. They are compiled only when        <constant>CONFIG_SND_SEQUENCER</constant> is set in the kernel        config.         </para>      </section>      <section id="file-tree-core-directory-seq-oss">        <title>core/seq/oss</title>        <para>          This contains the OSS sequencer emulation codes.        </para>      </section>      <section id="file-tree-core-directory-deq-instr">        <title>core/seq/instr</title>        <para>          This directory contains the modules for the sequencer        instrument layer.         </para>      </section>    </section>    <section id="file-tree-include-directory">      <title>include directory</title>      <para>        This is the place for the public header files of ALSA drivers,      which are to be exported to the user-space, or included by      several files at different directories. Basically, the private      header files should not be placed in this directory, but you may      still find files there, due to historical reason :)       </para>    </section>    <section id="file-tree-drivers-directory">      <title>drivers directory</title>      <para>        This directory contains the codes shared among different drivers      on the different architectures.  They are hence supposed not to be      architecture-specific.      For example, the dummy pcm driver and the serial MIDI      driver are found in this directory. In the sub-directories,      there are the codes for components which are independent from      bus and cpu architectures.       </para>      <section id="file-tree-drivers-directory-mpu401">        <title>drivers/mpu401</title>        <para>          The MPU401 and MPU401-UART modules are stored here.        </para>      </section>      <section id="file-tree-drivers-directory-opl3">        <title>drivers/opl3 and opl4</title>        <para>          The OPL3 and OPL4 FM-synth stuff is found here.        </para>      </section>    </section>    <section id="file-tree-i2c-directory">      <title>i2c directory</title>      <para>        This contains the ALSA i2c components.      </para>      <para>        Although there is a standard i2c layer on Linux, ALSA has its      own i2c codes for some cards, because the soundcard needs only a      simple operation and the standard i2c API is too complicated for      such a purpose.       </para>      <section id="file-tree-i2c-directory-l3">        <title>i2c/l3</title>        <para>          This is a sub-directory for ARM L3 i2c.        </para>      </section>    </section>    <section id="file-tree-synth-directory">        <title>synth directory</title>        <para>          This contains the synth middle-level modules.        </para>        <para>          So far, there is only Emu8000/Emu10k1 synth driver under        synth/emux sub-directory.         </para>    </section>    <section id="file-tree-pci-directory">      <title>pci directory</title>      <para>        This and its sub-directories hold the top-level card modules      for PCI soundcards and the codes specific to the PCI BUS.      </para>      <para>        The drivers compiled from a single file is stored directly on      pci directory, while the drivers with several source files are      stored on its own sub-directory (e.g. emu10k1, ice1712).       </para>    </section>    <section id="file-tree-isa-directory">      <title>isa directory</title>      <para>        This and its sub-directories hold the top-level card modules      for ISA soundcards.       </para>    </section>    <section id="file-tree-arm-ppc-sparc-directories">      <title>arm, ppc, and sparc directories</title>      <para>        These are for the top-level card modules which are      specific to each given architecture.       </para>    </section>    <section id="file-tree-usb-directory">      <title>usb directory</title>      <para>        This contains the USB-audio driver. On the latest version, the      USB MIDI driver is integrated together with usb-audio driver.       </para>    </section>    <section id="file-tree-pcmcia-directory">      <title>pcmcia directory</title>      <para>        The PCMCIA, especially PCCard drivers will go here. CardBus      drivers will be on pci directory, because its API is identical      with the standard PCI cards.       </para>    </section>    <section id="file-tree-oss-directory">      <title>oss directory</title>      <para>        The OSS/Lite source files are stored here on Linux 2.6 (or      later) tree. (In the ALSA driver tarball, it's empty, of course :)       </para>    </section>  </chapter><!-- ****************************************************** --><!-- Basic Flow for PCI Drivers  --><!-- ****************************************************** -->  <chapter id="basic-flow">    <title>Basic Flow for PCI Drivers</title>    <section id="basic-flow-outline">      <title>Outline</title>      <para>        The minimum flow of PCI soundcard is like the following:        <itemizedlist>          <listitem><para>define the PCI ID table (see the section          <link linkend="pci-resource-entries"><citetitle>PCI Entries          </citetitle></link>).</para></listitem>           <listitem><para>create <function>probe()</function> callback.</para></listitem>          <listitem><para>create <function>remove()</function> callback.</para></listitem>          <listitem><para>create pci_driver table which contains the three pointers above.</para></listitem>          <listitem><para>create <function>init()</function> function just calling <function>pci_module_init()</function> to register the pci_driver table defined above.</para></listitem>          <listitem><para>create <function>exit()</function> function to call <function>pci_unregister_driver()</function> function.</para></listitem>        </itemizedlist>      </para>    </section>    <section id="basic-flow-example">      <title>Full Code Example</title>      <para>        The code example is shown below. Some parts are kept      unimplemented at this moment but will be filled in the      succeeding sections. The numbers in comment lines of      <function>snd_mychip_probe()</function> function are the      markers.         <example>          <title>Basic Flow for PCI Drivers Example</title>          <programlisting><![CDATA[  #include <sound/driver.h>  #include <linux/init.h>  #include <linux/pci.h>  #include <linux/slab.h>  #include <sound/core.h>  #define SNDRV_GET_ID  #include <sound/initval.h>  // module parameters (see "Module Parameters")  static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;  static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;  static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;  // definition of the chip-specific record  typedef struct snd_mychip mychip_t;  struct snd_mychip {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人在线观看免费网站| 色综合一区二区| 亚洲欧美日韩国产综合| 日韩一区二区免费视频| www.性欧美| 国产精品综合视频| 亚洲成人一区二区在线观看| 国产视频一区不卡| 制服丝袜亚洲色图| 色诱亚洲精品久久久久久| 精品一区中文字幕| 亚洲香蕉伊在人在线观| 国产精品网站在线观看| 欧美大片拔萝卜| 91.xcao| 欧美伊人久久久久久久久影院| 国产精品一二三四五| 日本大胆欧美人术艺术动态| 亚洲婷婷国产精品电影人久久| 久久亚洲综合色一区二区三区| 7777女厕盗摄久久久| 欧美无人高清视频在线观看| 粉嫩绯色av一区二区在线观看| 免费av成人在线| 日韩二区三区四区| 夜夜嗨av一区二区三区网页 | 综合中文字幕亚洲| 久久免费视频一区| 欧美一卡在线观看| 6080日韩午夜伦伦午夜伦| 欧洲国内综合视频| 色综合久久久久| 色天使色偷偷av一区二区| 91在线观看视频| av一区二区久久| youjizz久久| 国产成人啪免费观看软件| 久久精品国产一区二区| 久热成人在线视频| 久久99精品国产| 九一九一国产精品| 韩国三级电影一区二区| 国精产品一区一区三区mba视频| 麻豆成人久久精品二区三区红 | 91国产丝袜在线播放| 色嗨嗨av一区二区三区| 色一区在线观看| 91国产免费观看| 欧美写真视频网站| 欧美日韩国产一区二区三区地区| 欧美中文字幕亚洲一区二区va在线| 欧美性猛片aaaaaaa做受| 欧美日韩黄色影视| 日韩视频在线永久播放| 精品国产区一区| 国产欧美综合在线| 国产精品国产三级国产普通话蜜臀 | 9i看片成人免费高清| 色婷婷精品久久二区二区蜜臂av| 欧美性大战久久| 欧美一区二区三区精品| 久久蜜臀中文字幕| 国产精品成人一区二区艾草 | 日韩一区国产二区欧美三区| 日韩区在线观看| 国产亚洲欧美色| 一区二区欧美国产| 日日夜夜精品视频天天综合网| 蜜桃av噜噜一区| 成人影视亚洲图片在线| 欧美最猛性xxxxx直播| 欧美一个色资源| 国产精品女主播在线观看| 亚洲一区二区三区美女| 精品一区二区三区免费视频| 成人精品国产一区二区4080| 欧美无砖专区一中文字| ww亚洲ww在线观看国产| 日韩毛片精品高清免费| 日韩国产欧美在线观看| 国产精品亚洲一区二区三区在线| 91在线码无精品| 精品国产免费人成在线观看| 国产精品久久久久影院| 日本欧美肥老太交大片| 成人国产精品免费观看视频| 制服丝袜亚洲网站| 亚洲人成影院在线观看| 麻豆成人av在线| 在线观看www91| 国产片一区二区三区| 午夜视频在线观看一区| 大桥未久av一区二区三区中文| 欧美天堂一区二区三区| 国产三级三级三级精品8ⅰ区| 亚洲无线码一区二区三区| 国产在线视频不卡二| 欧美三级一区二区| 国产精品成人一区二区艾草 | 视频在线在亚洲| av一区二区三区在线| 欧美mv和日韩mv的网站| 一区二区三区中文字幕在线观看| 国内精品国产成人国产三级粉色 | 欧美日韩高清影院| 国产精品福利一区| 激情国产一区二区| 欧美精品日韩精品| 一区二区三区在线视频免费| 成人一区二区三区视频在线观看| 欧美剧情片在线观看| 亚洲女同一区二区| 成人毛片老司机大片| 精品国产91洋老外米糕| 婷婷成人综合网| 欧美三级三级三级爽爽爽| 国产精品成人免费| 国产91精品在线观看| 精品对白一区国产伦| 日韩一区精品视频| 欧美中文字幕一区| 亚洲精品国产精华液| 不卡大黄网站免费看| 国产精品婷婷午夜在线观看| 国产在线观看免费一区| 精品国产乱码久久久久久牛牛| 亚洲1区2区3区视频| 91成人在线观看喷潮| 伊人夜夜躁av伊人久久| 99re66热这里只有精品3直播 | 日韩在线a电影| 欧美中文字幕一区二区三区 | 日韩精品福利网| 欧美日本一区二区在线观看| 亚洲一线二线三线视频| 在线欧美一区二区| 亚洲一区二区三区四区的| 欧美亚洲综合网| 亚洲一区二区三区美女| 欧美乱熟臀69xxxxxx| 午夜精品影院在线观看| 欧美精品在线观看播放| 秋霞午夜av一区二区三区| 欧美不卡在线视频| 国产精品88av| 国产精品久久久久国产精品日日| 成人高清免费观看| 亚洲激情六月丁香| 欧美日韩一区二区三区四区五区| 亚洲狠狠爱一区二区三区| 欧美日产在线观看| 久久电影国产免费久久电影| 久久一区二区视频| eeuss影院一区二区三区| 一区二区三区在线播放| 欧美日韩一区精品| 久久国产麻豆精品| 国产午夜亚洲精品午夜鲁丝片 | 国产精品一区在线| 国产精品另类一区| 欧美天天综合网| 美女视频第一区二区三区免费观看网站| 欧美大片在线观看一区二区| 国产suv精品一区二区883| 亚洲男人的天堂一区二区| 欧美日韩高清影院| 韩国视频一区二区| 亚洲视频一二三| 制服丝袜一区二区三区| 国模冰冰炮一区二区| 亚洲精品日韩专区silk| 日韩一区二区中文字幕| 不卡一区二区在线| 日韩和的一区二区| 国产精品久久久久一区二区三区 | 99精品欧美一区二区三区综合在线| 一区二区三区在线视频观看| 日韩欧美一区二区三区在线| 成人精品国产一区二区4080| 午夜精品久久久久影视| 国产色产综合产在线视频| 欧美视频一区二区三区在线观看| 久久电影国产免费久久电影| 亚洲视频在线一区二区| 欧美大度的电影原声| 一本大道久久a久久精二百| 奇米影视一区二区三区| 亚洲日本va午夜在线影院| 日韩一区二区电影网| av亚洲精华国产精华精华| 日韩av一级片| 亚洲日本电影在线| 久久久精品国产免费观看同学| 91成人免费网站| 成人高清免费在线播放| 老司机免费视频一区二区三区| 一区二区三区四区视频精品免费| 国产亚洲短视频| 日韩欧美在线观看一区二区三区| 色香蕉久久蜜桃|