Re: [PATCH 3/3] ASoC: fsl_sai: add i.MX8M support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019-07-18 21:22, Daniel Baluta wrote:
On Thu, Jul 18, 2019 at 10:12 PM Cezary Rojewski
<cezary.rojewski@xxxxxxxxx> wrote:

On 2019-07-17 12:56, Lucas Stach wrote:
   static const struct fsl_sai_soc_data fsl_sai_vf610_data = {
       .use_imx_pcm = false,
+     .has_version_registers = false,
       .fifo_depth = 32,
   };

   static const struct fsl_sai_soc_data fsl_sai_imx6sx_data = {
       .use_imx_pcm = true,
+     .has_version_registers = false,
       .fifo_depth = 32,
   };

+static const struct fsl_sai_soc_data fsl_sai_imx8m_data = {
+     .use_imx_pcm = true,
+     .has_version_registers = true,
+     .fifo_depth = 128,
+};
+
   static const struct of_device_id fsl_sai_ids[] = {
       { .compatible = "fsl,vf610-sai", .data = &fsl_sai_vf610_data },
       { .compatible = "fsl,imx6sx-sai", .data = &fsl_sai_imx6sx_data },
       { .compatible = "fsl,imx6ul-sai", .data = &fsl_sai_imx6sx_data },
+     { .compatible = "fsl,imx8mq-sai", .data = &fsl_sai_imx8m_data },
       { /* sentinel */ }
   };


Hi Czarek,

These datas are populating quite rapidly. If you're planning for adding
more (and/ or appending additional fields), declaring helper macro could
prove useful.

There would be definitely more fields inside *_data structures. Anyhow,
not sure what do you mean by declaring a helper macro.

Can you provide an example and how would that be helpful?

thanks,
Daniel.


Hello Daniel,

My suggestion was rather straight-forward - examples of such can be found in soc-dapm.h header file. Instead of stating everything explicitly, there are e.g.: SND_SOC_DAPM_SPK or SND_SOC_DAPM_PGA declared to help me out.

Nothing fancy, just space savers if your structs populate like rabbits.

Czarek
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux