To add support for the AD1836A audio card to the kernel build system, a few things must be enabled properly for things to work.
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 <M> ALSA for SoC audio support ---> <M> SoC I2S(TDM mode) Audio for the ADI BF5xx chip <M> SoC AD1836 Audio support for BF5xx (0) Set a SPORT for Sound chip
I2S interface is not supported on 0.9 and earlier version of AD1836 daughter card
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.9rc2 (Thu Mar 24 10:33:39 2005 UTC). dma_alloc_init: dma_page @ 0x03a79000 - 256 pages at 0x03f00000 ALSA device list: #0: Analog Devices AD1836A at SPI irq 17/47, SPORT0 rx/tx dma 3/4 err irq /45
/proc/asound/AD1836A/is in the root filesystem, the audio driver is compiled in.
root:~> ls -l /proc/asound/AD1836A/ -r--r--r-- 1 0 0 0 id -rw-r--r-- 1 0 0 0 oss_mixer dr-xr-xr-x 3 0 0 0 pcm0c dr-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
root:~> modprobe snd-ad1836 root:~> modprobe snd-pcm-oss root:~> lsmod Module Size Used by snd_pcm_oss 31952 0 snd_mixer_oss 11436 1 snd_pcm_oss snd_ad1836 14876 0 snd_pcm 49628 2 snd_pcm_oss,snd_ad1836 snd_timer 13644 1 snd_pcm snd_page_alloc 3940 1 snd_pcm snd 32032 5 snd_pcm_oss,snd_mixer_oss,snd_ad1836,snd_pcm,snd_timer soundcore 4032 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 green jack. NOTE: The tone application seems to be broken. (plays at the wrong frequency, and doesn't produce the waveshape you ask it.
root:~> mixer +rec mic Recording source: mic
wgetcommand 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: /var> mp3play ABCOWhosOnFirstclip.mp3 & root: /var> mp3play ABCOWhosOnFirstclip.mp3
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.
root:~> mixer +rec mic Recording source: mic root:~> vrec -w -t 10 test.wav Recording VOC : Speed 8000 Hz Mono ... root:~> vplay test.wav Playing Creative Labs Voice file ...
This should record 10 seconds of whatever is on the MIC, and then play it back over the output.
root:~> vrec -w | vplay
5.1 Channels or 3 Separate Stereos (5.1 Channels) ---> root:~>aplay -c 6 6chan.wav
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 AD1836A audio card section.