📄 audio.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head> <title></title> <link rel="stylesheet" media="screen" type="text/css" href="./style.css" /> <link rel="stylesheet" media="screen" type="text/css" href="./design.css" /> <link rel="stylesheet" media="print" type="text/css" href="./print.css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><a href=start.html>start</a></br><div class="toc"><div class="tocheader toctoggle" id="toc__header">Table of Contents</div><div id="toc__inside"><ul class="toc"><li class="level1"><div class="li"><span class="li"><a href="#adding_audio_to_the_kernel" class="toc">Adding Audio to the Kernel</a></span></div><ul class="toc"><li class="level2"><div class="li"><span class="li"><a href="#adding_kernel_support_-_as_a_module" class="toc">Adding Kernel Support - As a module</a></span></div><ul class="toc"><li class="level3"><div class="li"><span class="li"><a href="#testing_the_built_in_kernel_driver" class="toc">Testing the built in kernel driver</a></span></div></li></ul></li><li class="level2"><div class="li"><span class="li"><a href="#testing_audio" class="toc">Testing Audio</a></span></div><ul class="toc"><li class="level3"><div class="li"><span class="li"><a href="#debugging" class="toc">Debugging</a></span></div></li></ul></li></ul></li></ul></div></div><h1><a name="adding_audio_to_the_kernel" id="adding_audio_to_the_kernel">Adding Audio to the Kernel</a></h1><div class="level1"></div><!-- SECTION [1-42] --><h2><a name="adding_kernel_support_-_as_a_module" id="adding_kernel_support_-_as_a_module">Adding Kernel Support - As a module</a></h2><div class="level2"><p> To add support for the <a href="audio_cards.html" class="wikilink1" title="audio_cards.html">AD1836A audio card</a> to the kernel build system, a few things must be enabled properly for things to work.</p><pre class="code"> Linux Kernel Configuration Sound ---> [M] Sound card support Advanced Linux Sound Architecture ---> [ ] OSS Sequencer API [M] OSS Mixer API [M] OSS PCM (digital audio) API ALSA Blackfin devices ---> [M] 1836 Audio support for BF53x Interface between Blackfin and ADI1836 (TDM interace) ---> 5.1 Channels or 3 seperate stereos (3 stereos) ---> (0) Blackfin Audio SPORT port (NEW) (4) Blackfin Audio SPI channel selection bit (NEW)</pre><p> </p><p></p><p>Doing this will create modules (outside the kernel). The modules will be inserted automatically when it is needed. You can also build sound driver into kernel.</p></div><!-- SECTION [43-1246] --><h3><a name="testing_the_built_in_kernel_driver" id="testing_the_built_in_kernel_driver">Testing the built in kernel driver</a></h3><div class="level3"><p>If audio is configured as modules, skip this section. If audio is built into kernel and you have booted the kernel, there are a few things to check to ensure audio is working:</p><ol><li class="level1"><div class="li"> Check the boot messages to see if you have booted the correct kernel. During kernel boot, it should print out:<pre class="code">Advanced Linux Sound Architecture Driver Version 1.0.9rc2 (Thu Mar 24 10:33:39 2005 UTC).dma_alloc_init: dma_page @ 0x03a79000 - 256 pages at 0x03f00000ALSA device list: #0: Analog Devices AD1836A at SPI irq 17/47, SPORT0 rx/tx dma 3/4 err irq /45</pre></div></li><li class="level1"><div class="li"> Check to make sure that the audio device is compiled into your kernel. If the special directory <code>/proc/asound/AD1836A/</code> is in the root filesystem, the audio driver is compiled in. <pre class="code">root:~> ls -l /proc/asound/AD1836A/-r--r--r-- 1 0 0 0 id-rw-r--r-- 1 0 0 0 oss_mixerdr-xr-xr-x 3 0 0 0 pcm0cdr-xr-xr-x 3 0 0 0 pcm0p-rw-r--r-- 1 0 0 0 registers-r--r--r-- 1 0 0 0 spi-r--r--r-- 1 0 0 0 sport-rw-r--r-- 1 0 0 0 talktrough</pre></div></li></ol></div><!-- SECTION [1247-2487] --><h2><a name="testing_audio" id="testing_audio">Testing Audio</a></h2><div class="level2"><ol><li class="level1"><div class="li"> Check the output<pre class="code">root:~> toneTONE: generating sine wave at 1000 Hz...</pre><p>You should hear something out of the green jack. NOTE: The tone application seems to be broken. (plays at the wrong frequency, and doesn’t produce the waveshape you ask it.</p></div></li><li class="level1"><div class="li"> Set the audio mixer to Microphone (the default is line in):<pre class="code">root:~> mixer +rec micRecording source: mic</pre></div></li><li class="level1"><div class="li"> Check to make sure mp3s work (assuming you have built mp3play),</div><ol><li class="level2"><div class="li"> The first step is to download a mp3 file onto the platform. The <code>wget</code> command assumes that networking is properly configured (you have an IP number, the default gateway is set, and <acronym title="Domain Name Server">DNS</acronym> servers can be accessed), and working. See the <a href="setting_up_the_network.html" class="wikilink1" title="setting_up_the_network.html">network setup page</a> for more info.<pre class="code">root:/> cd /varroot:/var> wget http://www.radiocrazy.com/shows/A/AbbottCostello/ABCOWhosOnFirstclip.mp3</pre></div></li><li class="level2"><div class="li"> Next, play it with mp3play:<pre class="code">root:/var> mp3play ABCOWhosOnFirstclip.mp3</pre></div></li></ol></li><li class="level1"><div class="li"> Play two mp3 files at the same time. When running “make menuconfig”, if the 3 seperate stereos option is selected, two mp3 files can be played at the same time.<pre class="code">root: /var> mp3play ABCOWhosOnFirstclip.mp3 &root: /var> mp3play ABCOWhosOnFirstclip.mp3</pre><p>You can hear the song from both the green jack and black jack. The two songs don’t need to be the same. The first song is always output to the green jack. The second song is always output to the black jack.</p></div></li><li class="level1"><div class="li"> Optionally check to make sure the mic and headphones are working properly:<pre class="code">root:~> mixer +rec micRecording source: microot:~> vrec -w -t 10 test.wavRecording VOC : Speed 8000 Hz Mono ...root:~> vplay test.wavPlaying Creative Labs Voice file ...</pre><p>This should record 10 seconds of whatever is on the MIC, and then play it back over the output.</p></div></li></ol></div><!-- SECTION [2488-4316] --><h3><a name="debugging" id="debugging">Debugging</a></h3><div class="level3"><p>Most of the time, and issues we have seen have been tracked down to proper jumper settings, which are detailed on how to set up your <a href="audio_cards.html" class="wikilink1" title="audio_cards.html">audio cards</a> section. </p></div><!-- SECTION [4317-] --></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -