[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXv+5FiZJqymDfvGO05SNgzSUYAdOwtFCqE0WPGwC5Dwg7OEA@mail.gmail.com>
Date: Wed, 30 Jul 2025 16:23:29 +0800
From: Chen-Yu Tsai <wenst@...omium.org>
To: "Darren.Ye" <darren.ye@...iatek.com>
Cc: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>, linux-sound@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-gpio@...r.kernel.org
Subject: Re: [PATCH v6 02/10] ASoC: mediatek: mt8196: add common header
On Tue, Jul 8, 2025 at 7:34 PM Darren.Ye <darren.ye@...iatek.com> wrote:
>
> From: Darren Ye <darren.ye@...iatek.com>
>
> Add header files for register definitions and structures.
>
> Signed-off-by: Darren Ye <darren.ye@...iatek.com>
> ---
> sound/soc/mediatek/mt8196/mt8196-afe-common.h | 213 +
> .../mediatek/mt8196/mt8196-interconnection.h | 121 +
> sound/soc/mediatek/mt8196/mt8196-reg.h | 12068 ++++++++++++++++
> 3 files changed, 12402 insertions(+)
> create mode 100644 sound/soc/mediatek/mt8196/mt8196-afe-common.h
> create mode 100644 sound/soc/mediatek/mt8196/mt8196-interconnection.h
> create mode 100644 sound/soc/mediatek/mt8196/mt8196-reg.h
>
> diff --git a/sound/soc/mediatek/mt8196/mt8196-afe-common.h b/sound/soc/mediatek/mt8196/mt8196-afe-common.h
> new file mode 100644
> index 000000000000..574003a8a2e4
> --- /dev/null
> +++ b/sound/soc/mediatek/mt8196/mt8196-afe-common.h
> @@ -0,0 +1,213 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * mt8196-afe-common.h -- Mediatek 8196 audio driver definitions
> + *
> + * Copyright (c) 2024 MediaTek Inc.
> + * Author: Darren Ye <darren.ye@...iatek.com>
> + */
> +
> +#ifndef _MT_8196_AFE_COMMON_H_
> +#define _MT_8196_AFE_COMMON_H_
Add an empty line here for separation.
> +#include <sound/soc.h>
> +#include <sound/pcm.h>
> +#include <linux/clk.h>
> +#include <linux/list.h>
> +#include <linux/regmap.h>
> +#include "mt8196-reg.h"
> +#include "mtk-base-afe.h"
Please add empty lines between each group of headers. Headers are grouped
by path prefix.
Moreover, the contents of these header files are not required in this
header file. Please push these include statements to the files that
actually need them.
For the pointer to struct types, you can just forward declare the struct
types instead of including the whole header file:
struct clk;
struct mtk_base_afe;
[...]
> +struct mt8196_afe_private {
> + struct clk **clk;
> + struct clk_lookup **lookup;
This doesn't seem to be used.
> + struct regmap *vlp_ck;
IIRC this will get removed since the tuner values will be moved to the
clk driver.
> + int irq_cnt[MT8196_MEMIF_NUM];
> + int dram_resource_counter;
This seems unused. Please remove.
> +
> + /* xrun assert */
> + int xrun_assert[MT8196_MEMIF_NUM];
This doesn't seem to do anything. It is initialized to zero and then
never used.
> +
> + /* dai */
> + void *dai_priv[MT8196_DAI_NUM];
> +
> + /* mck */
> + int mck_rate[MT8196_MCK_NUM];
> +
> + /* channel merge */
> + unsigned int cm_rate[CM_NUM];
> + unsigned int cm_channels;
> +};
> +
> +int mt8196_dai_adda_register(struct mtk_base_afe *afe);
> +int mt8196_dai_i2s_register(struct mtk_base_afe *afe);
> +int mt8196_dai_tdm_register(struct mtk_base_afe *afe);
> +int mt8196_dai_set_priv(struct mtk_base_afe *afe, int id,
> + int priv_size, const void *priv_data);
Please add an empty line here.
> +#endif
[...]
ChenYu
Powered by blists - more mailing lists