Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
resources:tools-software:linux-drivers:sound:adau1373 [29 Aug 2011 14:58]
mhennerich [ADAU1373 driver]
resources:tools-software:linux-drivers:sound:adau1373 [23 Feb 2017 12:47] (current)
larsc
Line 1: Line 1:
 ====== ADAU1373 Sound CODEC Linux Driver ====== ====== ADAU1373 Sound CODEC Linux Driver ======
 +
  
 ===== Supported Devices ===== ===== Supported Devices =====
  
-This driver supports the\\ +  * [[adi>​ADAU1373]]
-[[adi>​ADAU1373]]+
  
-====== Source Code ======+===== Evaluation Boards ===== 
 +  * [[adi>​EVAL-ADAU1373Z]] 
 + 
 +===== Source Code =====
  
 ==== Status ==== ==== Status ====
  
- Source ​  Mainlined? ​ +^ Source ^ Mainlined? ^ 
-| [[bfgit>linux-kernel?sound/​soc/​codecs/​adau1373.c|git]] | [[git.linux.org>​sound/​soc/​codecs/​adau1373.c|In progress]] |+| [[git.linux.org>sound/​soc/​codecs/​adau1373.c|git]] | [[git.linux.org>​sound/​soc/​codecs/​adau1373.c|Yes]] |
  
 ==== Files ==== ==== Files ====
Line 20: Line 23:
 | include | [[git.linux.org>​include/​sound/​adau1373.h]] | | include | [[git.linux.org>​include/​sound/​adau1373.h]] |
  
-====== Example device initialization ​======+===== Example device initialization =====
  
 {{page>​software/​linux/​docs/​platform_and_bus_model#​Platform Data&​noheader&​firstseconly&​noeditbtn}} {{page>​software/​linux/​docs/​platform_and_bus_model#​Platform Data&​noheader&​firstseconly&​noeditbtn}}
Line 80: Line 83:
 ===== ALSA Controls ===== ===== ALSA Controls =====
  
-^ Name ^  Description ^ Configuration ^ +^ Name ^ Description ^ Configuration ^ 
-| AIF1 Capture Volume | | | +| AIF1 Capture Volume | Digital Audio Interface A Recording Volume ​| | 
-| AIF2 Capture Volume | | | +| AIF2 Capture Volume | Digital Audio Interface B Recording Volume ​| | 
-| AIF3 Capture Volume | | | +| AIF3 Capture Volume | Digital Audio Interface C Recording Volume ​| | 
-| ADC Capture Volume ​ | | | +| ADC Capture Volume | ADC Recording Volume ​| | 
-| DMIC Capture Volume ​ | | | +| DMIC Capture Volume | DMIC Recording Volume ​| | 
-AIF1 Playback ​Volume ​ | | | +Input 1 Capture ​Volume | Input 1 Gain | | 
-AIF2 Playback ​Volume ​ | | | +Input 2 Capture ​Volume | Input 2 Gain | | 
-AIF3 Playback ​Volume ​ | | | +Input 3 Capture ​Volume | Input 3 Gain | | 
-DAC1 Playback ​Volume ​ | | | +Input 4 Capture ​Volume | Input 4 Gain | | 
-DAC2 Playback ​Volume ​ | | | +Input 1 Boost Capture ​Volume | Input 1 ADC Boost (+20dB) ​| | 
-Lineout1 Playback ​Volume ​ | | | +Input 2 Boost Capture ​Volume | Input 2 ADC Boost (+20dB) ​| | 
-Speaker Playback ​Volume ​ | | | +Input 3 Boost Capture ​Volume | Input 3 ADC Boost (+20dB) ​| | 
-Headphone ​Playback Volume | | | +Input 4 Boost Capture Volume | Input 4 ADC Boost (+20dB) | | 
-Input 1 Capture ​Volume | | | +| AIF1 Playback Volume | Digital Audio Interface A Playback Datapath Volume ​| | 
-Input 2 Capture ​Volume | | | +AIF2 Playback ​Volume | Digital Audio Interface B Playback Datapath Volume ​| | 
-Input 3 Capture ​Volume | | | +AIF3 Playback ​Volume | Digital Audio Interface C Playback Datapath Volume ​| | 
-Input 4 Capture ​Volume | | | +DAC1 Playback ​Volume | DAC1 Playback Volume ​| | 
-Earpiece ​Playback Volume | | | +DAC2 Playback ​Volume | DAC2 Playback Volume ​| | 
-AIF3 Boost Playback Volume | | | +Lineout1 ​Playback Volume | Lineout 1 Volume ​| | 
-AIF2 Boost Playback Volume | | | +Lineout2 ​Playback Volume | Lineout 2 Volume ​Single-ended lineout ​
-AIF1 Boost Playback Volume | | | +Speaker ​Playback Volume ​ Speaker Out Volume ​| | 
-AIF3 Boost Capture ​Volume | | | +Headphone ​Playback Volume | Heaphone Out Volume| | 
-AIF2 Boost Capture ​Volume | | | +Earpiece Playback ​Volume | Earpiece Amplifier Gain | | 
-AIF1 Boost Capture ​Volume | | | +AIF1 Boost Playback ​Volume | Digital Audio Interface A Playback Gain (+6dB) ​| | 
-DMIC Boost Capture ​Volume | | | +AIF2 Boost Playback ​Volume | Digital Audio Interface B Playback Gain (+6dB) ​| | 
-ADC Boost Capture Volume | | | +AIF3 Boost Playback ​Volume | Digital Audio Interface C Playback Gain (+6dB) ​| | 
-DAC2 Boost Playback ​Volume | | | +AIF1 Boost Capture Volume | Digital Audio Interface C Recording Gain (+6dB) ​| | 
-DAC1 Boost Playback ​Volume | | | +AIF2 Boost Capture ​Volume | Digital Audio Interface C Recording Gain (+6dB) ​| | 
-Input 1 Boost Capture Volume | | | +AIF3 Boost Capture ​Volume | Digital Audio Interface C Recording Gain (+6dB) ​| | 
-Input 2 Boost Capture Volume | | | +ADC Boost Capture Volume | ADC Recording Gain (+6dB) ​| | 
-Input 3 Boost Capture ​Volume | | | +DMIC Boost Capture Volume | DMIC Recording Gain (+6dB) ​| | 
-Input 4 Boost Capture ​Volume | | | +DAC1 Boost Playback ​Volume | DAC1 Playback Gain (+6dB) ​| | 
-| Speaker Boost Playback Volume | | | +DAC2 Boost Playback ​Volume | DAC1 Playback Gain (+6dB) ​| | 
-| Lineout1 LR Mux | | | +| Speaker Boost Playback Volume | Speaker Output Gain  ​| | 
-| Speaker LR Mux | | | +| Lineout1 LR Mux | Lineout1 Left-Right Mux (Mono Stereo Control)\\ Valid values: "​Mute",​ "Right Channel (L+R)",​ "Left Channel (L+R)",​ "​Stereo" ​
-| HPF Cutoff | | | +| Lineout2 LR Mux  | Lineout2 Left-Right Mux (Mono Stereo Control)\\ Valid values: "​Mute",​ "Right Channel (L+R)",​ "Left Channel (L+R)",​ "​Stereo"​ | Single-ended lineout ​
-| HPF Switch | | | +| Speaker LR Mux | Speaker Left-Right Mux (Mono Stereo Control)\\ Valid values: "​Mute",​ "Right Channel (L+R)",​ "Left Channel (L+R)",​ "​Stereo" ​| | 
-| HPF Channel | | | +| HPF Cutoff | High-pass-filter cutoff frequency.\\ Valid values: "​3.7Hz",​ "​50Hz",​ "​100Hz",​ ... steps of 50Hz ..., "​800Hz" ​| | 
-| Bass HPF Cutoff | | | +| HPF Switch | Enable/​Disable High-pass-filter ​| | 
-| Bass Clip Level Threshold | | | +| HPF Channel | Hight-pass-filter channel.\\ Valid values: "​Channel1",​ "​Channel2",​ "​Channel3",​ "​Channel4",​ "​Channel5" ​| | 
-| Bass LPF Cutoff | | | +| Bass HPF Cutoff | Bass High-pass-filter cutoff frequency.\\ Valid values: ​ "​158Hz",​ "​232Hz",​ "​347Hz",​ "​520Hz" ​| | 
-| Bass Playback Switch | | | +| Bass Clip Level Threshold | Signal Extend Density (Clip Level). Overdrive level for bass enhancement. \\ Valid values: "​0.125",​ "​0.250",​ "​0.370",​ "​0.500",​ "​0.625",​ "​0.750",​ "​0.875" ​| | 
-| Bass Playback Volume | | | +| Bass LPF Cutoff | Bass Low-pass-filter cutoff frequency.\\ Valid values: "​801Hz",​ "​1001Hz" ​| | 
-| Bass Channel | | | +| Bass Playback Switch | Enable/​Disable Bass Enhancement ​| | 
-| 3D Freq | +| Bass Playback Volume | Bass Enhancement Gain | | 
-| 3D Level | | | +| Bass Channel | Bass Enhancement Channel.\\ Valid values: "​Channel1",​ "​Channel2",​ "​Channel3",​ "​Channel4",​ "​Channel5"  ​| | 
-| 3D Playback Switch | | | +| 3D Freq | 3D Enhancement cutoff frequency (relative to the sampling rate).\\ Valid values: "No 3D", "​0.03125 fs", "​0.04583 fs", "0.075 fs", "​0.11458 fs", "​0.16875 fs", "​0.27083 fs" ​
-| 3D Playback Volume | | | +| 3D Level | 3D Enhancement effect level. \\ Valid values: "​0%",​ "​6.67%",​ "​13.33%",​ "​20%",​ "​26.67%",​ "​33.33%",​ "​40%",​ "​46.67%",​ "​53.33%",​ \\ "​60%",​ "​66.67%",​ "​73.33%",​ "​80%",​ "​86.67",​ "​93.33%",​ "​100%" ​| | 
-| 3D Channel | | | +| 3D Playback Switch | Enable/​Disable 3D Enhancement ​| | 
-| Zero Cross Switch | | | +| 3D Playback Volume | 3D Enhancement Gain | | 
-| Lineout2 Playback Volume | | Single-ended lineout ​| +| 3D Channel | 3D Enhancement Channel.\\ Valid values: "​Channel1",​ "​Channel2",​ "​Channel3",​ "​Channel4",​ "​Channel5" ​| | 
-| Lineout2 LR Mux  | | Single-ended lineout ​+| Zero Cross Switch | Enable/​Disable Zero-Cross-Detection for volume updates ​| | 
-| DRC1 Channel | | | +| DRC1 Channel | Dynamic Range Control 1 Channel.\\ Valid values: "​Channel1",​ "​Channel2",​ "​Channel3",​ "​Channel4",​ "​Channel5" ​| | 
-| DRC2 Channel | | | +| DRC2 Channel | Dynamic Range Control 2 Channel.\\ Valid values: "​Channel1",​ "​Channel2",​ "​Channel3",​ "​Channel4",​ "​Channel5" ​| | 
-| DRC3 Channel | | |+| DRC3 Channel | Dynamic Range Control 3 Channel.\\ Valid values: "​Channel1",​ "​Channel2",​ "​Channel3",​ "​Channel4",​ "​Channel5" ​| |
  
-===== Supported DAI formats ​=====+===== PLL Configuration ====== 
 + 
 +The ADAU1373 features two PLLs: 
 + 
 +<code c> 
 +enum adau1373_pll { 
 +    ADAU1373_PLL1 = 0, 
 +    ADAU1373_PLL2 = 1, 
 +}; 
 +</​code>​ 
 + 
 +Each PLLs input frequency can be selected from a variety of signals:  
 +<code c> 
 +enum adau1373_pll_src { 
 +    ADAU1373_PLL_SRC_MCLK1 = 0, 
 +    ADAU1373_PLL_SRC_BCLK1 = 1, 
 +    ADAU1373_PLL_SRC_BCLK2 = 2, 
 +    ADAU1373_PLL_SRC_BCLK3 = 3, 
 +    ADAU1373_PLL_SRC_LRCLK1 = 4, 
 +    ADAU1373_PLL_SRC_LRCLK2 = 5, 
 +    ADAU1373_PLL_SRC_LRCLK3 = 6, 
 +    ADAU1373_PLL_SRC_GPIO1 = 7, 
 +    ADAU1373_PLL_SRC_GPIO2 = 8, 
 +    ADAU1373_PLL_SRC_GPIO3 = 9, 
 +    ADAU1373_PLL_SRC_GPIO4 = 10, 
 +    ADAU1373_PLL_SRC_MCLK2 = 11, 
 +}; 
 +</​code>​ 
 + 
 +The input frequency must configured to be between 7813 and 27000000 Hz. The output frequency must be configured to be between 45158000 and 49152000. Configuring the PLL with other input or output frequency will fail. 
 + 
 +The PLL runs at 1024 times the base sample rate. So for a 48000 Hz based sample rate you'd normally choose 49152000 Hz for the PLL output frequncey and for a 44100 Hz based sample rate 45158400 Hz. 
 + 
 +===== DAI configuration ===== 
 + 
 +The codec driver registers three DAIs: 
 +  * "​adau1373-aif1"​ (Digital Audio Interface A) 
 +  * "​adau1373-aif2"​ (Digital Audio Interface B) 
 +  * "​adau1373-aif3"​ (Digital Audio Interface C) 
 + 
 +==== Supported DAI formats ====
  
 ^ Name ^ Supported by driver ^ Description ^ ^ Name ^ Supported by driver ^ Description ^
-| SND_SOC_DAIFMT_I2S ​    | yes | I2S Justified ​mode |+| SND_SOC_DAIFMT_I2S ​    | yes | I2S mode |
 | SND_SOC_DAIFMT_RIGHT_J | yes | Right Justified mode | | SND_SOC_DAIFMT_RIGHT_J | yes | Right Justified mode |
 | SND_SOC_DAIFMT_LEFT_J ​ | yes | Left Justified mode  | | SND_SOC_DAIFMT_LEFT_J ​ | yes | Left Justified mode  |
Line 158: Line 201:
 | SND_SOC_DAIFMT_CBS_CFS | yes | Codec bit- and frameclock slave | | SND_SOC_DAIFMT_CBS_CFS | yes | Codec bit- and frameclock slave |
  
 +==== DAI sysclk ====
 +
 +The DAIs can either use PLL1 or PLL2 as source. When configuring a DAI its rate should be set to the rate of the source PLL.
 +
 +<code c>
 +enum adau1373_clk_src {
 +    ADAU1373_CLK_SRC_PLL1 = 0,
 +    ADAU1373_CLK_SRC_PLL2 = 1,
 +};
 +</​code>​
 +
 +==== Example DAI configuration ====
 +
 +<code c>
 +static int bfin_eval_adau1373_hw_params(struct snd_pcm_substream *substream,
 + struct snd_pcm_hw_params *params)
 +{
 + struct snd_soc_pcm_runtime *rtd = substream->​private_data;​
 + struct snd_soc_dai *cpu_dai = rtd->​cpu_dai;​
 + struct snd_soc_dai *codec_dai = rtd->​codec_dai;​
 + int ret;
 + int pll_rate;
 +
 + ret = snd_soc_dai_set_fmt(cpu_dai,​ SND_SOC_DAIFMT_I2S |
 + SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);​
 + if (ret)
 + return ret;
 +
 + ret = snd_soc_dai_set_fmt(codec_dai,​ SND_SOC_DAIFMT_I2S |
 + SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);​
 + if (ret)
 + return ret;
 +
 + switch (params_rate(params)) {
 + case 48000:
 + case 8000:
 + case 12000:
 + case 16000:
 + case 24000:
 + case 32000:
 + pll_rate = 48000 * 1024;
 + break;
 + case 44100:
 + case 7350:
 + case 11025:
 + case 14700:
 + case 22050:
 + case 29400:
 + pll_rate = 44100 * 1024;
 + break;
 + default:
 + return -EINVAL;
 + }
 +
 + ret = snd_soc_dai_set_pll(codec_dai,​ ADAU1373_PLL1,​
 + ADAU1373_PLL_SRC_MCLK1,​ 12288000, pll_rate);
 + if (ret)
 + return ret;
 +
 + ret = snd_soc_dai_set_sysclk(codec_dai,​ ADAU1373_CLK_SRC_PLL1,​ pll_rate,
 + SND_SOC_CLOCK_IN);​
 +
 + return ret;
 +}
 +
 +static int bfin_eval_adau1373_codec_init(struct snd_soc_pcm_runtime *rtd)
 +{
 + struct snd_soc_dai *codec_dai = rtd->​codec_dai;​
 + unsigned int pll_rate = 48000 * 1024;
 + int ret;
 +
 + ret = snd_soc_dai_set_pll(codec_dai,​ ADAU1373_PLL1,​
 + ADAU1373_PLL_SRC_MCLK1,​ 12288000, pll_rate);
 + if (ret)
 + return ret;
 +
 + ret = snd_soc_dai_set_sysclk(codec_dai,​ ADAU1373_CLK_SRC_PLL1,​ pll_rate,
 + SND_SOC_CLOCK_IN);​
 +
 + return ret;
 +}
 +static struct snd_soc_ops bfin_eval_adau1373_ops = {
 + .hw_params = bfin_eval_adau1373_hw_params,​
 +};
 +
 +static struct snd_soc_dai_link bfin_eval_adau1373_dai = {
 + .name = "​adau1373",​
 + .stream_name = "​adau1373",​
 + .cpu_dai_name = "​bfin-i2s.0",​
 + .codec_dai_name = "​adau1373-aif1",​
 + .platform_name = "​bfin-i2s-pcm-audio",​
 + .codec_name = "​adau1373.0-001a",​
 + .ops = &​bfin_eval_adau1373_ops,​
 + .init = bfin_eval_adau1373_codec_init,​
 +};
 +</​code>​
  
 ====== ADAU1373 evaluation board driver ====== ====== ADAU1373 evaluation board driver ======
 +
 +There is no dedicated Blackfin STAMP evaluation board for the ADAU1373. During test and driver development we used the [[adi>​EVAL-ADAU1373]] board.
 +
 +It can be easily wired to the Blackfin STAMP SPORT header.
  
 ===== Source ===== ===== Source =====
Line 166: Line 309:
  
 ^  Source ​ ^  Mainlined? ​ ^ ^  Source ​ ^  Mainlined? ​ ^
-| [[bfgit>linux-kernel?sound/​soc/​blackfin/​bfin-eval-adau1373.c|In progress]] | [[git.linux.org>​sound/​soc/​blackfin/​bfin-eval-adau1373.c|In progress]]+| [[git.linux.org>sound/​soc/​blackfin/​bfin-eval-adau1373.c|git]] | [[git.linux.org>​sound/​soc/​blackfin/​bfin-eval-adau1373.c|yes]] |
  
 ==== Files ==== ==== Files ====
Line 173: Line 316:
 | driver ​ | [[git.linux.org>​sound/​soc/​blackfin/​bfin-eval-adau1373.c]] | | driver ​ | [[git.linux.org>​sound/​soc/​blackfin/​bfin-eval-adau1373.c]] |
  
-===== Adding ​Kernel ​Support - As a module ​===== +===== Kernel ​configuration ​=====
-Skip this section if you want to build the driver into the kernel directly. +
-To add support for codec ADAU1373 to the kernel build system, a few things must be enabled properly for things to work.The configuration is as following: ​    +
  
 <​code>​ <​code>​
-Linux Kernel Configuration +Device Drivers ​ ---> 
-  ​Device Drivers ​ --->  +[*] I2C support ​ ​--->​ 
-    ​Sound ​ ​--->​  +[*]   I2C Hardware Bus support ​ ---> 
-      <​M>​ Sound card support +***     I2C system bus drivers ​(mostly embedded / system-on-chip) *** 
-        Advanced Linux Sound Architecture ​ ​--->​ +<*      Blackfin TWI I2C support 
-          <​M>​ Advanced Linux Sound Architecture +(100)     ​Blackfin TWI I2C clock (kHz)
-          < > Sequencer support +
-          <M> OSS Mixer API  +
-          <M> OSS PCM (digital audio) API +
-        System ​on Chip audio support  ​---> +
-            <M> ALSA for SoC audio support +
-            <M> SoC I2S Audio for the ADI BF5xx chip  +
-            <MSoC ADAU1373 Audio support  +
-            < > SoC AC97 Audio support for BF5xx  +
-            ​(0Set a SPORT for Sound chip+
 </​code>​ </​code>​
  
-<note important>​ +Enable ALSA SoC evaluation board driver:
-I2C bus is used to configure the codec. ​ So, if the audio driver ​is built into kernel, the I2c driver is also built into kernel automatically. ​ But if the audio driver is built as module, then make sure that the I2C driver is loaded before the audio module. ​  +
-</​note>​ +
 <​code>​ <​code>​
-Linux Kernel Configuration +Device Drivers ​ ---> 
-  ​Device Drivers ​ ---> +<MSound card support ​ ---> 
-    <*I2C support ​ ---> +<​M> ​  ​Advanced Linux Sound Architecture  ​---> 
-      --- I2C support +<​M> ​    ALSA for SoC audio support  ​---> 
-          I2C Hardware Bus Support ​---> +<M      Support for the EVAL-ADAU1373 boards on Blackfin ​eval boards
-            <*> Blackfin ​TWI I2C support  ​+
 </​code>​ </​code>​
  
-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.+===== Hardware configuration =====
  
 +Connect the STAMP SPORT 0 port (P6) to the EVAL-ADAU1373 J23 and J28 headers.
  
-==== Testing ​the built in kernel driver ====+Note that the SPORT has separate signals for the capture and playback clocks, while the ADAU1373 uses the same clock signals for both, so the EVAL-ADU1373 clock signal pins need to be connected to two STAMP pins each.
  
-If audio is configured as modulesskip this section. If audio is built into kernel and you have booted the kernelthere are a few things to check to ensure audio is working:+^ STAMP pin ^ EVAL-ADAU1373 pin ^ Function ^ 
 +| P6-26 (SPORT 0 - PJ2_SCL) | J23-1 | I2C SCL | 
 +| P6-24 (SPORT 0 - PJ3_SDA) | J23-3 | I2C SDA | 
 +| P6-6  (SPORT 0 - PJ9_TSCLK0)P6-16 (SPORT 0 - PJ6_RSCLK0) | J28-6 (A_BCLK) | BCLK | 
 +| P6-11 (SPORT 0 - PJ10_TFS0)P6-7 (SPORT 0 - PJ7_RFS0) | J28-8 (A_LRC) | LRCLK | 
 +| P6-14 (SPORT 0 - PJ11_DT0PRI | J28-10 (A_DACDAT) | Playback data | 
 +| P6-8  (SPORT 0 - PJ8_DR0PRI) | J28-12 (A_ADCDAT) | Captrue data | 
 +| P6-33 | J28-1 | GND |
  
-  - Check the boot messages to see if you have booted the correct kernel. During kernel boot, it should print out: <​code>​ 
-Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC). 
-ASoC version 0.13.1 
-dma rx:3 tx:4, err irq:15, regs:​ffc00800 
-adau1371 Audio Codec 0.1<​6>​dma_alloc_init:​ dma_page @ 0x03011000 - 512 pages at 0x03e00000 
-asoc: ADAU1373 <-> bf5xx-i2s-0 mapping ok 
-ALSA device list: 
-  #0: bf5xx_adau1373 (ADAU1373) 
-</​code>​ 
  
-==== Testing the audio module ​====+===== Driver testing =====
  
-<​xterm>​root:​~>​ **modprobe snd-adau1373** +Load the driver and make sure the sound card is properly instantiated.
-root:~> **modprobe snd-pcm-oss** +
-root:~> **lsmod** +
-Module ​                 Size  Used by +
-snd_pcm_oss ​           31968  0  +
-snd_mixer_oss ​         11360  1 snd_pcm_oss +
-snd_adau1373 ​            ​1412 ​ 0  +
-snd_soc_adau1373 ​        ​8528 ​ 1 snd_adau1373 +
-snd_soc_bf5xx ​          ​2784 ​ 1 snd_adau1373 +
-snd_soc_bf5xx_i2s ​     10916  2 snd_adau1373,​snd_soc_bf5xx +
-snd_soc_core ​          ​17120 ​ 3 snd_adau1373,​snd_soc_adau1373,​snd_soc_bf5xx +
-snd_pcm ​               48356  3 snd_pcm_oss,​snd_soc_bf5xx,​snd_soc_core +
-snd_page_alloc ​         4232  1 snd_pcm +
-snd_timer ​             13796  1 snd_pcm +
-snd                    31092  6 snd_pcm_oss,​snd_mixer_oss,​snd_soc_adau1373,​snd_soc_core,​snd_pcm,​snd_timer +
-soundcore ​              ​3940 ​ 1 snd+
  
-root:~**tone** +<WRAP box bggreen><​wrap info>​This specifies any shell prompt running on the target</​wrap>​ 
-TONEgenerating sine wave at 1000 Hz...+<​xterm>​ 
 +root:/modprobe snd-bf5xx-i2s 
 +root:/> modprobe snd-soc-bf5xx-i2s 
 +root:/> modprobe snd-soc-adau1373 
 +root:/> modprobe snd-soc-bfin-eval-adau1373 
 +dma rx:3 tx:4, err irq:45, regs:​ffc00800 
 +asoc: ADAU1373 <-> bf5xx-i2s mapping ok
 </​xterm>​ </​xterm>​
 +</​WRAP>​
  
 +<WRAP box bggreen><​wrap info>​This specifies any shell prompt running on the target</​wrap>​
 +<​xterm>​
 +root:/> modprobe snd-pcm-oss
 +root:/> tone
 +TONE: generating sine wave at 1000 Hz...
  
-===== Testing Audio ===== +root:/> ​arecord ​-f cd | aplay 
- +Recording WAVE 'stdin' ​: Signed 16 bit Little EndianRate 44100 Hz, Stereo 
-  - Check the output <​xterm>​root:~> **tone** +Playing WAVE 'stdin' : Signed 16 bit Little EndianRate 44100 HzStereo
-TONE: generating sine wave at 1000 Hz... +
-</xtermYou should hear something out of the headphone Jack on the top of J8. +
-  ​Select audio input to INPB (the default is INPA, assuming you have built ALSA utils): <​xterm>​root:/>​ **amixer sset 'Input Mux' '​INPB'​** +
-Simple mixer control ​'Input Mux',0 +
-  ​Capabilities:​ enum +
-  Items: ​'INPA' ​'​INPB'​ '​INPD'​ '​INPD'​ +
-  Item0'​INPB'</​xterm>​ Also you can run "​alsamixer"​ to get graphic configuration interface. +
-  - Check to make sure mp3s work (assuming you have built mp3play), +
-    - The first step is to download a mp3 file onto the platform. The ''​wget''​ command assumes that networking is properly configured (you have an IP numberthe default gateway is set, and DNS servers can be accessed), and working. See the [[:​setting_up_the_network|network setup page]] for more info. <​xterm>​root:/>​ **cd /var** +
-root:/​var>​ **wget http://​www.radiocrazy.com/​shows/​A/​AbbottCostello/​ABCOWhosOnFirstclip.mp3** +
-</​xterm>​ +
-    - Next, play it with mp3play: <​xterm>​root:/​var>​ **mp3play ABCOWhosOnFirstclip.mp3**</​xterm>​ +
-  - You can play it in one step with: <​xterm>​root:​~>​ **mp3play http://​www.radiocrazy.com/​shows/​A/​AbbottCostello/​ABCOWhosOnFirstclip.mp3** +
-%%http://​www.radiocrazy.com/​shows/​A/​AbbottCostello/​ABCOWhosOnFirstclip.mp3:​ MPEG2-III (0 ms)%%+
 </​xterm>​ </​xterm>​
-   - Optionally check to make sure the audio out is right: ​<xterm>​root:​/> **amixer sset '​Output Mixer' '​Line'​** +</WRAP>
-Simple mixer control '​Output Mixer',​0 +
-  Capabilities:​ enum +
-  Items: '​Line'​ 'Class D' '​HeadPhone'​ +
-  Item0: '​Line'​ +
-root:~> **arecord -d 10 test.wav** +
-Recording WAVE "​test.wav"​ : Unsigned 8 bit, Rate 8000 Hz, Mono +
-root:~> **aplay test.wav** +
-Adjust playback volume can be done through command:​**amixer sset Master 80%** +
-here 80 is the ratio. +
-</​xterm>​ This should record 10 seconds of whatever is on the Line, and then play it back over the output. +
-  - You should also be able to do a "​talkthrough",​ and hear on the speakers anything you put on the line. <​xterm>​root:​~>​ **arecord | aplay**</​xterm>+
resources/tools-software/linux-drivers/sound/adau1373.1314622713.txt.gz · Last modified: 29 Aug 2011 14:58 by mhennerich