我有一个基于 imx28 CPU 的定制板。 CPU 的串行端口连接到调制解调器的 PCM 输出。我必须为调制解调器的 PCM 接口开发一个驱动程序,使其成为 ALSA SoC 的一部分。您能指出内核树中与我的设置重新组合的一些驱动程序吗?
See the Documentation/sound/alsa/soc
Linux 源代码中的目录。它解释了 ASoC 驱动程序如何分为三类:
- Codec driver: These define the audio controls, interface capabilities, DAPM definition and codec I/O functions. It is your modem which is considered the "CODEC" in this case. In that situation, your CODEC driver is probably going to be very minimal, just defining the PCM sample rate (assuming it's fixed, e.g. 8000 samples/s) and data format (e.g. 16 bit linear).
- Look at source code in
sound/soc/codecs
- 如果您有 i.MX28 EVK(评估套件),请查看
sgtl5000.c
and mxs_spdif.c
特别是,因为 i.MX28 EVK 有这两个编解码器,您可以看到驱动程序如何使它们工作。
- 平台驱动程序:平台的音频 DMA 引擎和音频接口驱动程序(具体来说,适合您的情况的 PCM),该平台是 Freescale MXS 芯片系列。
- 机器驱动程序:任何机器特定的控件和音频事件。
对于平台和机器驱动程序,请参阅以下文件sound/soc/mxs
。我不太清楚哪些被认为是“平台驱动程序”,哪些是“机器驱动程序”,因为他们没有明确说明。
-
mxs-spdif.c
and mxs-spdif-dai.c
,用于 S/PDIF 到 S/PDIF CODEC 的接口(仅输出)。
-
mxs-devb.c
and mxs-dai.c
,它们用于 SGTL5000 编解码器的 SAIF 接口。
-
mxs-pcm.c
我认为它可以处理 DMA 的事情。
但我不知道 i.MX28 上是否有同步串行端口 (SSP) 外设的示例代码,这是您感兴趣的。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)