sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 616 +++++---------------- 1 file changed, 136 insertions(+), 480 deletions(-)
Hi folks, 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 | 616 +++++---------------- 1 file changed, 136 insertions(+), 480 deletions(-) -- 2.49.0.850.g28803427d3-goog
On Fri, 25 Apr 2025 16:25:47 +0800, Chen-Yu Tsai wrote:
> 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.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/3] ASoC: mediatek: mt8183-afe-pcm: Shorten memif_data table using macros
commit: 91c2685430f217ae8f2866e4372948eaf123b5c4
[2/3] ASoC: mediatek: mt8183-afe-pcm: Shorten irq_data table using macros
commit: 0be889823f93429dab396cb7ac061d02046bd962
[3/3] ASoC: mediatek: mt8183-afe-pcm: shorten mt8183_is_volatile_reg()
commit: 29552dcc044a233be84ab9b64539fdc7d8f4314e
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
Il 25/04/25 10:25, Chen-Yu Tsai ha scritto: > Hi folks, > > 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. > Sorry for the very long wait here; the entire series is Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Cheers, Angelo
On Wed, May 14, 2025 at 03:49:48PM +0200, AngeloGioacchino Del Regno wrote: > Il 25/04/25 10:25, Chen-Yu Tsai ha scritto: > > 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. > Sorry for the very long wait here; the entire series is > Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Unfortunately this doesn't apply against current code (I guess due to development in the intervening time), could you please check and resend?
On Wed, May 14, 2025 at 10:36 PM Mark Brown <broonie@kernel.org> wrote:
>
> On Wed, May 14, 2025 at 03:49:48PM +0200, AngeloGioacchino Del Regno wrote:
> > Il 25/04/25 10:25, Chen-Yu Tsai ha scritto:
>
> > > 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.
>
> > Sorry for the very long wait here; the entire series is
>
> > Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>
> Unfortunately this doesn't apply against current code (I guess due to
> development in the intervening time), could you please check and resend?
This series is based on the other series that I sent for reworking
reserved memory, in particular the patch
ASoC: mediatek: mt8183-afe-pcm: Support >32 bit DMA addresses
touches the same parts.
Since this series is ready, I'll rebase it and resend.
ChenYu
On Fri, Apr 25, 2025 at 04:25:47PM +0800, Chen-Yu Tsai wrote: > 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. AngeloGioacchino?
© 2016 - 2025 Red Hat, Inc.