How to read pcm data within a linux driver

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to read pcm data within a linux driver

1,654件の閲覧回数
andrwebb
Contributor II

Im trying to write my own Asterisk DAHDI driver for an si3050 on an imx6ull.

The part I currently dont know how to do (I've just gotten into driver development) is to read and write audio data to the SAI(synchronous audio interface).

I found the fsl-sai driver: https://elixir.bootlin.com/linux/v4.14/source/sound/soc/fsl/fsl_sai.c but I'm not sure how much of it I can use since I'm not making an alsa driver.

My ideal solution would be to set up some kind of periodic sdma transfer that could call an interrupt handler that will read/write the audio data and allow me to call my dahdi library functions within.

That fsl-sai driver is also set up to use dmas = <&sdma 39 24 0>, <&sdma 40 24 0>; so would there be some way to hook into those?

I notice that https://elixir.bootlin.com/linux/v4.14.78/source/include/linux/platform_data/dma-imx.h has IMX_DMATYPE_SAI, so I'm wondering if its possible to use that somehow?

ラベル(2)
0 件の賞賛
返信
1 返信

1,631件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Andriy

 

one can look at MX6ULL FreeRTOS  examples in ../demo_apps/sai_sdma_freertos 

https://www.nxp.com/design/software/embedded-software/i-mx-software:IMX-SW

 

Best regards
igor

0 件の賞賛
返信