This is an old revision of the document!
Source |
---|
git |
Function | File |
---|---|
driver | sound/soc/codecs/ad1836.c |
include | sound/soc/codecs/ad1836.h |
Name | Description | Model |
---|---|---|
DAC1OUT | DAC Channel1 Output | AD1835A, AD1836A, AD1838A |
DAC2OUT | DAC Channel2 Output | AD1835A, AD1836A, AD1838A |
DAC3OUT | DAC Channel3 Output | AD1835A, AD1836A, AD1838A |
DAC4OUT | DAC Channel4 Output | AD1835A |
ADC1IN | ADC Channel1 Input | AD1835A, AD1836A, AD1838A |
ADC2IN | ADC Channel2 Input | AD1836A |
Name | Description | Model |
---|---|---|
ADC High Pass Filter Switch | Enable/Disable ADC high-pass filter | AD1835A, AD1836A, AD1838A |
Playback Deemphasis | Select playback de-emphasis. Possible Values: “None”, “44.1kHz”, “32kHz”, “48kHz” | AD1835A, AD1836A, AD1838A |
DAC1 Playback Volume | DAC Channel 1 volume | AD1835A, AD1836A, AD1838A |
DAC2 Playback Volume | DAC Channel 2 volume | AD1835A, AD1836A, AD1838A |
DAC3 Playback Volume | DAC Channel 3 volume | AD1835A, AD1836A, AD1838A |
DAC4 Playback Volume | DAC Channel 4 volume | AD1835A |
DAC1 Playback Switch | Mute/Unmute DAC Channel 1 | AD1835A, AD1836A, AD1838A |
DAC2 Playback Switch | Mute/Unmute DAC Channel 2 | AD1835A, AD1836A, AD1838A |
DAC3 Playback Switch | Mute/Unmute DAC Channel 3 | AD1835A, AD1836A, AD1838A |
DAC4 Playback Switch | Mute/Unmute DAC Channel 4 | AD1835A |
ADC1 Capture Switch | Mute/Unmute ADC Channel1 | AD1835A, AD1836A, AD1838A |
ADC2 Capture Switch | Mute/Unmute ADC Channel2 | AD1836A |
ADC2 Capture Volume | Gain for ADC Channel 2 | AD1836A |
Name | Supported by driver | Description |
---|---|---|
SND_SOC_DAIFMT_I2S | no | I2S Justified mode |
SND_SOC_DAIFMT_RIGHT_J | no | Right Justified mode |
SND_SOC_DAIFMT_LEFT_J | no | Left Justified mode |
SND_SOC_DAIFMT_DSP_A | yes | data MSB after FRM LRC |
SND_SOC_DAIFMT_DSP_B | no | data MSB during FRM LRC |
SND_SOC_DAIFMT_AC97 | no | AC97 mode |
SND_SOC_DAIFMT_PDM | no | Pulse density modulation |
SND_SOC_DAIFMT_NB_NF | no | Normal bit- and frameclock |
SND_SOC_DAIFMT_NB_IF | no | Normal bitclock, inverted frameclock |
SND_SOC_DAIFMT_IB_NF | no | Inverted frameclock, normal bitclock |
SND_SOC_DAIFMT_IB_IF | yes | Inverted bit- and frameclock |
SND_SOC_DAIFMT_CBM_CFM | yes | Codec bit- and frameclock master |
SND_SOC_DAIFMT_CBS_CFM | no | Codec bitclock slave, frameclock master |
SND_SOC_DAIFMT_CBM_CFS | no | Codec bitclock master, frameclock slave |
SND_SOC_DAIFMT_CBS_CFS | no | Codec bit- and frameclock slave |
To add support for the built-in codec AD183X of BF5XX to the kernel build system, a few things must be enabled properly for things to work.The configuration is as following:
Linux Kernel Configuration Device Drivers ---> Sound ---> <M> Sound card support Advanced Linux Sound Architecture ---> <M> Advanced Linux Sound Architecture < > Sequencer support <M> OSS Mixer API <M> OSS PCM (digital audio) API <M> ALSA for SoC audio support ---> <M> SoC I2S(TDM mode) Audio for the ADI BF5xx chip <M> SoC AD183X Audio support for BF5xx
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.
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:
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:45, regs: asoc: AD183X <-> bf5xx-tdm mapping ok ALSA device list: #0: bf5xx_ad183x (AD183X)
root:/> modprobe snd-ad183x dma rx:3 tx:4, err irq:45, regs:ffc00800 asoc: AD183X <-> bf5xx-tdm mapping ok root:/> modprobe snd-pcm-oss root:/> lsmod Module Size Used by snd_pcm_oss 28414 0 snd_mixer_oss 10215 1 snd_pcm_oss snd_ad183x 801 0 snd_bf5xx_tdm 1857 1 snd_ad183x snd_soc_ad183x 8033 1 snd_ad183x snd_soc_bf5xx_tdm 2157 1 snd_ad183x snd_soc_bf5xx_sport 9392 2 snd_bf5xx_tdm,snd_soc_bf5xx_tdm snd_soc_core 33839 4 snd_ad183x,snd_bf5xx_tdm,snd_soc_ad183x,snd_soc_bf5xx_tdm snd_pcm 44936 3 snd_pcm_oss,snd_bf5xx_tdm,snd_soc_core snd_page_alloc 2753 1 snd_pcm snd_timer 12412 1 snd_pcm snd 32171 5 snd_pcm_oss,snd_mixer_oss,snd_soc_core,snd_pcm,snd_timer input_core 15713 1 snd soundcore 3591 1 snd root:~> tone TONE: generating sine wave at 1000 Hz...
root:~> tone TONE: generating sine wave at 1000 Hz...You should hear something out of the headphone Jack.
root:/> amixer Simple mixer control 'Playback Deemphasis',0 Capabilities: enum Items: 'None' '44.1kHz' '32kHz' '48kHz' Item0: '48kHz' Simple mixer control 'ADC High Pass Filter',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] Simple mixer control 'ADC1',0 Capabilities: pswitch Playback channels: Front Left - Front Right Mono: Front Left: Playback [on] Front Right: Playback [on] Simple mixer control 'ADC2',0 Capabilities: pswitch Playback channels: Front Left - Front Right Mono: Front Left: Playback [on] Front Right: Playback [on] Simple mixer control 'DAC1',0 Capabilities: volume pswitch Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: 0 - 1023 Front Left: 1023 [100%] Playback [on] Front Right: 1023 [100%] Playback [on] Simple mixer control 'DAC2',0 Capabilities: volume pswitch Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: 0 - 1023 Front Left: 1023 [100%] Playback [on] Front Right: 1023 [100%] Playback [on] Simple mixer control 'DAC3',0 Capabilities: volume pswitch Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: 0 - 1023 Front Left: 1023 [100%] Playback [on] Front Right: 1023 [100%] Playback [on] root:/> amixer sset 'DAC3' 200 Simple mixer control 'DAC3',0 Capabilities: volume pswitch Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: 0 - 1023 Front Left: 200 [20%] Playback [on] Front Right: 200 [20%] Playback [on]Also you can run “alsamixer” to get graphic configuration interface, OSS-based “mixer” can work too.
wget
command assumes that networking is properly configured (you have an IP number, the default gateway is set, and DNS servers can be accessed), and working. See the network setup page for more info. root:/> cd /var root:/var> wget http://www.radiocrazy.com/shows/A/AbbottCostello/ABCOWhosOnFirstclip.mp3
root:/var> mp3play ABCOWhosOnFirstclip.mp3
root:~> mp3play http://www.radiocrazy.com/shows/A/AbbottCostello/ABCOWhosOnFirstclip.mp3 http://www.radiocrazy.com/shows/A/AbbottCostello/ABCOWhosOnFirstclip.mp3: MPEG2-III (0 ms)
root:~> arecord -d 10 test.wav Recording WAVE "test.wav" : Unsigned 8 bit, Rate 8000 Hz, Mono root:~> aplay test.wavThis should record 10 seconds of whatever is on the Line, and then play it back over the output.
root:~> arecord | aplay