From: ALOK TIWARI <alok.a.tiwari@oracle.com>
To: "Darren.Ye" <darren.ye@mediatek.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH v2 08/11] ASoC: mediatek: mt8196: add platform driver
Date: Thu, 10 Apr 2025 01:58:46 +0530 [thread overview]
Message-ID: <369cb94e-290f-425a-93e7-fcde11221dee@oracle.com> (raw)
In-Reply-To: <20250407120708.26495-9-darren.ye@mediatek.com>
On 07-04-2025 17:36, Darren.Ye wrote:
> From: Darren Ye<darren.ye@mediatek.com>
>
> Add mt8196 platform driver.
>
> Signed-off-by: Darren Ye<darren.ye@mediatek.com>
> ---
> sound/soc/mediatek/Kconfig | 10 +
> sound/soc/mediatek/Makefile | 1 +
> sound/soc/mediatek/mt8196/Makefile | 14 +
> sound/soc/mediatek/mt8196/mt8196-afe-pcm.c | 5070 ++++++++++++++++++++
> 4 files changed, 5095 insertions(+)
> create mode 100644 sound/soc/mediatek/mt8196/Makefile
> create mode 100644 sound/soc/mediatek/mt8196/mt8196-afe-pcm.c
>
> diff --git a/sound/soc/mediatek/Kconfig b/sound/soc/mediatek/Kconfig
> index 3033e2d3fe16..606f221e238c 100644
> --- a/sound/soc/mediatek/Kconfig
> +++ b/sound/soc/mediatek/Kconfig
> @@ -204,6 +204,16 @@ config SND_SOC_MT8186_MT6366
> Select Y if you have such device.
> If unsure select "N".
>
> +config SND_SOC_MT8196
> + tristate "ASoC support for Mediatek MT8196 chip"
> + depends on ARCH_MEDIATEK
> + select SND_SOC_MEDIATEK
> + help
> + This adds ASoC driver for Mediatek MT8196 boards
> + that can be used with other codecs.
> + Select Y if you have such device.
> + If unsure select "N".
> +
is this not depends on COMMON_CLK and select SND_SOC_MT6358/6359 not
require ?
> config SND_SOC_MTK_BTCVSD
> tristate "ALSA BT SCO CVSD/MSBC Driver"
> help
> diff --git a/sound/soc/mediatek/Makefile b/sound/soc/mediatek/Makefile
> index 4b55434f2168..11d7c484a5d3 100644
> --- a/sound/soc/mediatek/Makefile
> +++ b/sound/soc/mediatek/Makefile
> @@ -10,3 +10,4 @@ obj-$(CONFIG_SND_SOC_MT8188) += mt8188/
> obj-$(CONFIG_SND_SOC_MT8192) += mt8192/
> obj-$(CONFIG_SND_SOC_MT8195) += mt8195/
obj-$(CONFIG_SND_SOC_MT8196) += mt8196/ should be after mt8195.
> obj-$(CONFIG_SND_SOC_MT8365) += mt8365/
> +obj-$(CONFIG_SND_SOC_MT8196) += mt8196/
> diff --git a/sound/soc/mediatek/mt8196/Makefile b/sound/soc/mediatek/mt8196/Makefile
> new file mode 100644
> index 000000000000..9bcc09a9a94d
> --- /dev/null
> +++ b/sound/soc/mediatek/mt8196/Makefile
> @@ -0,0 +1,14 @@
> +# SPDX-License-Identifier: GPL-2.0
> +
> +# common include path
> +subdir-ccflags-y += -I$(srctree)/sound/soc/mediatek/common
> +
> +# platform driver
> +obj-$(CONFIG_SND_SOC_MT8196) += snd-soc-mt8196-afe.o
> +snd-soc-mt8196-afe-objs += \
> + mt8196-afe-pcm.o \
> + mt8196-afe-clk.o \
> + mt8196-dai-adda.o \
> + mt8196-dai-i2s.o \
> + mt8196-dai-tdm.o
> +
need to follow right sequence like mediatek/mt8195/Makefile
> diff --git a/sound/soc/mediatek/mt8196/mt8196-afe-pcm.c b/sound/soc/mediatek/mt8196/mt8196-afe-pcm.c
> new file mode 100644
> index 000000000000..84ccbc7419c7
> --- /dev/null
> +++ b/sound/soc/mediatek/mt8196/mt8196-afe-pcm.c
> @@ -0,0 +1,5070 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Mediatek ALSA SoC AFE platform driver for 8196
> + *
> + * Copyright (c) 2024 MediaTek Inc.
> + * Author: Darren Ye<darren.ye@mediatek.com>
> + */
> +
> +#include <linux/delay.h>
> +#include <linux/dma-mapping.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/of_address.h>
> +#include <linux/pm_runtime.h>
> +#include <linux/regmap.h>
> +#include <linux/of_device.h>
> +#include <sound/soc.h>
> +#include <linux/of_reserved_mem.h>
> +
> +#include "mt8196-afe-common.h"
> +#include "mtk-afe-platform-driver.h"
> +#include "mtk-afe-fe-dai.h"
> +#include "mt8196-afe-clk.h"
> +#include "mt8196-interconnection.h"
> +
header required to be in a sequence. easy to read!
#include "mt8196-afe-clk.h"
#include "mt8196-afe-common.h"
#include "mtk-afe-fe-dai.h"
#include "mtk-afe-platform-driver.h"
#include "mt8196-interconnection.h"
> +static const struct snd_pcm_hardware mt8196_afe_hardware = {
> + .info = (SNDRV_PCM_INFO_MMAP |
> + SNDRV_PCM_INFO_NO_PERIOD_WAKEUP |
> + 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 = 96,
> + .period_bytes_max = 4 * 48 * 1024,
> + .periods_min = 2,
> + .periods_max = 256,
> + .buffer_bytes_max = 256 * 1024,
> + .fifo_size = 0,
> +};
> +
Thanks,
Alok
next prev parent reply other threads:[~2025-04-09 20:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 12:06 [PATCH v2 00/11] ASoC: mediatek: Add support for MT8196 SoC Darren.Ye
2025-04-07 12:06 ` [PATCH v2 01/11] ASoC: mediatek: common: modify mtk afe common driver for mt8196 Darren.Ye
2025-04-07 12:06 ` [PATCH v2 02/11] ASoC: mediatek: common: modify mtk afe platform " Darren.Ye
2025-04-07 12:06 ` [PATCH v2 03/11] ASoC: mediatek: mt8196: add common header Darren.Ye
2025-04-07 12:06 ` [PATCH v2 04/11] ASoC: mediatek: mt8196: support audio clock control Darren.Ye
2025-04-07 12:06 ` [PATCH v2 05/11] ASoC: mediatek: mt8196: support ADDA in platform driver Darren.Ye
2025-04-07 12:06 ` [PATCH v2 06/11] ASoC: mediatek: mt8196: support I2S " Darren.Ye
2025-04-07 12:06 ` [PATCH v2 07/11] ASoC: mediatek: mt8196: support TDM " Darren.Ye
2025-04-07 12:06 ` [PATCH v2 08/11] ASoC: mediatek: mt8196: add " Darren.Ye
2025-04-09 20:28 ` ALOK TIWARI [this message]
2025-04-14 6:37 ` Darren Ye (叶飞)
2025-04-16 11:51 ` Chen-Yu Tsai
2025-04-07 12:06 ` [PATCH v2 09/11] ASoC: dt-bindings: mediatek,mt8196-afe: add audio AFE document Darren.Ye
2025-04-07 13:09 ` Krzysztof Kozlowski
2025-04-16 8:34 ` Chen-Yu Tsai
2025-04-07 12:06 ` [PATCH v2 10/11] ASoC: mediatek: mt8196: add machine driver with mt6681 Darren.Ye
2025-04-07 12:06 ` [PATCH v2 11/11] ASoC: dt-bindings: mediatek,mt8196-mt6681: add mt8196-mt6681 document Darren.Ye
2025-04-07 13:12 ` Krzysztof Kozlowski
2025-04-14 7:08 ` Darren Ye (叶飞)
2025-04-14 12:03 ` Krzysztof Kozlowski
2025-04-07 13:04 ` [PATCH v2 00/11] ASoC: mediatek: Add support for MT8196 SoC Krzysztof Kozlowski
2025-04-08 1:46 ` Darren Ye (叶飞)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=369cb94e-290f-425a-93e7-fcde11221dee@oracle.com \
--to=alok.a.tiwari@oracle.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=brgl@bgdev.pl \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=darren.ye@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).