summaryrefslogtreecommitdiff
path: root/sound/soc/mediatek
AgeCommit message (Collapse)AuthorFilesLines
2025-05-22Merge branch 'for-linus' into for-nextTakashi Iwai1-0/+1
Sync with the pending 6.15 fixes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-15ASoC: mediatek: mt8183-afe-pcm: shorten mt8183_is_volatile_reg()Chen-Yu Tsai1-112/+40
mt8183_is_volatile_reg() is a large switch-case block that lists out every register that is volatile. Since many pairs of registers have consecutive addresses, the cases can be compressed down with the ellipsis, i.e. GCC extension "case ranges" [1] to cover more addresses in one case, shortening the source code. This is not completely the same, since the addresses are 4-byte aligned, and using the case ranges feature adds all unaligned addresses in between. In practice this doesn't matter since the unaligned addresses are blocked by the regmap core. This also ends up compiling slightly smaller with a reduction of 128 bytes in the text section. [1] https://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20250515073825.4155297-4-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-15ASoC: mediatek: mt8183-afe-pcm: Shorten irq_data table using macrosChen-Yu Tsai1-143/+33
The irq_data table describes all the supported interrupts for the audio frontend. The parameters are either the same or can be derived from the interrupt number. This results in a very long table (in source code) that can be shortened with macros. Do just that. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20250515073825.4155297-3-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-15ASoC: mediatek: mt8183-afe-pcm: Shorten memif_data table using macrosChen-Yu Tsai1-189/+54
The memif_data table describes all the supported PCM channels for the audio frontend. Most of the fields are either the same or can be derived from the interface's name. This results in a very long table (in source code) that can be shortened with macros. Do just that. Some "convenience" macros were added to cover non-existent register fields that would otherwise require multiple layers of macros to handle. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20250515073825.4155297-2-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-08ASoC: mediatek: mt8188-mt6359: Depend on MT6359_ACCDET set or disabledNícolas F. R. A. Prado1-1/+1
Commit 0116a7d84b32 ("ASoC: mediatek: mt6359: Add stub for mt6359_accdet_enable_jack_detect") added a stub for mt6359_accdet_enable_jack_detect() in order to allow the mt8188-mt6359 driver to be enabled without requiring the mt6359-accdet to also be enabled, since it is not always needed. However, in the case that CONFIG_SND_SOC_MT8188_MT6359=y and CONFIG_SND_SOC_MT6359_ACCDET=m, a link error will happen, which commit b19fa45715ce ("ASoC: mediatek: mt8188-mt6359: select CONFIG_SND_SOC_MT6359_ACCDET") solved by selecting CONFIG_SND_SOC_MT6359_ACCDET. In order to not require CONFIG_SND_SOC_MT6359_ACCDET as originally intended, but also prevent the link error, depend on ACCDET being enabled or disabled (which will force MT8188_MT6359=m if MT6359_ACCDET=m). Fixes: f35d834d67ad ("ASoC: mediatek: mt8188-mt6359: Add accdet headset jack detect support") Fixes: b19fa45715ce ("ASoC: mediatek: mt8188-mt6359: select CONFIG_SND_SOC_MT6359_ACCDET") Suggested-by: Arnd Bergmann <arnd@kernel.org> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20250507-mt8188-mt6359-accdet-depend-v1-1-aad70ce62964@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-05ASoC: mediatek: mt8188-mt6359: select CONFIG_SND_SOC_MT6359_ACCDETArnd Bergmann1-0/+1
The driver support was added without selecting the codec, which leads to a link failure: aarch64-linux-ld: sound/soc/mediatek/mt8188/mt8188-mt6359.o: in function `mt8188_mt6359_init': mt8188-mt6359.c:(.text+0x19f0): undefined reference to `mt6359_accdet_enable_jack_detect' Fixes: f35d834d67ad ("ASoC: mediatek: mt8188-mt6359: Add accdet headset jack detect support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20250505052106.1811802-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-03ASoC: soc-utils: add snd_soc_dlc_is_dummy()Mark Brown2-6/+6
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: We are using dummy component/dlc, but didn't have its check funciton. This patch adds it.
2025-05-01ASoC: mediatek: mt8195: use snd_soc_dlc_is_dummy()Kuninori Morimoto1-3/+3
We can use snd_soc_dlc_is_dummy(). Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87a58g8vue.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-01ASoC: mediatek: mt8188: use snd_soc_dlc_is_dummy()Kuninori Morimoto1-3/+3
We can use snd_soc_dlc_is_dummy(). Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87bjsw8vuk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-17ASoC: mediatek: mt8195: Add mt8195-mt6359 cardJulien Massot1-0/+16
Other mt8195-mt6359 cards rely on external codecs, add a card for board that only use the mt6359 codec. Signed-off-by: Julien Massot <julien.massot@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20250417-mt8395-audio-sof-v1-3-30587426e5dd@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-17ASoC: mediatek: mt8195: Set ETDM1/2 IN/OUT to COMP_DUMMY()Julien Massot1-2/+2
ETDM2_IN_BE and ETDM1_OUT_BE are defined as COMP_EMPTY(), in the case the codec dai_name will be null. Avoid a crash if the device tree is not assigning a codec to these links. [ 1.179936] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 1.181065] Mem abort info: [ 1.181420] ESR = 0x0000000096000004 [ 1.181892] EC = 0x25: DABT (current EL), IL = 32 bits [ 1.182576] SET = 0, FnV = 0 [ 1.182964] EA = 0, S1PTW = 0 [ 1.183367] FSC = 0x04: level 0 translation fault [ 1.183983] Data abort info: [ 1.184406] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 1.185097] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 1.185766] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 1.186439] [0000000000000000] user address but active_mm is swapper [ 1.187239] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 1.188029] Modules linked in: [ 1.188420] CPU: 7 UID: 0 PID: 70 Comm: kworker/u32:1 Not tainted 6.14.0-rc4-next-20250226+ #85 [ 1.189515] Hardware name: Radxa NIO 12L (DT) [ 1.190065] Workqueue: events_unbound deferred_probe_work_func [ 1.190808] pstate: 40400009 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 1.191683] pc : __pi_strcmp+0x24/0x140 [ 1.192170] lr : mt8195_mt6359_soc_card_probe+0x224/0x7b0 [ 1.192854] sp : ffff800083473970 [ 1.193271] x29: ffff800083473a10 x28: 0000000000001008 x27: 0000000000000002 [ 1.194168] x26: ffff800082408960 x25: ffff800082417db0 x24: ffff800082417d88 [ 1.195065] x23: 000000000000001e x22: ffff800082dbf480 x21: ffff800082dc07b8 [ 1.195961] x20: 0000000000000000 x19: 0000000000000013 x18: 00000000ffffffff [ 1.196858] x17: 000000040044ffff x16: 005000f2b5503510 x15: 0000000000000006 [ 1.197755] x14: ffff800082407af0 x13: 6e6f69737265766e x12: 692d6b636f6c6374 [ 1.198651] x11: 0000000000000002 x10: ffff80008240b920 x9 : 0000000000000018 [ 1.199547] x8 : 0101010101010101 x7 : 0000000000000000 x6 : 0000000000000000 [ 1.200443] x5 : 0000000000000000 x4 : 8080808080000000 x3 : 303933383978616d [ 1.201339] x2 : 0000000000000000 x1 : ffff80008240b920 x0 : 0000000000000000 [ 1.202236] Call trace: [ 1.202545] __pi_strcmp+0x24/0x140 (P) [ 1.203029] mtk_soundcard_common_probe+0x3bc/0x5b8 [ 1.203644] platform_probe+0x70/0xe8 [ 1.204106] really_probe+0xc8/0x3a0 [ 1.204556] __driver_probe_device+0x84/0x160 [ 1.205104] driver_probe_device+0x44/0x130 [ 1.205630] __device_attach_driver+0xc4/0x170 [ 1.206189] bus_for_each_drv+0x8c/0xf8 [ 1.206672] __device_attach+0xa8/0x1c8 [ 1.207155] device_initial_probe+0x1c/0x30 [ 1.207681] bus_probe_device+0xb0/0xc0 [ 1.208165] deferred_probe_work_func+0xa4/0x100 [ 1.208747] process_one_work+0x158/0x3e0 [ 1.209254] worker_thread+0x2c4/0x3e8 [ 1.209727] kthread+0x134/0x1f0 [ 1.210136] ret_from_fork+0x10/0x20 [ 1.210589] Code: 54000401 b50002c6 d503201f f86a6803 (f8408402) [ 1.211355] ---[ end trace 0000000000000000 ]--- Signed-off-by: Julien Massot <julien.massot@collabora.com> Fixes: e70b8dd26711 ("ASoC: mediatek: mt8195: Remove afe-dai component and rework codec link") Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20250417-mt8395-audio-sof-v1-2-30587426e5dd@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-17ASoC: mediatek: mt8195: Move rt5682 specific dapm routesJulien Massot1-5/+14
'HPOL', 'HPOR', and 'Headset Mic' are rt5682 specific, move these routes to mt8195_rt5682_init so we keep 'mt8195_rt5682_routes' for connection between mt8195 and mt6359. Signed-off-by: Julien Massot <julien.massot@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20250417-mt8395-audio-sof-v1-1-30587426e5dd@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-18ASoC: Convert to modern PM macrosMark Brown10-37/+36
Merge series from Takashi Iwai <tiwai@suse.de>: This is a revised series of small and trivial patches to convert to the newer PM macros, e.g. from SET_RUNTIME_PM_OPS() to RUNTIME_PM_OPS(). The conversions are systematic, and we could reduce messy __maybe_unused and ifdefs with those changes. Merely code refactoring, and shouldn't change the actual driver behavior.
2025-03-17Allow retrieving accessory detection reference onMark Brown3-1/+62
Merge series from "Nícolas F. R. A. Prado" <nfraprado@collabora.com>: This series enables the MT8188-MT6359 sound driver to retrieve the MT6359 ACCDET sound component from a mediatek,accdet DT property, which allows detecting jack insertion/removal. Patch 1 describes the new property in the binding. Patch 2 implements the sound component retrieval in the common MTK soundcard driver. Patch 4 updates the MT8188-MT6359 sound driver to register the audio jack and initialize the ACCDET driver for detection, if the property is present. Patch 3 adds a stub to prevent a linker failure in case the MT6359-ACCDET config is disabled. Tested on the Genio 700 EVK board.
2025-03-17ASoC: mediatek: mt8365: Convert to RUNTIME_PM_OPS() & coTakashi Iwai1-10/+9
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us to drop ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-73-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17ASoC: mediatek: mt8195: Convert to RUNTIME_PM_OPS()Takashi Iwai1-3/+3
Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-72-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17ASoC: mediatek: mt8192: Convert to RUNTIME_PM_OPS()Takashi Iwai1-3/+3
Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-71-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17ASoC: mediatek: mt8188: Convert to RUNTIME_PM_OPS()Takashi Iwai1-3/+3
Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-70-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17ASoC: mediatek: mt8186: Convert to RUNTIME_PM_OPS()Takashi Iwai1-3/+3
Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-69-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17ASoC: mediatek: mt8183: Convert to RUNTIME_PM_OPS()Takashi Iwai1-3/+3
Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-68-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17ASoC: mediatek: mt8173: Convert to RUNTIME_PM_OPS()Takashi Iwai1-3/+3
Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-67-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17ASoC: mediatek: mt7986: Convert to RUNTIME_PM_OPS()Takashi Iwai1-3/+3
Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-66-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17ASoC: mediatek: mt6797: Convert to RUNTIME_PM_OPS()Takashi Iwai1-3/+3
Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-65-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17ASoC: mediatek: mt2701: Convert to RUNTIME_PM_OPS()Takashi Iwai1-3/+3
Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-64-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17ASoC: mt8365: remove unnecessary NULL check before clk_disable_unprepare()Chen Ni1-2/+1
clk_disable_unprepare() already checks NULL by using IS_ERR_OR_NULL. Remove unneeded NULL check for clk here. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://patch.msgid.link/20250312032600.1235158-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17ASoC: mediatek: mt8188-mt6359: Add accdet headset jack detect supportNícolas F. R. A. Prado1-0/+43
Enable headset jack detection for MT8188 platforms that use the MT6359 ACCDET block for it, indicated by the mediatek,accdet property in DT. For those platforms, register a jack and initialize the ACCDET block to report jack events through it. Co-developed-by: Zoran Zhan <zoran.zhan@mediatek.com> Signed-off-by: Zoran Zhan <zoran.zhan@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://patch.msgid.link/20250306-mt8188-accdet-v3-4-7828e835ff4b@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17ASoC: mediatek: common: Handle mediatek,accdet propertyNícolas F. R. A. Prado2-1/+19
Handle the optional mediatek,accdet property. When present, retrieve the sound component from its phandle, so the machine sound driver can use it to register the audio jack and initialize the MT6359 ACCDET for jack detection. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://patch.msgid.link/20250306-mt8188-accdet-v3-2-7828e835ff4b@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt8365-dai-pcm: use inclusive language for ↵Kuninori Morimoto1-2/+2
SND_SOC_DAIFMT_CBx_CFx In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87cyf58ox6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt8365-dai-i2s: use inclusive language for ↵Kuninori Morimoto1-6/+6
SND_SOC_DAIFMT_CBx_CFx In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87eczl8oxa.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt8365-mt6357: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto1-1/+1
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87frk18oxe.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt8195-mt6359: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto1-6/+6
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87h64h8oxh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt8192-mt6359-rt1015-rt5682: use inclusive language for ↵Kuninori Morimoto1-1/+1
SND_SOC_DAIFMT_CBx_CFx In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87ikox8oxk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt8186-mt6366: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto1-1/+1
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87jz9d8oxo.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt8183-mt6358-ts3a227-max98357: use inclusive language for ↵Kuninori Morimoto1-2/+2
SND_SOC_DAIFMT_CBx_CFx In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87ldtt8oxs.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt8183-da7219-max98357: use inclusive language for ↵Kuninori Morimoto1-1/+1
SND_SOC_DAIFMT_CBx_CFx In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87mse98oxv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt8173-rt5650-rt5514: use inclusive language for ↵Kuninori Morimoto1-1/+1
SND_SOC_DAIFMT_CBx_CFx In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87o6yp8oxy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt8173-rt5650-rt5676: use inclusive language for ↵Kuninori Morimoto1-2/+2
SND_SOC_DAIFMT_CBx_CFx In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87plj58oy2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt8173-max98090: use inclusive language for ↵Kuninori Morimoto1-1/+1
SND_SOC_DAIFMT_CBx_CFx In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87r03l8oy8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt8173-rt5650: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto1-1/+1
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87seo18oyd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt7986-dai-etdm: use inclusive language for ↵Kuninori Morimoto1-2/+2
SND_SOC_DAIFMT_CBx_CFx In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87tt8h8oyh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt7986-wm8960: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto1-1/+1
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87v7sx8oyl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt2701-cs42448: use inclusive language for ↵Kuninori Morimoto1-4/+4
SND_SOC_DAIFMT_CBx_CFx In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87wmdd8oyp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: mediatek: mt2701-wm8960: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto1-1/+1
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87y0xt8oyt.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-27ASoC: mediatek: mt8188: avoid uninitialized variable useArnd Bergmann1-0/+1
The 'msk' variable has no initialization: sound/soc/mediatek/mt8188/mt8188-dai-dmic.c:311:4: error: variable 'msk' is uninitialized when used here [-Werror,-Wuninitialized] 311 | msk |= PWR2_TOP_CON1_DMIC_FIFO_SOFT_RST_EN(i); | ^~~ Set it to zero before the loop. Fixes: c1e42ec04197 ("ASoC: mediatek: mt8188: Add support for DMIC") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://patch.msgid.link/20250227131939.1040168-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-25ASoC: mediatek: mt8188-mt6359: Add DMIC supportNícolas F. R. A. Prado1-0/+14
Add the DMIC backend, which connects to the DMIC DAI in the platform driver, as well as a "AP DMIC" mic widget. On the Genio 700 EVK board the dual DMIC on-board are wired through that DMIC DAI. Co-developed-by: parkeryang <Parker.Yang@mediatek.com> Signed-off-by: parkeryang <Parker.Yang@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://patch.msgid.link/20250225-genio700-dmic-v2-5-3076f5b50ef7@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-25ASoC: mediatek: mt8188: Add support for DMICparkeryang5-2/+723
Add support for the DMIC DAIs present on the MT8188 SoC. To achieve that, add a DAI driver for DMIC and register it during probe, and describe the AFE routes that connect the DMIC (I004-I011) to the UL9 frontend (O002-O009). Signed-off-by: parkeryang <Parker.Yang@mediatek.com> Co-developed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20250225-genio700-dmic-v2-4-3076f5b50ef7@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-25ASoC: mediatek: mt8188: Treat DMIC_GAINx_CUR as non-volatileNícolas F. R. A. Prado1-4/+0
The DMIC_GAINx_CUR registers contain the current (as in present) gain of each DMIC. During capture, this gain will ramp up until a target value is reached, and therefore the register is volatile since it is updated automatically by hardware. However, after capture the register's value returns to the value that was written to it. So reading these registers returns the current gain, and writing configures the initial gain for every capture. >From an audio configuration perspective, reading the instantaneous gain is not really useful. Instead, reading back the initial gain that was configured is the desired behavior. For that reason, consider the DMIC_GAINx_CUR registers as non-volatile, so the regmap's cache can be used to retrieve the values, rather than requiring pm runtime resuming the device. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20250225-genio700-dmic-v2-3-3076f5b50ef7@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-25ASoC: mediatek: mt8188: Add reference for dmic clocksNícolas F. R. A. Prado2-0/+16
Add the names for the dmic clocks, aud_afe_dmic* and aud_dmic_hires*, so they can be acquired and enabled by the platform driver. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20250225-genio700-dmic-v2-2-3076f5b50ef7@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-25ASoC: mediatek: mt8188: Add audsys hires clocksNícolas F. R. A. Prado2-0/+8
Describe and register the aud_dmic_hires audsys clocks, which are needed when recording the DMIC at a sample rate of 96k. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20250225-genio700-dmic-v2-1-3076f5b50ef7@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-06ASoC: mediatek: mt8186: Remove unused mt8186_afe_(suspend|resume)_clockDr. David Alan Gilbert2-57/+0
mt8186_afe_resume_clock() and mt8186_afe_suspend_clock() were added in 2022 by commit 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control in platform driver") but have remained unused. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20250206014028.237423-1-linux@treblig.org Signed-off-by: Mark Brown <broonie@kernel.org>