Article 6JXSZ Reading I2S0 DMA data directly bypassing ALSA

Reading I2S0 DMA data directly bypassing ALSA

by
dhanraj_kmr
from LinuxQuestions.org on (#6JXSZ)
I am exploring options to bypass the ALSA and directly read the I2S0 data in kernel space. I2S0 is connected to an external ADC. I want to read the I2S bus every 64 bytes and I don't want to miss any samples between reads. Something similar to I2C read, SPI read.

I see ALSA using this function to trigger DMA and callback. I'm not sure how to duplicate the necessary details for this function call if I want to hack these ALSA calls.

Code:sound/core/pcm_dmaengine.c

desc = dmaengine_prep_dma_cyclic(chan,
substream->runtime->dma_addr,
snd_pcm_lib_buffer_bytes(substream),
snd_pcm_lib_period_bytes(substream), direction, flags);

desc->callback = dmaengine_pcm_dma_complete;
desc->callback_param = substream;
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments