1:CODEC
ADC和DAC、DSPADC是模拟转数字信号编码芯片,例如TLV320ADC,DAC是数字转模拟信号解码芯片,例如ES9028,前者一般用于录音而后者一般用于解码音频。中间数字信号处理过程交由DSP进行操作。模拟信号从ADC输入,经过编码变成数字信号,交由DSP进行运算和处理,最终交给DAC将数字信号重新解码为模拟信号后输出。下面的链接中对ADC,DAC,DSP进行了一定的介绍。
CODEC=ADC+DAC
ADC-->DSP-->DAC
常见的应用就是 录音(ADC存储如为WAV,PCM,MP3)和播放(对存储在硬盘中的歌曲进行播放)
2:基本的对比
3:基于1452开发板的组成
其中AD1938
The AD1938 is a high performance, single-chip codec that provides
four analog-to-digital converters (ADCs) with input and eight
digital-to-analog converters (DACs) with single-ended output
using the Analog Devices
4: 典型搭配
https://www.analog.com/media/en/technical-documentation/user-guides/EVAL-ADAU1452MINIZ_User_Guide.pdfhttps://www.analog.com/media/en/technical-documentation/user-guides/EVAL-ADAU1452MINIZ_User_Guide.pdf
https://www.analog.com/media/en/technical-documentation/user-guides/EVAL-ADAU1452REVBZ-UG-1662.pdfhttps://www.analog.com/media/en/technical-documentation/user-guides/EVAL-ADAU1452REVBZ-UG-1662.pdf
下面的中可以知道AD,DA,CODECS,DSP的功能
下面是一个具有AD和DA的CODEC 故可以实现播放和录音的功能
下面只能进行DAC只能实现音频的播放
https://www.analog.com/media/en/technical-documentation/user-guides/adsp-sc589-ezboard-manual.pdfhttps://www.analog.com/media/en/technical-documentation/user-guides/adsp-sc589-ezboard-manual.pdf
https://download.analog.com/tools/LinuxAddInForCCES/documentation/linux_add_in_user_guide_1.3.1.pdfhttps://download.analog.com/tools/LinuxAddInForCCES/documentation/linux_add_in_user_guide_1.3.1.pdf
可以知道,
Alsa Opensrc Org - Independent ALSA and linux audio support sitehttps://alsa.opensrc.org/Proc_asound_documentation
evk_8mm:/proc # cd asound/
evk_8mm:/proc/asound # ls
card0 cards devices hwdep pcm timers version wm8904audio
evk_8mm:/proc/asound # ls -al
total 0
dr-xr-xr-x 3 root root 0 2019-11-16 15:47 .
dr-xr-xr-x 198 root root 0 1970-01-01 00:00 ..
dr-xr-xr-x 4 root root 0 2019-11-16 15:47 card0
-r--r--r-- 1 root root 0 2019-11-16 15:47 cards
-r--r--r-- 1 root root 0 2019-11-16 15:47 devices
-r--r--r-- 1 root root 0 2019-11-16 15:47 hwdep
-r--r--r-- 1 root root 0 2019-11-16 15:47 pcm
-r--r--r-- 1 root root 0 2019-11-16 15:47 timers
-r--r--r-- 1 root root 0 2019-11-16 15:47 version
lrwxrwxrwx 1 root root 5 2019-11-16 15:47 wm8904audio -> card0
evk_8mm:/proc/asound # cat devices 0: [ 0] : control16: [ 0- 0]: digital audio playback24: [ 0- 0]: digital audio capture33: : timer
evk_8mm:/proc/asound # cat pcm
00-00: HiFi wm8904-hifi-0 : : playback 1 : capture 1
evk_8mm:/proc/asound # cat
card0/ devices pcm version
cards hwdep timers wm8904audio/
evk_8mm:/proc/asound # cat version
Advanced Linux Sound Architecture Driver Version k4.14.98.
evk_8mm:/proc/asound # cat timers
G0: system timer : 4000.000us (10000000 ticks)
P0-0-0: PCM playback 0-0-0 : SLAVE
P0-0-1: PCM capture 0-0-1 : SLAVE
evk_8mm:/proc/asound # cd c
card0/ cards
evk_8mm:/proc/asound # cd card0/
evk_8mm:/proc/asound/card0 # ls
id pcm0c pcm0p
evk_8mm:/proc/asound/card0 # ls -al
total 0
dr-xr-xr-x 4 root root 0 2019-11-16 15:48 .
dr-xr-xr-x 3 root root 0 2019-11-16 15:47 ..
-r--r--r-- 1 root root 0 2019-11-16 15:48 id
dr-xr-xr-x 3 root root 0 2019-11-16 15:48 pcm0c
dr-xr-xr-x 3 root root 0 2019-11-16 15:48 pcm0p
evk_8mm:/proc/asound/card0 # cd pcm0p
evk_8mm:/proc/asound/card0/pcm0p # ls
info sub0
evk_8mm:/proc/asound/card0/pcm0p # ls -al
total 0
dr-xr-xr-x 3 root root 0 2019-11-16 15:48 .
dr-xr-xr-x 4 root root 0 2019-11-16 15:48 ..
-r--r--r-- 1 root root 0 2019-11-16 15:48 info
dr-xr-xr-x 2 root root 0 2019-11-16 15:48 sub0
evk_8mm:/proc/asound/card0/pcm0p # c[ 186.209866] healthd: battery l=85 v=3 t=35.0 h=2 st=2 c=400 fc=4000000 cc=32 chg=a
a[ 186.392048] healthd: battery l=85 v=3 t=35.0 h=2 st=2 c=400 fc=4000000 cc=32 chg=a
evk_8mm:/proc/asound/card0/pcm0p # cat info
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: HiFi wm8904-hifi-0
name:
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
evk_8mm:/proc/asound/card0/pcm0p # cd sub0/
evk_8mm:/proc/asound/card0/pcm0p/sub0 # ls
hw_params info status sw_params
evk_8mm:/proc/asound/card0/pcm0p/sub0 # ls -al
total 0
dr-xr-xr-x 2 root root 0 2019-11-16 15:48 .
dr-xr-xr-x 3 root root 0 2019-11-16 15:48 ..
-r--r--r-- 1 root root 0 2019-11-16 15:48 hw_params
-r--r--r-- 1 root root 0 2019-11-16 15:48 info
-r--r--r-- 1 root root 0 2019-11-16 15:48 status
-r--r--r-- 1 root root 0 2019-11-16 15:48 sw_params
evk_8mm:/proc/asound/card0/pcm0p/sub0 # cat sw_params
closed
evk_8mm:/proc/asound/card0/pcm0p/sub0 # cat status
closed
evk_8mm:/proc/asound/card0/pcm0p/sub0 # cat info
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: HiFi wm8904-hifi-0
name:
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
evk_8mm:/proc/asound/card0/pcm0p/sub0 # cat hw_params
closed
evk_8mm:/proc/asound/card0/pcm0p/sub0 # cd ..
evk_8mm:/proc/asound/card0/pcm0p # cd ..
evk_8mm:/proc/asound/card0 # ls
id pcm0c pcm0p
evk_8mm:/proc/asound/card0 # cd pcm0c
evk_8mm:/proc/asound/card0/pcm0c # ls
info sub0
evk_8mm:/proc/asound/card0/pcm0c # cat info
card: 0
device: 0
subdevice: 0
stream: CAPTURE
id: HiFi wm8904-hifi-0
name:
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
evk_8mm:/proc/asound/card0/pcm0c # cd sub0/
evk_8mm:/proc/asound/card0/pcm0c/sub0 # ls
hw_params info status sw_params
evk_8mm:/proc/asound/card0/pcm0c/sub0 # cat sw_params
closed
evk_8mm:/proc/asound/card0/pcm0c/sub0 # ca[ 246.209812] healthd: battery l=85 v=3 t=35.0 h=2 st=2 c=400 fc=4000000 cc=32 chg=a
t [ 246.391971] healthd: battery l=85 v=3 t=35.0 h=2 st=2 c=400 fc=4000000 cc=32 chg=a
evk_8mm:/proc/asound/card0/pcm0c/sub0 # cat hw_params
closed
evk_8mm:/proc/asound/card0/pcm0c/sub0 #
evk_8mm:/proc/asound/card0/pcm0c/sub0 # ls
hw_params info status sw_params
evk_8mm:/proc/asound/card0/pcm0c/sub0 # cat info
card: 0
device: 0
subdevice: 0
stream: CAPTURE
id: HiFi wm8904-hifi-0
name:
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
evk_8mm:/proc/asound/card0/pcm0c/sub0 # cat status
closed
evk_8mm:/proc/asound/card0/pcm0c/sub0 # cd ..
evk_8mm:/proc/asound/card0/pcm0c # cd ..
evk_8mm:/proc/asound/card0 # ls
id pcm0c pcm0p
evk_8mm:/proc/asound/card0 # cd ..
evk_8mm:/proc/asound # ls
card0 cards devices hwdep pcm timers version wm8904audio
evk_8mm:/proc/asound # cd car
card0/ cards
evk_8mm:/proc/asound # cd cards
/system/bin/sh: cd: /proc/asound/cards: Not a directory
2|evk_8mm:/proc/asound # cat c
card0/ cards
2|evk_8mm:/proc/asound # cat cards 0 [wm8904audio ]: wm8904-audio - wm8904-audiowm8904-audio
evk_8mm:/proc/asound # cd /dev/s
snd/ socket/ spidev1.0 stune/
evk_8mm:/proc/asound # cd /dev/snd/
evk_8mm:/dev/snd #
evk_8mm:/dev/snd # ls
controlC0 pcmC0D0c pcmC0D0p timer
evk_8mm:/dev/snd # l s-al
/system/bin/sh: l: not found
127|evk_8mm:/dev/snd # ls -al
total 0
drwxr-xr-x 2 root root 120 1970-01-01 00:00 .
drwxr-xr-x 18 root root 3040 1970-01-01 00:00 ..
crw-rw---- 1 system audio 116, 0 1970-01-01 00:00 controlC0
crw-rw---- 1 system audio 116, 24 1970-01-01 00:00 pcmC0D0c
crw-rw---- 1 system audio 116, 16 1970-01-01 00:00 pcmC0D0p
crw-rw---- 1 system audio 116, 33 1970-01-01 00:00 timer
evk_8mm:/dev/snd #