<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 29, 2023 at 7:39 PM Mark Brown <<a href="mailto:broonie@kernel.org">broonie@kernel.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Jun 29, 2023 at 09:37:51AM +0800, Shengjiu Wang wrote:<br>
> Implement the ASRC memory to memory function using<br>
> the v4l2 framework, user can use this function with<br>
> v4l2 ioctl interface.<br>
> <br>
> User send the output and capture buffer to driver and<br>
> driver store the converted data to the capture buffer.<br>
> <br>
> This feature can be shared by ASRC and EASRC drivers<br>
> <br>
> Signed-off-by: Shengjiu Wang <<a href="mailto:shengjiu.wang@nxp.com" target="_blank">shengjiu.wang@nxp.com</a>><br>
> ---<br>
> sound/soc/fsl/Kconfig | 13 +<br>
> sound/soc/fsl/Makefile | 2 +<br>
> sound/soc/fsl/fsl_asrc_m2m.c | 878 +++++++++++++++++++++++++++++++++++<br>
> sound/soc/fsl/fsl_asrc_m2m.h | 48 ++<br>
<br>
This feels like the bit where we interface v4l to ASoC should be a<br>
separate library, there shouldn't be anything device specific about<br>
getting an audio stream into a block of memory. I'm thinking something<br>
like the way we handle dmaengine here.<br>
<br>
I've not dug into the code yet though.<br></blockquote><div><br></div><div><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">Users may want to get the ASRC output in the user space, then <br>do mixing with other streams before sending to ALSA. <br><br>As there is no such API in ASoC, the best interface I found is<br>the V4L2, but I need to do a little modification of the V4L2 API,</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">extend it for audio usage.<br><br>Could you please suggest more about the "separate library"?<br>Should I place this "sound/soc/fsl/fsl_asrc_m2m.c" in another folder?<br><br>best regards<br>wang shengjiu<br></p></div></div></div>