带有来自调制解调器的PCM接口的Alsa [英] Alsa with PCM interface from modem

查看:137
本文介绍了带有来自调制解调器的PCM接口的Alsa的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于imx28 CPU的定制板. CPU的串行端口连接到调制解调器的PCM输出.我必须为调制解调器的PCM接口开发驱动程序,以使其成为ALSA SoC的一部分.您能指出内核树​​中与我的设置相似的一些驱动程序吗?

I have a custom board based on the imx28 CPU. The Serial port of the CPU is connected to the PCM output of a modem. I have to develop a driver for the modem's PCM interface to be a part of ALSA SoC. Can you point out some drivers in the kernel tree that reasembles with my setup?

推荐答案

请参见Linux源代码中的Documentation/sound/alsa/soc目录.它说明了ASoC驱动程序如何分为三类:

See the Documentation/sound/alsa/soc directory in the Linux source. It explains how ASoC drivers are divided into three categories:

  • 编解码器驱动程序:这些定义了音频控件,接口功能,DAPM定义和编解码器I/O功能.在这种情况下,将您的调制解调器视为"CODEC".在这种情况下,您的CODEC驱动程序可能会非常小,只需定义PCM采样率(假设它是固定的,例如8000个采样/秒)和数据格式(例如16位线性)即可.
    • 查看sound/soc/codecs中的源代码
      • 如果您有i.MX28 EVK(评估套件),请特别查看sgtl5000.cmxs_spdif.c,因为i.MX28 EVK具有这两个编解码器,您可以看到驱动程序如何使它们工作.
      • 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
          • If you have an i.MX28 EVK (evaluation kit), look at sgtl5000.c and mxs_spdif.c in particular, because the i.MX28 EVK has these two CODECs, and you can see how the drivers make them work.

          有关平台和计算机驱动程序,请参见sound/soc/mxs中的以下文件.我不清楚哪个被认为是平台驱动程序",哪些是机器驱动程序",因为他们没有明确说明.

          For platform and machine drivers, see the following files in sound/soc/mxs. I'm not quite clear as to which are considered "platform drivers" and which are "machine drivers", since they don't clearly state it.

          • mxs-spdif.cmxs-spdif-dai.c,用于S/PDIF编解码器的S/PDIF接口(仅输出).
          • mxs-devb.cmxs-dai.c,用于SGTL5000 CODEC的SAIF接口.
          • 我认为
          • mxs-pcm.c可以处理DMA内容.
          • mxs-spdif.c and mxs-spdif-dai.c, which are for the S/PDIF interface to the S/PDIF CODEC (output only).
          • mxs-devb.c and mxs-dai.c, which are for the SAIF interface to the SGTL5000 CODEC.
          • mxs-pcm.c which I think handles the DMA stuff.

          但是我不知道i.MX28上是否有用于同步串行端口(SSP)外设的示例代码,

          But I don't know if there's example code for the synchronous serial port (SSP) peripherals on the i.MX28, which is what you are interested in.

          这篇关于带有来自调制解调器的PCM接口的Alsa的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆