Audio Codec:
Audio Codec-Brief Book (jianshu.com)
----------------------------
Audio codec (codec):
Play: Digital signal------->Analog sound signal---------> Loudspeaker
Recording: Microphone------>analog signal------->digital signal
Codec function: (excerpt from short book)
1. Perform D/A conversion on PCM and other signals, and convert digital audio signals into analog signals
2. Perform A/D conversion on the analog signal of Mic, Linein or other input sources, and convert the analog sound signal into a digital signal that can be processed by the CPU
3. Control the audio channel, such as playing music, listening to FM radio, or answering the phone, the audio signal circulation route in the codec is different
4. Make corresponding processing to the audio signal, such as volume control, power amplification, EQ control, etc.
Linux node:
/dev/snd/* Sound card node, created and managed by ALSA core
/dev/snd/controlC0 control node, app controls volume, etc.
/dev/snd/pcmC0D0p play, play device node
/dev/snd/pcmC0D0c capture, recording device node
prioc and sysfs interface implementation:
/proc/asound 和 /sys/class/sound/
----------------------------
January 6, 2021, I haven't figured out what's going on yet, understand a little and remember a little bit of your own thoughts, it is not guaranteed to understand correctly ~ ~
在看的平台是,msm8909.
文件:
kernel/sound/soc/msm/msm8x16.c
kernel/sound/soc/msm/qdsp6v2
外部codec
分别对应的应该:
msm8x16.c ---> msm8x16_asoc_machine_probe --> snd_soc_card ---> machine层
qdsp6v2 ---> snd_soc_platform ---> platform层
外部codec是普通的c驱动,i2c驱动 ---> 对应的codec层
machine驱动结构:
snd_soc_card
|
|-----snd_soc_dai_link
|
|---------snd_soc_ops
|
|--------- .startup =
|
|--------- .shutdown =