mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] ASoC: mediatek: mt8183-afe-pcm: Shorten source code
@ 2025-05-15  7:38 Chen-Yu Tsai
  2025-05-15  7:38 ` [PATCH v2 1/3] ASoC: mediatek: mt8183-afe-pcm: Shorten memif_data table using macros Chen-Yu Tsai
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2025-05-15  7:38 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Chen-Yu Tsai, Jaroslav Kysela, Takashi Iwai, Jiaxin Yu,
	linux-sound, linux-mediatek, linux-kernel, Darren Ye

Hi folks,

Changes since v1:
- Rebased on top of -next, dropping changes that cover the DMA address
  MSB registers

This series is meant as an example on how to use macros and range cases
to shorten the MediaTek audio frontend drivers. The drivers have large
tables describing the registers and register fields for every supported
audio DMA interface. (Some are actually skipped!) There's a lot of
duplication which can be eliminated using macros. This should serve as
a reference for the MT8196 AFE driver that I had commented on.

The three patches tackle separate tables in the driver. The remaining
one that could be tackled is the list of DAIs; but that one has more
differences between each entry, so I haven't done it yet.

Please take a look.


Thanks
ChenYu


Chen-Yu Tsai (3):
  ASoC: mediatek: mt8183-afe-pcm: Shorten memif_data table using macros
  ASoC: mediatek: mt8183-afe-pcm: Shorten irq_data table using macros
  ASoC: mediatek: mt8183-afe-pcm: shorten mt8183_is_volatile_reg()

 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 571 +++++----------------
 1 file changed, 127 insertions(+), 444 deletions(-)

-- 
2.49.0.1045.g170613ef41-goog


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-05-15 14:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-15  7:38 [PATCH v2 0/3] ASoC: mediatek: mt8183-afe-pcm: Shorten source code Chen-Yu Tsai
2025-05-15  7:38 ` [PATCH v2 1/3] ASoC: mediatek: mt8183-afe-pcm: Shorten memif_data table using macros Chen-Yu Tsai
2025-05-15  7:38 ` [PATCH v2 2/3] ASoC: mediatek: mt8183-afe-pcm: Shorten irq_data " Chen-Yu Tsai
2025-05-15  7:38 ` [PATCH v2 3/3] ASoC: mediatek: mt8183-afe-pcm: shorten mt8183_is_volatile_reg() Chen-Yu Tsai
2025-05-15 14:24 ` [PATCH v2 0/3] ASoC: mediatek: mt8183-afe-pcm: Shorten source code Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®