+static const struct snd_pcm_hardware acp_pdm_hardware_capture = {
- .info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_BATCH | SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME,
Can you actually resume from the same position? this seems odd when combined with INFO_BATCH which means the position is only precise at period boundaries.
We used similar flag in Raven APU acp dma driver well.
Takashi clarified during the early SOF days that if you cannot resume from the same position, then the ALSA core will attempt a prepare and restart. So if you don't support a restart from the same point, it's fine to remove this flag.
As per my understanding INFO_BATCH is more about providing period granularity when hw_ptr is queried. But PDM driver DMA pointer callback returns precise hw_ptr when queried. Correct me, if understanding is wrong.
No, INFO_BATCH means the hw_ptr is only updated with a large granularity, possibly as large as a period. if you can support precise position you should not use this flag.