* Re: [PATCH 2/7] ASoC: mediatek: mt79xx: support audio clock control
[not found] ` <20230612105250.15441-3-maso.huang@mediatek.com>
@ 2023-06-13 7:27 ` Claudiu.Beznea
0 siblings, 0 replies; 10+ messages in thread
From: Claudiu.Beznea @ 2023-06-13 7:27 UTC (permalink / raw)
To: maso.huang, angelogioacchino.delregno, perex, tiwai, trevor.wu,
jiaxin.yu, renzhijie2, arnd, allen-kh.cheng, alsa-devel,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek
On 12.06.2023 13:52, Maso Hunag wrote:
> [You don't often get email from maso.huang@mediatek.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> From: Maso Huang <maso.huang@mediatek.com>
>
> Add audio clock wrapper and audio tuner control.
>
> Signed-off-by: Maso Huang <maso.huang@mediatek.com>
> ---
> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c | 123 +++++++++++++++++++++
> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.h | 18 +++
> 2 files changed, 141 insertions(+)
> create mode 100644 sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c
> create mode 100644 sound/soc/mediatek/mt79xx/mt79xx-afe-clk.h
>
> diff --git a/sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c b/sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c
> new file mode 100644
> index 000000000000..f00f0d7de861
> --- /dev/null
> +++ b/sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c
> @@ -0,0 +1,123 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * mt79xx-afe-clk.c -- MediaTek 79xx afe clock ctrl
> + *
> + * Copyright (c) 2021 MediaTek Inc.
> + * Author: Vic Wu <vic.wu@mediatek.com>
> + * Maso Huang <maso.huang@mediatek.com>
> + */
> +
> +#include <linux/clk.h>
> +
> +#include "mt79xx-afe-common.h"
> +#include "mt79xx-afe-clk.h"
> +#include "mt79xx-reg.h"
> +
> +enum {
> + CK_INFRA_AUD_BUS_CK = 0,
> + CK_INFRA_AUD_26M_CK,
> + CK_INFRA_AUD_L_CK,
> + CK_INFRA_AUD_AUD_CK,
> + CK_INFRA_AUD_EG2_CK,
> + CLK_NUM
> +};
> +
> +static const char *aud_clks[CLK_NUM] = {
> + [CK_INFRA_AUD_BUS_CK] = "aud_bus_ck",
> + [CK_INFRA_AUD_26M_CK] = "aud_26m_ck",
> + [CK_INFRA_AUD_L_CK] = "aud_l_ck",
> + [CK_INFRA_AUD_AUD_CK] = "aud_aud_ck",
> + [CK_INFRA_AUD_EG2_CK] = "aud_eg2_ck",
> +};
> +
> +int mt79xx_init_clock(struct mtk_base_afe *afe)
> +{
> + struct mt79xx_afe_private *afe_priv = afe->platform_priv;
> + int i;
> +
> + afe_priv->clk = devm_kcalloc(afe->dev, CLK_NUM, sizeof(*afe_priv->clk),
> + GFP_KERNEL);
> + if (!afe_priv->clk)
> + return -ENOMEM;
> +
> + for (i = 0; i < CLK_NUM; i++) {
> + afe_priv->clk[i] = devm_clk_get(afe->dev, aud_clks[i]);
> + if (IS_ERR(afe_priv->clk[i])) {
> + dev_err(afe->dev, "%s(), devm_clk_get %s fail,
> + ret %ld\n", __func__, aud_clks[i],
> + PTR_ERR(afe_priv->clk[i]));
> + return PTR_ERR(afe_priv->clk[i]);
> + }
> + }
You can use devm_clk_bulk_get()
> +
> + return 0;
> +}
> +
> +int mt79xx_afe_enable_clock(struct mtk_base_afe *afe)
> +{
> + struct mt79xx_afe_private *afe_priv = afe->platform_priv;
> + int ret;
> +
> + ret = clk_prepare_enable(afe_priv->clk[CK_INFRA_AUD_BUS_CK]);
> + if (ret) {
> + dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n",
> + __func__, aud_clks[CK_INFRA_AUD_BUS_CK], ret);
> + goto CK_INFRA_AUD_BUS_CK_ERR;
> + }
> +
> + ret = clk_prepare_enable(afe_priv->clk[CK_INFRA_AUD_26M_CK]);
> + if (ret) {
> + dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n",
> + __func__, aud_clks[CK_INFRA_AUD_26M_CK], ret);
> + goto CK_INFRA_AUD_26M_ERR;
> + }
> +
> + ret = clk_prepare_enable(afe_priv->clk[CK_INFRA_AUD_L_CK]);
> + if (ret) {
> + dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n",
> + __func__, aud_clks[CK_INFRA_AUD_L_CK], ret);
> + goto CK_INFRA_AUD_L_CK_ERR;
> + }
> +
> + ret = clk_prepare_enable(afe_priv->clk[CK_INFRA_AUD_AUD_CK]);
> + if (ret) {
> + dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
> + __func__, aud_clks[CK_INFRA_AUD_AUD_CK], ret);
> + goto CK_INFRA_AUD_AUD_CK_ERR;
> + }
> +
> + ret = clk_prepare_enable(afe_priv->clk[CK_INFRA_AUD_EG2_CK]);
> + if (ret) {
> + dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
> + __func__, aud_clks[CK_INFRA_AUD_EG2_CK], ret);
> + goto CK_INFRA_AUD_EG2_CK_ERR;
> + }
And clk_bulk_prepare_enable() instead all these.
> +
> + return 0;
> +
> +CK_INFRA_AUD_EG2_CK_ERR:
> + clk_disable_unprepare(afe_priv->clk[CK_INFRA_AUD_AUD_CK]);
> +CK_INFRA_AUD_AUD_CK_ERR:
> + clk_disable_unprepare(afe_priv->clk[CK_INFRA_AUD_L_CK]);
> +CK_INFRA_AUD_L_CK_ERR:
> + clk_disable_unprepare(afe_priv->clk[CK_INFRA_AUD_26M_CK]);
> +CK_INFRA_AUD_26M_ERR:
> + clk_disable_unprepare(afe_priv->clk[CK_INFRA_AUD_BUS_CK]);
> +CK_INFRA_AUD_BUS_CK_ERR:
> + return ret;
> +}
> +EXPORT_SYMBOL_GPL(mt79xx_afe_enable_clock);
> +
> +int mt79xx_afe_disable_clock(struct mtk_base_afe *afe)
> +{
> + struct mt79xx_afe_private *afe_priv = afe->platform_priv;
> +
> + clk_disable_unprepare(afe_priv->clk[CK_INFRA_AUD_EG2_CK]);
> + clk_disable_unprepare(afe_priv->clk[CK_INFRA_AUD_AUD_CK]);
> + clk_disable_unprepare(afe_priv->clk[CK_INFRA_AUD_L_CK]);
> + clk_disable_unprepare(afe_priv->clk[CK_INFRA_AUD_26M_CK]);
> + clk_disable_unprepare(afe_priv->clk[CK_INFRA_AUD_BUS_CK]);
> +
And also clk_bulk_disable_unprepare() here.
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(mt79xx_afe_disable_clock);
> diff --git a/sound/soc/mediatek/mt79xx/mt79xx-afe-clk.h b/sound/soc/mediatek/mt79xx/mt79xx-afe-clk.h
> new file mode 100644
> index 000000000000..bf9c3edb6922
> --- /dev/null
> +++ b/sound/soc/mediatek/mt79xx/mt79xx-afe-clk.h
> @@ -0,0 +1,18 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * mt79xx-afe-clk.h -- MediaTek 79xx afe clock ctrl definition
> + *
> + * Copyright (c) 2021 MediaTek Inc.
> + * Author: Vic Wu <vic.wu@mediatek.com>
> + * Maso Huang <maso.huang@mediatek.com>
> + */
> +
> +#ifndef _MT79XX_AFE_CLK_H_
> +#define _MT79XX_AFE_CLK_H_
> +
> +struct mtk_base_afe;
> +
> +int mt79xx_init_clock(struct mtk_base_afe *afe);
> +int mt79xx_afe_enable_clock(struct mtk_base_afe *afe);
> +int mt79xx_afe_disable_clock(struct mtk_base_afe *afe);
> +#endif
> --
> 2.18.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 6/7] ASoC: dt-bindings: mediatek,mt79xx-wm8960: add mt79xx-wm8960 document
[not found] ` <20230612105250.15441-7-maso.huang@mediatek.com>
@ 2023-06-13 8:49 ` Krzysztof Kozlowski
[not found] ` <c87eadd9fc8d0ef9dc4582493e540f0b311e06eb.camel@mediatek.com>
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-13 8:49 UTC (permalink / raw)
To: Maso Hunag, AngeloGioacchino Del Regno, Jaroslav Kysela,
Takashi Iwai, Trevor Wu, Jiaxin Yu, Ren Zhijie, Arnd Bergmann,
Allen-KH Cheng, alsa-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
On 12/06/2023 12:52, Maso Hunag wrote:
> From: Maso Huang <maso.huang@mediatek.com>
>
> Add document for mt79xx board with wm8960.
Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.
>
> Signed-off-by: Maso Huang <maso.huang@mediatek.com>
> ---
> .../sound/mediatek,mt79xx-wm8960.yaml | 53 +++++++++++++++++++
> 1 file changed, 53 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt79xx-wm8960.yaml
>
> diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt79xx-wm8960.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt79xx-wm8960.yaml
> new file mode 100644
> index 000000000000..26b38bb629da
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/mediatek,mt79xx-wm8960.yaml
> @@ -0,0 +1,53 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/mediatek,mt79xx-wm8960.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek MT79xx ASOC sound card with WM8960 codec
What is a MT79xx ASOC? Is it some specific SoC name? What does "A"
stands for in SoC? XX also looks odd, I thought Mediatek uses only numbers.
> +
> +maintainers:
> + - Maso Huang <maso.huang@mediatek.com>
> +
> +properties:
> + compatible:
> + const: mediatek,mt79xx-wm8960-machine
> +
> + mediatek,platform:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: The phandle of MT79xx ASoC platform.
What is MT79xx ASoC platform?
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 7/7] ASoC: dt-bindings: mediatek,mt79xx-afe: add audio afe document
[not found] ` <20230612105250.15441-8-maso.huang@mediatek.com>
@ 2023-06-13 8:51 ` Krzysztof Kozlowski
[not found] ` <14913cbb87981eed6f8b72f9e659ed3e25958320.camel@mediatek.com>
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-13 8:51 UTC (permalink / raw)
To: Maso Hunag, AngeloGioacchino Del Regno, Jaroslav Kysela,
Takashi Iwai, Trevor Wu, Jiaxin Yu, Ren Zhijie, Arnd Bergmann,
Allen-KH Cheng, alsa-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
On 12/06/2023 12:52, Maso Hunag wrote:
> From: Maso Huang <maso.huang@mediatek.com>
>
> Add mt79xx audio afe document.
Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.
>
> Signed-off-by: Maso Huang <maso.huang@mediatek.com>
> ---
> .../bindings/sound/mediatek,mt79xx-afe.yaml | 102 ++++++++++++++++++
> 1 file changed, 102 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt79xx-afe.yaml
>
> diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt79xx-afe.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt79xx-afe.yaml
> new file mode 100644
> index 000000000000..11ef1cfdf49b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/mediatek,mt79xx-afe.yaml
> @@ -0,0 +1,102 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/mediatek,mt79xx-afe.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek AFE PCM controller for MT79xx
79XX sounds weird. Are you sure you are not using wildcards (which are
not allowed)?
> +
> +maintainers:
> + - Maso Huang <maso.huang@mediatek.com>
> +
> +properties:
> + compatible:
> + oneOf:
> + - const: mediatek,mt79xx-afe
> + - items:
> + - enum:
> + - mediatek,mt7981-afe
> + - mediatek,mt7986-afe
> + - mediatek,mt7988-afe
> + - const: mediatek,mt79xx-afe
I already saw AFE, why it cannot be part of existing bindings?
This list is odd. 79xx, 7981? So it is wildcard?
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + minItems: 5
> + items:
> + - description: audio bus clock
> + - description: audio 26M clock
> + - description: audio intbus clock
> + - description: audio hopping clock
> + - description: audio pll clock
> + - description: mux for pcm_mck
> + - description: audio i2s/pcm mck
> +
> + clock-names:
> + minItems: 5
> + items:
> + - const: aud_bus_ck
> + - const: aud_26m_ck
> + - const: aud_l_ck
> + - const: aud_aud_ck
> + - const: aud_eg2_ck
> + - const: aud_sel
> + - const: aud_i2s_m
Why this is variable?
> +
> + assigned-clocks:
> + minItems: 3
> + maxItems: 4
Drop assigned-clocks
> +
> + assigned-clock-parents:
> + minItems: 3
> + maxItems: 4
Drop
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 7/7] ASoC: dt-bindings: mediatek,mt79xx-afe: add audio afe document
[not found] ` <14913cbb87981eed6f8b72f9e659ed3e25958320.camel@mediatek.com>
@ 2023-06-14 6:34 ` Krzysztof Kozlowski
[not found] ` <a338bf978dfa0af84a6728ab66dc51e45a20c7c4.camel@mediatek.com>
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-14 6:34 UTC (permalink / raw)
To: Maso Huang (黃加竹),
linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
linux-mediatek@lists.infradead.org,
Trevor Wu (吳文良), devicetree@vger.kernel.org,
Allen-KH Cheng (程冠勳), renzhijie2@huawei.com,
tiwai@suse.com, linux-arm-kernel@lists.infradead.org,
arnd@arndb.de, perex@perex.cz,
angelogioacchino.delregno@collabora.com,
Jiaxin Yu (俞家鑫)
On 14/06/2023 05:17, Maso Huang (黃加竹) wrote:
> On Tue, 2023-06-13 at 10:51 +0200, Krzysztof Kozlowski wrote:
>>
>> External email : Please do not click links or open attachments until
>> you have verified the sender or the content.
>>
>> On 12/06/2023 12:52, Maso Hunag wrote:
>>> From: Maso Huang <maso.huang@mediatek.com>
>>>
>>> Add mt79xx audio afe document.
>>
>> Please use scripts/get_maintainers.pl to get a list of necessary
>> people
>> and lists to CC. It might happen, that command when run on an older
>> kernel, gives you outdated entries. Therefore please be sure you
>> base
>> your patches on recent Linux kernel.
>>
>
> Hi Krzysztif,
>
> Thanks for your review. And sorry for missing some necessary
> maintainers.
> What's your suggestion, resend these patches again with them, or add
> them back in v2 patch?
You need to fix the patch anyway, so use get_maintainers.pl in v2. I
don't understand why you Cc here many unrelated people but not the
actual maintainers which get_maintainers.pl asks you to Cc!
>
>>>
>>> Signed-off-by: Maso Huang <maso.huang@mediatek.com>
>>> ---
>>> .../bindings/sound/mediatek,mt79xx-afe.yaml | 102
>> ++++++++++++++++++
>>> 1 file changed, 102 insertions(+)
>>> create mode 100644
>> Documentation/devicetree/bindings/sound/mediatek,mt79xx-afe.yaml
>>>
>>> diff --git
>> a/Documentation/devicetree/bindings/sound/mediatek,mt79xx-afe.yaml
>> b/Documentation/devicetree/bindings/sound/mediatek,mt79xx-afe.yaml
>>> new file mode 100644
>>> index 000000000000..11ef1cfdf49b
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/sound/mediatek,mt79xx-
>> afe.yaml
>>> @@ -0,0 +1,102 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/sound/mediatek,mt79xx-afe.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: MediaTek AFE PCM controller for MT79xx
>>
>> 79XX sounds weird. Are you sure you are not using wildcards (which
>> are
>> not allowed)?
>>
>
> We would like to use mt79xx for mt7986/mt7981/mt7988 series.
> Or is it better to just use mt7986 for this series?
You cannot use wildcard. Get some internal review of your patches prior
to submission to mailing list.
https://elixir.bootlin.com/linux/v6.1-rc1/source/Documentation/devicetree/bindings/writing-bindings.rst
>
>>> +
>>> +maintainers:
>>> + - Maso Huang <maso.huang@mediatek.com>
>>> +
>>> +properties:
>>> + compatible:
>>> + oneOf:
>>> + - const: mediatek,mt79xx-afe
>>> + - items:
>>> + - enum:
>>> + - mediatek,mt7981-afe
>>> + - mediatek,mt7986-afe
>>> + - mediatek,mt7988-afe
>>> + - const: mediatek,mt79xx-afe
>>
>> I already saw AFE, why it cannot be part of existing bindings?
Can you answer this?
>>
>> This list is odd. 79xx, 7981? So it is wildcard?
>>
>
> Yes, it is wildcard for mt7986/mt7981/mt7988 series.
> Is it better to just use mt7986 for this series?
No wildcards.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/7] ASoC: mediatek: mt79xx: add common header
[not found] ` <20230612105250.15441-2-maso.huang@mediatek.com>
@ 2023-06-14 7:44 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 10+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-06-14 7:44 UTC (permalink / raw)
To: Maso Hunag, Jaroslav Kysela, Takashi Iwai, Trevor Wu, Jiaxin Yu,
Ren Zhijie, Arnd Bergmann, Allen-KH Cheng, alsa-devel, devicetree,
linux-kernel, linux-arm-kernel, linux-mediatek
Il 12/06/23 12:52, Maso Hunag ha scritto:
> From: Maso Huang <maso.huang@mediatek.com>
>
> Add header files for register definition and structure.
>
> Signed-off-by: Maso Huang <maso.huang@mediatek.com>
> ---
> sound/soc/mediatek/mt79xx/mt79xx-afe-common.h | 49 +++++
> sound/soc/mediatek/mt79xx/mt79xx-reg.h | 206 ++++++++++++++++++
Please, s/mt79xx/mt7981/g. Wildcards are not permitted.
> 2 files changed, 255 insertions(+)
> create mode 100644 sound/soc/mediatek/mt79xx/mt79xx-afe-common.h
> create mode 100644 sound/soc/mediatek/mt79xx/mt79xx-reg.h
>
> diff --git a/sound/soc/mediatek/mt79xx/mt79xx-afe-common.h b/sound/soc/mediatek/mt79xx/mt79xx-afe-common.h
> new file mode 100644
> index 000000000000..13c9e51d7b38
> --- /dev/null
> +++ b/sound/soc/mediatek/mt79xx/mt79xx-afe-common.h
> @@ -0,0 +1,49 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * mt79xx-afe-common.h -- MediaTek 79xx audio driver definitions
> + *
> + * Copyright (c) 2021 MediaTek Inc.
> + * Author: Vic Wu <vic.wu@mediatek.com>
> + * Maso Huang <maso.huang@mediatek.com>
> + */
> +
> +#ifndef _MT_79XX_AFE_COMMON_H_
> +#define _MT_79XX_AFE_COMMON_H_
> +
> +#include <sound/soc.h>
> +#include <linux/list.h>
> +#include <linux/regmap.h>
> +#include "../common/mtk-base-afe.h"
> +
> +enum {
> + MT79XX_MEMIF_DL1,
> + MT79XX_MEMIF_VUL12,
> + MT79XX_MEMIF_NUM,
> + MT79XX_DAI_ETDM = MT79XX_MEMIF_NUM,
> + MT79XX_DAI_NUM,
> +};
Same for the enumeration entries, and the definitions and the function names.
Please change everything to `mt7981` (strategy is to use the name of the oldest
SoC: if the oldest is not 7981, change accordingly).
> +
> +enum {
> + MT79XX_IRQ_0,
> + MT79XX_IRQ_1,
> + MT79XX_IRQ_2,
> + MT79XX_IRQ_NUM,
> +};
> +
> +struct clk;
> +
> +struct mt79xx_afe_private {
> + struct clk **clk;
> +
> + int pm_runtime_bypass_reg_ctl;
> +
> + /* dai */
> + void *dai_priv[MT79XX_DAI_NUM];
> +};
> +
> +unsigned int mt79xx_afe_rate_transform(struct device *dev,
> + unsigned int rate);
> +
> +/* dai register */
> +int mt79xx_dai_etdm_register(struct mtk_base_afe *afe);
> +#endif
> diff --git a/sound/soc/mediatek/mt79xx/mt79xx-reg.h b/sound/soc/mediatek/mt79xx/mt79xx-reg.h
> new file mode 100644
> index 000000000000..28c0aeba9bdf
> --- /dev/null
> +++ b/sound/soc/mediatek/mt79xx/mt79xx-reg.h
> @@ -0,0 +1,206 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * mt79xx-reg.h -- MediaTek 79xx audio driver reg definition
> + *
> + * Copyright (c) 2021 MediaTek Inc.
> + * Author: Vic Wu <vic.wu@mediatek.com>
> + * Maso Huang <maso.huang@mediatek.com>
> + */
> +
> +#ifndef _MT79XX_REG_H_
> +#define _MT79XX_REG_H_
_MT7981_REG_H_
Everything else looks ok.
Thanks,
Angelo
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/7] ASoC: mediatek: mt79xx: add platform driver
[not found] ` <20230612105250.15441-4-maso.huang@mediatek.com>
@ 2023-06-14 7:57 ` AngeloGioacchino Del Regno
2023-06-14 12:21 ` kernel test robot
1 sibling, 0 replies; 10+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-06-14 7:57 UTC (permalink / raw)
To: Maso Hunag, Jaroslav Kysela, Takashi Iwai, Trevor Wu, Jiaxin Yu,
Ren Zhijie, Arnd Bergmann, Allen-KH Cheng, alsa-devel, devicetree,
linux-kernel, linux-arm-kernel, linux-mediatek
Il 12/06/23 12:52, Maso Hunag ha scritto:
> From: Maso Huang <maso.huang@mediatek.com>
>
> Add mt79xx platform driver.
>
> Signed-off-by: Maso Huang <maso.huang@mediatek.com>
> ---
> sound/soc/mediatek/Kconfig | 10 +
> sound/soc/mediatek/Makefile | 1 +
> sound/soc/mediatek/mt79xx/Makefile | 9 +
> sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c | 608 +++++++++++++++++++++
> 4 files changed, 628 insertions(+)
> create mode 100644 sound/soc/mediatek/mt79xx/Makefile
> create mode 100644 sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c
>
..snip..
> diff --git a/sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c b/sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c
> new file mode 100644
> index 000000000000..69c5f3f3f84b
> --- /dev/null
> +++ b/sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c
> @@ -0,0 +1,608 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * MediaTek ALSA SoC AFE platform driver for MT79xx
> + *
> + * Copyright (c) 2021 MediaTek Inc.
> + * Author: Vic Wu <vic.wu@mediatek.com>
> + * Maso Huang <maso.huang@mediatek.com>
> + */
> +
> +#include <linux/delay.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/of_address.h>
> +#include <linux/pm_runtime.h>
> +
> +#include "mt79xx-afe-common.h"
> +#include "mt79xx-afe-clk.h"
> +#include "mt79xx-reg.h"
> +#include "../common/mtk-afe-platform-driver.h"
> +#include "../common/mtk-afe-fe-dai.h"
> +
> +enum {
> + MTK_AFE_RATE_8K = 0,
> + MTK_AFE_RATE_11K = 1,
> + MTK_AFE_RATE_12K = 2,
> + MTK_AFE_RATE_16K = 4,
> + MTK_AFE_RATE_22K = 5,
> + MTK_AFE_RATE_24K = 6,
> + MTK_AFE_RATE_32K = 8,
> + MTK_AFE_RATE_44K = 9,
> + MTK_AFE_RATE_48K = 10,
> + MTK_AFE_RATE_88K = 13,
> + MTK_AFE_RATE_96K = 14,
> + MTK_AFE_RATE_176K = 17,
> + MTK_AFE_RATE_192K = 18,
> +};
> +
> +unsigned int mt79xx_afe_rate_transform(struct device *dev,
> + unsigned int rate)
> +{
> + switch (rate) {
> + case 8000:
> + return MTK_AFE_RATE_8K;
> + case 11025:
> + return MTK_AFE_RATE_11K;
> + case 12000:
> + return MTK_AFE_RATE_12K;
> + case 16000:
> + return MTK_AFE_RATE_16K;
> + case 22050:
> + return MTK_AFE_RATE_22K;
> + case 24000:
> + return MTK_AFE_RATE_24K;
> + case 32000:
> + return MTK_AFE_RATE_32K;
> + case 44100:
> + return MTK_AFE_RATE_44K;
> + case 48000:
> + return MTK_AFE_RATE_48K;
> + case 88200:
> + return MTK_AFE_RATE_88K;
> + case 96000:
> + return MTK_AFE_RATE_96K;
> + case 176400:
> + return MTK_AFE_RATE_176K;
> + case 192000:
> + return MTK_AFE_RATE_192K;
> + default:
> + dev_warn(dev, "%s(), rate %u invalid, use %d!!!\n",
> + __func__, rate, MTK_AFE_RATE_48K);
> + return MTK_AFE_RATE_48K;
> + }
> +}
> +
> +static const struct snd_pcm_hardware mt79xx_afe_hardware = {
> + .info = SNDRV_PCM_INFO_MMAP |
> + SNDRV_PCM_INFO_INTERLEAVED |
> + SNDRV_PCM_INFO_MMAP_VALID,
> + .formats = SNDRV_PCM_FMTBIT_S16_LE |
> + SNDRV_PCM_FMTBIT_S24_LE |
> + SNDRV_PCM_FMTBIT_S32_LE,
> + .period_bytes_min = 256,
> + .period_bytes_max = 4 * 48 * 1024,
> + .periods_min = 2,
> + .periods_max = 256,
> + .buffer_bytes_max = 8 * 48 * 1024,
> + .fifo_size = 0,
> +};
> +
> +static int mt79xx_memif_fs(struct snd_pcm_substream *substream,
> + unsigned int rate)
> +{
> + struct snd_soc_pcm_runtime *rtd = substream->private_data;
> + struct snd_soc_component *component =
> + snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
Fits in one line.
> + struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
> +
> + return mt79xx_afe_rate_transform(afe->dev, rate);
> +}
> +
> +static int mt79xx_irq_fs(struct snd_pcm_substream *substream,
> + unsigned int rate)
> +{
> + struct snd_soc_pcm_runtime *rtd = substream->private_data;
> + struct snd_soc_component *component =
> + snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
Fits in one line.
> + struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
> +
> + return mt79xx_afe_rate_transform(afe->dev, rate);
> +}
> +
..snip..
> +
> +static irqreturn_t mt79xx_afe_irq_handler(int irq_id, void *dev)
> +{
> + struct mtk_base_afe *afe = dev;
> + struct mtk_base_afe_irq *irq;
> + unsigned int status;
> + unsigned int status_mcu;
> + unsigned int mcu_en;
u32 mcu_en, status, status_mcu;
int i, ret;
irqreturn_t irq_ret = IRQ_HANDLED;
> + int ret;
> + int i;
> + irqreturn_t irq_ret = IRQ_HANDLED;
> +
> + /* get irq that is sent to MCU */
> + regmap_read(afe->regmap, AFE_IRQ_MCU_EN, &mcu_en);
> +
> + ret = regmap_read(afe->regmap, AFE_IRQ_MCU_STATUS, &status);
> + /* only care IRQ which is sent to MCU */
> + status_mcu = status & mcu_en & AFE_IRQ_STATUS_BITS;
> +
> + if (ret || status_mcu == 0) {
> + dev_err(afe->dev, "%s(), irq status err, ret %d, status 0x%x,
> + mcu_en 0x%x\n", __func__, ret, status, mcu_en);
> +
> + irq_ret = IRQ_NONE;
> + goto err_irq;
> + }
> +
> + for (i = 0; i < MT79XX_MEMIF_NUM; i++) {
> + struct mtk_base_afe_memif *memif = &afe->memif[i];
> +
> + if (!memif->substream)
> + continue;
> +
> + if (memif->irq_usage < 0)
> + continue;
> +
> + irq = &afe->irqs[memif->irq_usage];
> +
> + if (status_mcu & (1 << irq->irq_data->irq_en_shift))
> + snd_pcm_period_elapsed(memif->substream);
> + }
> +
> +err_irq:
> + /* clear irq */
> + regmap_write(afe->regmap, AFE_IRQ_MCU_CLR, status_mcu);
> +
> + return irq_ret;
> +}
> +
> +static int mt79xx_afe_runtime_suspend(struct device *dev)
> +{
> + struct mtk_base_afe *afe = dev_get_drvdata(dev);
> + struct mt79xx_afe_private *afe_priv = afe->platform_priv;
> +
> + if (!afe->regmap || afe_priv->pm_runtime_bypass_reg_ctl)
> + goto skip_regmap;
> +
> + /* disable clk*/
> + regmap_update_bits(afe->regmap, AUDIO_TOP_CON4, 0x3fff, 0x3fff);
> + regmap_update_bits(afe->regmap, AUDIO_ENGEN_CON0, AUD_APLL2_EN_MASK,
> + 0);
> + regmap_update_bits(afe->regmap, AUDIO_ENGEN_CON0, AUD_26M_EN_MASK,
> + 0);
Each regmap_update_bits() call fits in one line.
> +
> + /* make sure all irq status are cleared, twice intended */
> + regmap_update_bits(afe->regmap, AFE_IRQ_MCU_CLR, 0xffff, 0xffff);
> +
> +skip_regmap:
> + return mt79xx_afe_disable_clock(afe);
> +}
> +
> +static int mt79xx_afe_runtime_resume(struct device *dev)
> +{
> + struct mtk_base_afe *afe = dev_get_drvdata(dev);
> + struct mt79xx_afe_private *afe_priv = afe->platform_priv;
> + int ret;
> +
> + ret = mt79xx_afe_enable_clock(afe);
> + if (ret)
> + return ret;
> +
> + if (!afe->regmap || afe_priv->pm_runtime_bypass_reg_ctl)
> + goto skip_regmap;
Just return 0 here instead of jumping.
> +
> + /* enable clk*/
> + regmap_update_bits(afe->regmap, AUDIO_TOP_CON4, 0x3fff, 0);
> + regmap_update_bits(afe->regmap, AUDIO_ENGEN_CON0, AUD_APLL2_EN_MASK,
> + AUD_APLL2_EN);
> + regmap_update_bits(afe->regmap, AUDIO_ENGEN_CON0, AUD_26M_EN_MASK,
> + AUD_26M_EN);
> +
> +skip_regmap:
> + return 0;
> +}
> +
> +static int mt79xx_afe_component_probe(struct snd_soc_component *component)
> +{
> + return mtk_afe_add_sub_dai_control(component);
> +}
> +
> +static const struct snd_soc_component_driver mt79xx_afe_component = {
> + .name = AFE_PCM_NAME,
> + .probe = mt79xx_afe_component_probe,
> + .pointer = mtk_afe_pcm_pointer,
> + .pcm_construct = mtk_afe_pcm_new,
> +};
> +
> +static int mt79xx_dai_memif_register(struct mtk_base_afe *afe)
> +{
> + struct mtk_base_afe_dai *dai;
> +
> + dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL);
> + if (!dai)
> + return -ENOMEM;
> +
> + list_add(&dai->list, &afe->sub_dais);
> +
> + dai->dai_drivers = mt79xx_memif_dai_driver;
> + dai->num_dai_drivers = ARRAY_SIZE(mt79xx_memif_dai_driver);
> +
> + dai->dapm_widgets = mt79xx_memif_widgets;
> + dai->num_dapm_widgets = ARRAY_SIZE(mt79xx_memif_widgets);
> + dai->dapm_routes = mt79xx_memif_routes;
> + dai->num_dapm_routes = ARRAY_SIZE(mt79xx_memif_routes);
> +
> + return 0;
> +}
> +
> +typedef int (*dai_register_cb)(struct mtk_base_afe *);
> +static const dai_register_cb dai_register_cbs[] = {
> + mt79xx_dai_etdm_register,
> + mt79xx_dai_memif_register,
> +};
> +
> +static int mt79xx_afe_pcm_dev_probe(struct platform_device *pdev)
> +{
> + struct mtk_base_afe *afe;
> + struct mt79xx_afe_private *afe_priv;
> + struct device *dev;
> + int i, irq_id, ret;
> +
> + afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL);
> + if (!afe)
> + return -ENOMEM;
> + platform_set_drvdata(pdev, afe);
> +
> + afe->platform_priv = devm_kzalloc(&pdev->dev, sizeof(*afe_priv),
> + GFP_KERNEL);
> + if (!afe->platform_priv)
> + return -ENOMEM;
> +
> + afe_priv = afe->platform_priv;
> + afe->dev = &pdev->dev;
> + dev = afe->dev;
> +
> + afe->base_addr = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(afe->base_addr))
> + return PTR_ERR(afe->base_addr);
> +
> + /* initial audio related clock */
> + ret = mt79xx_init_clock(afe);
> + if (ret) {
> + dev_err(dev, "init clock error\n");
> + return ret;
return dev_err_probe(dev, ret, "Cannot initialize clocks\n");
> + }
> +
> + pm_runtime_enable(dev);
ret = devm_pm_runtime_enable(dev);
if (ret)
return ret;
> +
> + /* enable clock for regcache get default value from hw */
> + afe_priv->pm_runtime_bypass_reg_ctl = true;
> + pm_runtime_get_sync(&pdev->dev);
> +
> + afe->regmap = devm_regmap_init_mmio(&pdev->dev, afe->base_addr,
> + &mt79xx_afe_regmap_config);
> + if (IS_ERR(afe->regmap)) {
> + ret = PTR_ERR(afe->regmap);
> + goto err_pm_disable;
> + }
> +
> + pm_runtime_put_sync(&pdev->dev);
> + afe_priv->pm_runtime_bypass_reg_ctl = false;
> +
> + /* init memif */
> + afe->memif_size = MT79XX_MEMIF_NUM;
> + afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif),
> + GFP_KERNEL);
> + if (!afe->memif)
> + goto err_pm_disable;
> +
> + for (i = 0; i < afe->memif_size; i++) {
> + afe->memif[i].data = &memif_data[i];
> + afe->memif[i].irq_usage = -1;
> + }
> +
> + mutex_init(&afe->irq_alloc_lock);
> +
> + /* irq initialize */
> + afe->irqs_size = MT79XX_IRQ_NUM;
> + afe->irqs = devm_kcalloc(dev, afe->irqs_size, sizeof(*afe->irqs),
> + GFP_KERNEL);
> + if (!afe->irqs)
> + goto err_pm_disable;
> +
> + for (i = 0; i < afe->irqs_size; i++)
> + afe->irqs[i].irq_data = &irq_data[i];
> +
> + /* request irq */
> + irq_id = platform_get_irq(pdev, 0);
> + if (!irq_id) {
> + dev_err(dev, "%pOFn no irq found\n", dev->of_node);
You're not setting any `ret` value to return an error: this will return 0!!!
> + goto err_pm_disable;
> + }
> + ret = devm_request_irq(dev, irq_id, mt79xx_afe_irq_handler,
> + IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
> + if (ret) {
> + dev_err(dev, "could not request_irq for asys-isr\n");
> + goto err_pm_disable;
> + }
> +
> + /* init sub_dais */
> + INIT_LIST_HEAD(&afe->sub_dais);
> +
> + for (i = 0; i < ARRAY_SIZE(dai_register_cbs); i++) {
> + ret = dai_register_cbs[i](afe);
> + if (ret) {
> + dev_warn(afe->dev, "dai register i %d fail, ret %d\n",
> + i, ret);
Please change this dev_warn() to dev_err().
> + goto err_pm_disable;
> + }
> + }
> +
> + /* init dai_driver and component_driver */
> + ret = mtk_afe_combine_sub_dai(afe);
> + if (ret) {
> + dev_warn(afe->dev, "mtk_afe_combine_sub_dai fail, ret %d\n",
> + ret);
dev_err()
> + goto err_pm_disable;
> + }
> +
> + afe->mtk_afe_hardware = &mt79xx_afe_hardware;
> + afe->memif_fs = mt79xx_memif_fs;
> + afe->irq_fs = mt79xx_irq_fs;
> +
> + afe->runtime_resume = mt79xx_afe_runtime_resume;
> + afe->runtime_suspend = mt79xx_afe_runtime_suspend;
> +
> + /* register component */
> + ret = devm_snd_soc_register_component(&pdev->dev,
> + &mt79xx_afe_component,
> + NULL, 0);
> + if (ret) {
> + dev_warn(dev, "err_platform\n");
> + goto err_pm_disable;
> + }
> +
> + ret = devm_snd_soc_register_component(afe->dev,
> + &mt79xx_afe_pcm_dai_component,
> + afe->dai_drivers,
> + afe->num_dai_drivers);
> + if (ret) {
> + dev_warn(dev, "err_dai_component\n");
> + goto err_pm_disable;
> + }
> +
> + return ret;
> +
> +err_pm_disable:
> + pm_runtime_put_sync(&pdev->dev);
> + pm_runtime_disable(&pdev->dev);
> + return ret;
> +}
> +
> +static int mt79xx_afe_pcm_dev_remove(struct platform_device *pdev)
> +{
> + pm_runtime_disable(&pdev->dev);
> + if (!pm_runtime_status_suspended(&pdev->dev))
> + mt79xx_afe_runtime_suspend(&pdev->dev);
> +
> + return 0;
> +}
> +
> +static const struct of_device_id mt79xx_afe_pcm_dt_match[] = {
> + { .compatible = "mediatek,mt79xx-afe", },
> + {},
Last entry is always { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, mt79xx_afe_pcm_dt_match);
> +
> +static const struct dev_pm_ops mt79xx_afe_pm_ops = {
> + SET_RUNTIME_PM_OPS(mt79xx_afe_runtime_suspend,
> + mt79xx_afe_runtime_resume, NULL)
> +};
> +
> +static struct platform_driver mt79xx_afe_pcm_driver = {
> + .driver = {
> + .name = "mt79xx-audio",
> + .of_match_table = mt79xx_afe_pcm_dt_match,
> + .pm = &mt79xx_afe_pm_ops,
> + },
> + .probe = mt79xx_afe_pcm_dev_probe,
> + .remove = mt79xx_afe_pcm_dev_remove,
> +};
> +
Remove this extra blank line.
> +module_platform_driver(mt79xx_afe_pcm_driver);
> +
> +MODULE_DESCRIPTION("Mediatek SoC AFE platform driver for ALSA MT79xx");
> +MODULE_AUTHOR("Vic Wu <vic.wu@mediatek.com>");
> +MODULE_LICENSE("GPL");
Thanks,
Angelo
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 7/7] ASoC: dt-bindings: mediatek,mt79xx-afe: add audio afe document
[not found] ` <a338bf978dfa0af84a6728ab66dc51e45a20c7c4.camel@mediatek.com>
@ 2023-06-14 8:21 ` Krzysztof Kozlowski
[not found] ` <0977c72a4f63132104736b9de8aa8246abb34894.camel@mediatek.com>
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-14 8:21 UTC (permalink / raw)
To: Maso Huang (黃加竹),
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
Trevor Wu (吳文良), devicetree@vger.kernel.org,
Allen-KH Cheng (程冠勳), renzhijie2@huawei.com,
tiwai@suse.com, linux-arm-kernel@lists.infradead.org,
arnd@arndb.de, alsa-devel@alsa-project.org,
angelogioacchino.delregno@collabora.com, perex@perex.cz,
Jiaxin Yu (俞家鑫)
On 14/06/2023 09:37, Maso Huang (黃加竹) wrote:
>>>> I already saw AFE, why it cannot be part of existing bindings?
>>
>> Can you answer this?
>>
>
> Did you mean mtk-afe-pcm.txt?
> If yes, I'll modify mtk-afe-pcm.txt to yaml format, and add mt7986 to
> its compatible list.
>
No, I meant mediatek,mt8188-afe.yaml.
Aren't you working on some old tree? If so, please don't...
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 6/7] ASoC: dt-bindings: mediatek,mt79xx-wm8960: add mt79xx-wm8960 document
[not found] ` <c87eadd9fc8d0ef9dc4582493e540f0b311e06eb.camel@mediatek.com>
@ 2023-06-14 8:22 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-14 8:22 UTC (permalink / raw)
To: Maso Huang (黃加竹),
linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
linux-mediatek@lists.infradead.org,
Trevor Wu (吳文良), devicetree@vger.kernel.org,
Allen-KH Cheng (程冠勳), renzhijie2@huawei.com,
tiwai@suse.com, linux-arm-kernel@lists.infradead.org,
arnd@arndb.de, perex@perex.cz,
angelogioacchino.delregno@collabora.com,
Jiaxin Yu (俞家鑫)
On 14/06/2023 09:40, Maso Huang (黃加竹) wrote:
>>> Signed-off-by: Maso Huang <maso.huang@mediatek.com>
>>> ---
>>> .../sound/mediatek,mt79xx-wm8960.yaml | 53
>> +++++++++++++++++++
>>> 1 file changed, 53 insertions(+)
>>> create mode 100644
>> Documentation/devicetree/bindings/sound/mediatek,mt79xx-wm8960.yaml
>>>
>>> diff --git
>> a/Documentation/devicetree/bindings/sound/mediatek,mt79xx-wm8960.yaml
>> b/Documentation/devicetree/bindings/sound/mediatek,mt79xx-wm8960.yaml
>>> new file mode 100644
>>> index 000000000000..26b38bb629da
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/sound/mediatek,mt79xx-
>> wm8960.yaml
>>> @@ -0,0 +1,53 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id:
>> http://devicetree.org/schemas/sound/mediatek,mt79xx-wm8960.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: MediaTek MT79xx ASOC sound card with WM8960 codec
>>
>> What is a MT79xx ASOC? Is it some specific SoC name? What does "A"
>> stands for in SoC? XX also looks odd, I thought Mediatek uses only
>> numbers.
>>
>
> I'll use mt7986 instead of mt79xx in v2 patch.
> And ASoC means ALSA SoC.
ALSA is Linux stuff, so does not belong to bindings. I have no clue what
is "ALSA SoC" (as SoC means System on Chip).
Please describe real hardware not Linux or your configuration or some SW.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 7/7] ASoC: dt-bindings: mediatek,mt79xx-afe: add audio afe document
[not found] ` <0977c72a4f63132104736b9de8aa8246abb34894.camel@mediatek.com>
@ 2023-06-14 10:26 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-14 10:26 UTC (permalink / raw)
To: Maso Huang (黃加竹),
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
Trevor Wu (吳文良), devicetree@vger.kernel.org,
Allen-KH Cheng (程冠勳), renzhijie2@huawei.com,
tiwai@suse.com, linux-arm-kernel@lists.infradead.org,
arnd@arndb.de, alsa-devel@alsa-project.org,
angelogioacchino.delregno@collabora.com, perex@perex.cz,
Jiaxin Yu (俞家鑫)
On 14/06/2023 11:19, Maso Huang (黃加竹) wrote:
> On Wed, 2023-06-14 at 10:21 +0200, Krzysztof Kozlowski wrote:
>>
>> External email : Please do not click links or open attachments until
>> you have verified the sender or the content.
>> On 14/06/2023 09:37, Maso Huang (黃加竹) wrote:
>>>>>> I already saw AFE, why it cannot be part of existing bindings?
>>>>
>>>> Can you answer this?
>>>>
>>>
>>> Did you mean mtk-afe-pcm.txt?
>>> If yes, I'll modify mtk-afe-pcm.txt to yaml format, and add mt7986
>> to
>>> its compatible list.
>>>
>>
>> No, I meant mediatek,mt8188-afe.yaml.
>>
>> Aren't you working on some old tree? If so, please don't...
>>
>> Best regards,
>> Krzysztof
>>
>
> Hi Krzysztof,
> AFE is common name for our audio hardware, and the design might be
> different for soc, like clock.
>
> And the design is the same for mt7981/mt7986/mt7988.
> Is it better to create a new dtbinding file mediatk,mt7986-afe.yaml?
Is it different? That was my question whether it can be part of existing
bindings.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/7] ASoC: mediatek: mt79xx: add platform driver
[not found] ` <20230612105250.15441-4-maso.huang@mediatek.com>
2023-06-14 7:57 ` [PATCH 3/7] ASoC: mediatek: mt79xx: add platform driver AngeloGioacchino Del Regno
@ 2023-06-14 12:21 ` kernel test robot
1 sibling, 0 replies; 10+ messages in thread
From: kernel test robot @ 2023-06-14 12:21 UTC (permalink / raw)
To: Maso Hunag, AngeloGioacchino Del Regno, Jaroslav Kysela,
Takashi Iwai, Trevor Wu, Jiaxin Yu, Ren Zhijie, Arnd Bergmann,
Allen-KH Cheng, alsa-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: oe-kbuild-all, Maso Huang
Hi Maso,
kernel test robot noticed the following build errors:
[auto build test ERROR on broonie-sound/for-next]
[also build test ERROR on tiwai-sound/for-next tiwai-sound/for-linus linus/master v6.4-rc6 next-20230614]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Maso-Hunag/ASoC-mediatek-mt79xx-add-common-header/20230612-211033
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link: https://lore.kernel.org/r/20230612105250.15441-4-maso.huang%40mediatek.com
patch subject: [PATCH 3/7] ASoC: mediatek: mt79xx: add platform driver
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20230614/202306142005.uUyPtOQT-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add broonie-sound https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
git fetch broonie-sound for-next
git checkout broonie-sound/for-next
b4 shazam https://lore.kernel.org/r/20230612105250.15441-4-maso.huang@mediatek.com
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash sound/soc/mediatek/mt79xx/
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306142005.uUyPtOQT-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c: In function 'mt79xx_afe_irq_handler':
>> sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:322:35: warning: missing terminating " character
322 | dev_err(afe->dev, "%s(), irq status err, ret %d, status 0x%x,
| ^
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:323:38: warning: missing terminating " character
323 | mcu_en 0x%x\n", __func__, ret, status, mcu_en);
| ^
>> sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:608:23: error: unterminated argument list invoking macro "dev_err"
608 | MODULE_LICENSE("GPL");
| ^
>> sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:322:17: error: 'dev_err' undeclared (first use in this function); did you mean '_dev_err'?
322 | dev_err(afe->dev, "%s(), irq status err, ret %d, status 0x%x,
| ^~~~~~~
| _dev_err
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:322:17: note: each undeclared identifier is reported only once for each function it appears in
>> sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:322:24: error: expected ';' at end of input
322 | dev_err(afe->dev, "%s(), irq status err, ret %d, status 0x%x,
| ^
| ;
......
>> sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:322:17: error: expected declaration or statement at end of input
322 | dev_err(afe->dev, "%s(), irq status err, ret %d, status 0x%x,
| ^~~~~~~
>> sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:322:17: error: expected declaration or statement at end of input
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:312:21: warning: unused variable 'irq_ret' [-Wunused-variable]
312 | irqreturn_t irq_ret = IRQ_HANDLED;
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:311:13: warning: unused variable 'i' [-Wunused-variable]
311 | int i;
| ^
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:306:34: warning: unused variable 'irq' [-Wunused-variable]
306 | struct mtk_base_afe_irq *irq;
| ^~~
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:322:17: error: no return statement in function returning non-void [-Werror=return-type]
322 | dev_err(afe->dev, "%s(), irq status err, ret %d, status 0x%x,
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c: At top level:
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:303:20: warning: 'mt79xx_afe_irq_handler' defined but not used [-Wunused-function]
303 | static irqreturn_t mt79xx_afe_irq_handler(int irq_id, void *dev)
| ^~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:294:35: warning: 'mt79xx_afe_regmap_config' defined but not used [-Wunused-const-variable=]
294 | static const struct regmap_config mt79xx_afe_regmap_config = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:232:39: warning: 'irq_data' defined but not used [-Wunused-const-variable=]
232 | static const struct mtk_base_irq_data irq_data[MT79XX_IRQ_NUM] = {
| ^~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:183:41: warning: 'memif_data' defined but not used [-Wunused-const-variable=]
183 | static const struct mtk_base_memif_data memif_data[MT79XX_MEMIF_NUM] = {
| ^~~~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:179:46: warning: 'mt79xx_afe_pcm_dai_component' defined but not used [-Wunused-const-variable=]
179 | static const struct snd_soc_component_driver mt79xx_afe_pcm_dai_component = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:170:40: warning: 'mt79xx_memif_routes' defined but not used [-Wunused-const-variable=]
170 | static const struct snd_soc_dapm_route mt79xx_memif_routes[] = {
| ^~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:158:41: warning: 'mt79xx_memif_widgets' defined but not used [-Wunused-const-variable=]
158 | static const struct snd_soc_dapm_widget mt79xx_memif_widgets[] = {
| ^~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:122:34: warning: 'mt79xx_memif_dai_driver' defined but not used [-Wunused-variable]
122 | static struct snd_soc_dai_driver mt79xx_memif_dai_driver[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:101:12: warning: 'mt79xx_irq_fs' defined but not used [-Wunused-function]
101 | static int mt79xx_irq_fs(struct snd_pcm_substream *substream,
| ^~~~~~~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:90:12: warning: 'mt79xx_memif_fs' defined but not used [-Wunused-function]
90 | static int mt79xx_memif_fs(struct snd_pcm_substream *substream,
| ^~~~~~~~~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c:75:38: warning: 'mt79xx_afe_hardware' defined but not used [-Wunused-const-variable=]
75 | static const struct snd_pcm_hardware mt79xx_afe_hardware = {
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c: In function 'mt79xx_init_clock':
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:43: warning: missing terminating " character
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:42: warning: missing terminating " character
47 | ret %ld\n", __func__, aud_clks[i],
| ^
In file included from include/linux/kernel.h:30,
from include/linux/clk.h:13,
from sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:10:
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:43: error: missing terminating " character
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:379:42: note: in definition of macro '__printk_index_emit'
379 | if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:33: error: 'ret' undeclared (first use in this function); did you mean 'net'?
47 | ret %ld\n", __func__, aud_clks[i],
| ^~~
include/linux/printk.h:379:42: note: in definition of macro '__printk_index_emit'
379 | if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:33: note: each undeclared identifier is reported only once for each function it appears in
47 | ret %ld\n", __func__, aud_clks[i],
| ^~~
include/linux/printk.h:379:42: note: in definition of macro '__printk_index_emit'
379 | if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:40: error: stray '\' in program
47 | ret %ld\n", __func__, aud_clks[i],
| ^
include/linux/printk.h:379:42: note: in definition of macro '__printk_index_emit'
379 | if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:38: error: 'ld' undeclared (first use in this function)
47 | ret %ld\n", __func__, aud_clks[i],
| ^~
include/linux/printk.h:379:42: note: in definition of macro '__printk_index_emit'
379 | if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:41: error: expected ')' before 'n'
47 | ret %ld\n", __func__, aud_clks[i],
| ^
include/linux/printk.h:379:42: note: in definition of macro '__printk_index_emit'
379 | if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
include/linux/printk.h:379:41: note: to match this '('
379 | if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
| ^
include/linux/printk.h:422:9: note: in expansion of macro '__printk_index_emit'
422 | __printk_index_emit(fmt, level, subsys_fmt_prefix)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:42: error: missing terminating " character
47 | ret %ld\n", __func__, aud_clks[i],
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:379:42: note: in definition of macro '__printk_index_emit'
379 | if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:43: error: missing terminating " character
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:388:61: note: in definition of macro '__printk_index_emit'
388 | .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:40: error: stray '\' in program
47 | ret %ld\n", __func__, aud_clks[i],
| ^
include/linux/printk.h:388:61: note: in definition of macro '__printk_index_emit'
388 | .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:41: error: expected ')' before 'n'
47 | ret %ld\n", __func__, aud_clks[i],
| ^
include/linux/printk.h:388:61: note: in definition of macro '__printk_index_emit'
388 | .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
include/linux/printk.h:388:60: note: to match this '('
388 | .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
| ^
include/linux/printk.h:422:9: note: in expansion of macro '__printk_index_emit'
422 | __printk_index_emit(fmt, level, subsys_fmt_prefix)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:42: error: missing terminating " character
47 | ret %ld\n", __func__, aud_clks[i],
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:388:61: note: in definition of macro '__printk_index_emit'
388 | .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:43: error: missing terminating " character
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:388:70: note: in definition of macro '__printk_index_emit'
388 | .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:40: error: stray '\' in program
47 | ret %ld\n", __func__, aud_clks[i],
| ^
include/linux/printk.h:388:70: note: in definition of macro '__printk_index_emit'
388 | .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:41: error: expected ')' before 'n'
47 | ret %ld\n", __func__, aud_clks[i],
| ^
include/linux/printk.h:388:70: note: in definition of macro '__printk_index_emit'
388 | .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
include/linux/printk.h:388:69: note: to match this '('
388 | .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
| ^
include/linux/printk.h:422:9: note: in expansion of macro '__printk_index_emit'
422 | __printk_index_emit(fmt, level, subsys_fmt_prefix)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:42: error: missing terminating " character
47 | ret %ld\n", __func__, aud_clks[i],
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:388:70: note: in definition of macro '__printk_index_emit'
388 | .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
| ^~~~
include/linux/dev_printk.h:105:9: note: in expansion of macro 'printk_index_subsys_emit'
105 | printk_index_subsys_emit("%s %s: ", level, fmt)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:109:17: note: in expansion of macro 'dev_printk_index_emit'
109 | dev_printk_index_emit(level, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
In file included from include/linux/device.h:15,
from include/linux/platform_device.h:13,
from include/sound/soc.h:14,
from sound/soc/mediatek/mt79xx/mt79xx-afe-common.h:13,
from sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:12:
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:43: error: missing terminating " character
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:40: error: stray '\' in program
47 | ret %ld\n", __func__, aud_clks[i],
| ^
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
>> sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:41: error: expected ')' before 'n'
47 | ret %ld\n", __func__, aud_clks[i],
| ^
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
include/linux/dev_printk.h:110:24: note: to match this '('
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^
include/linux/dev_printk.h:144:9: note: in expansion of macro 'dev_printk_index_wrap'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:47:42: error: missing terminating " character
47 | ret %ld\n", __func__, aud_clks[i],
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/mediatek/mt79xx/mt79xx-afe-clk.c:46:25: note: in expansion of macro 'dev_err'
46 | dev_err(afe->dev, "%s(), devm_clk_get %s fail,
| ^~~~~~~
vim +/dev_err +608 sound/soc/mediatek/mt79xx/mt79xx-afe-pcm.c
605
606 MODULE_DESCRIPTION("Mediatek SoC AFE platform driver for ALSA MT79xx");
607 MODULE_AUTHOR("Vic Wu <vic.wu@mediatek.com>");
> 608 MODULE_LICENSE("GPL");
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-06-14 12:22 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230612105250.15441-1-maso.huang@mediatek.com>
[not found] ` <20230612105250.15441-3-maso.huang@mediatek.com>
2023-06-13 7:27 ` [PATCH 2/7] ASoC: mediatek: mt79xx: support audio clock control Claudiu.Beznea
[not found] ` <20230612105250.15441-7-maso.huang@mediatek.com>
2023-06-13 8:49 ` [PATCH 6/7] ASoC: dt-bindings: mediatek,mt79xx-wm8960: add mt79xx-wm8960 document Krzysztof Kozlowski
[not found] ` <c87eadd9fc8d0ef9dc4582493e540f0b311e06eb.camel@mediatek.com>
2023-06-14 8:22 ` Krzysztof Kozlowski
[not found] ` <20230612105250.15441-8-maso.huang@mediatek.com>
2023-06-13 8:51 ` [PATCH 7/7] ASoC: dt-bindings: mediatek,mt79xx-afe: add audio afe document Krzysztof Kozlowski
[not found] ` <14913cbb87981eed6f8b72f9e659ed3e25958320.camel@mediatek.com>
2023-06-14 6:34 ` Krzysztof Kozlowski
[not found] ` <a338bf978dfa0af84a6728ab66dc51e45a20c7c4.camel@mediatek.com>
2023-06-14 8:21 ` Krzysztof Kozlowski
[not found] ` <0977c72a4f63132104736b9de8aa8246abb34894.camel@mediatek.com>
2023-06-14 10:26 ` Krzysztof Kozlowski
[not found] ` <20230612105250.15441-2-maso.huang@mediatek.com>
2023-06-14 7:44 ` [PATCH 1/7] ASoC: mediatek: mt79xx: add common header AngeloGioacchino Del Regno
[not found] ` <20230612105250.15441-4-maso.huang@mediatek.com>
2023-06-14 7:57 ` [PATCH 3/7] ASoC: mediatek: mt79xx: add platform driver AngeloGioacchino Del Regno
2023-06-14 12:21 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).