[PATCH 10/19] dma: imx-sdma: Add multi fifo support
Sascha Hauer
s.hauer at pengutronix.de
Thu Mar 17 11:19:50 CET 2022
On Thu, Mar 17, 2022 at 05:08:55PM +0800, Shengjiu Wang wrote:
> On Thu, Mar 17, 2022 at 4:28 PM Sascha Hauer <[1]s.hauer at pengutronix.de>
> wrote:
>
> +struct sdma_peripheral_config {
> + int n_fifos_src;
> + int n_fifos_dst;
> + bool sw_done;
> +};
> +
> #endif
>
> Hi Sascha
> This is our internal definition for this sdma_peripheral_config.
> Could you please adopt this?
This structure is completely internal to the kernel and can be adjusted
when we need it. I don't see a reason to add unused fields to it just to
be compatible with a downstream kernel.
Sascha
> /**
> * struct sdma_audio_config - special sdma config for audio case
> * @src_fifo_num: source fifo number for mcu_2_sai/sai_2_mcu script
> * For example, if there are 4 fifos, sdma will fetch
> * fifos one by one and roll back to the first fifo after
> * the 4th fifo fetch.
> * @dst_fifo_num: similar as src_fifo_num, but dest fifo instead.
> * @src_fifo_off: source fifo offset, 0 means all fifos are continuous, 1
> * means 1 word offset between fifos. All offset between
> * fifos should be same.
> * @dst_fifo_off: dst fifo offset, similar as @src_fifo_off.
> * @words_per_fifo: numbers of words per fifo fetch/fill, 0 means
> * one channel per fifo, 1 means 2 channels per fifo..
> * If 'src_fifo_num = 4' and 'chans_per_fifo = 1', it
> * means the first two words(channels) fetch from fifo1
> * and then jump to fifo2 for next two words, and so on
> * after the last fifo4 fetched, roll back to fifo1.
> * @sw_done_sel: software done selector, PDM need enable software done
> feature
> * in mcu_2_sai/sai_2_mcu script.
> * Bit31: sw_done eanbled or not
> * Bit16~Bit0: selector
> * For example: 0x80000000 means sw_done enabled for done0
> * sector which is for PDM on i.mx8mm.
> */
> struct sdma_audio_config {
> u8 src_fifo_num;
> u8 dst_fifo_num;
> u8 src_fifo_off;
> u8 dst_fifo_off;
> u8 words_per_fifo;
> u32 sw_done_sel;
> };
> best regards
> wang shengjiu
>
>
> References
>
> Visible links
> 1. mailto:s.hauer at pengutronix.de
> 2. mailto:s.hauer at pengutronix.de
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the Alsa-devel
mailing list