History log of /openbmc/linux/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c (Results 1 – 9 of 9)
Revision Date Author Comments
# 0627ba94 01-Aug-2024 YR Yang <yr.yang@mediatek.com>

ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile

[ Upstream commit ff9f065318e17a1a97981d9e535fcfc6ce5d5614 ]

Add AFE Control Register 0 to the volatile_register.
AFE_DAC_CON0 can be

ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile

[ Upstream commit ff9f065318e17a1a97981d9e535fcfc6ce5d5614 ]

Add AFE Control Register 0 to the volatile_register.
AFE_DAC_CON0 can be modified by both the SOF and ALSA drivers.
If this register is read and written in cache mode, the cached value
might not reflect the actual value when the register is modified by
another driver. It can cause playback or capture failures. Therefore,
it is necessary to add AFE_DAC_CON0 to the list of volatile registers.

Signed-off-by: YR Yang <yr.yang@mediatek.com>
Reviewed-by: Fei Shao <fshao@chromium.org>
Reviewed-by: Trevor Wu <trevor.wu@mediatek.com>
Link: https://patch.msgid.link/20240801084326.1472-1-yr.yang@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


# fd996523 29-Jun-2023 Trevor Wu <trevor.wu@mediatek.com>

ASoC: mediatek: mt8188: add memory-region support

In certain projects, it is necessary to utilize the reserved memory
region for audio dma. The patch takes into account the dts property
'memory-regi

ASoC: mediatek: mt8188: add memory-region support

In certain projects, it is necessary to utilize the reserved memory
region for audio dma. The patch takes into account the dts property
'memory-region', allowing for the specification of memory for afe memif
through device tree.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Link: https://lore.kernel.org/r/20230629074348.21670-2-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>

show more ...


# fd67a7a1 31-May-2023 Trevor Wu <trevor.wu@mediatek.com>

ASoC: mediatek: mt8188: fix use-after-free in driver remove path

During mt8188_afe_init_clock(), mt8188_audsys_clk_register() was called
followed by several other devm functions. The caller of
mt818

ASoC: mediatek: mt8188: fix use-after-free in driver remove path

During mt8188_afe_init_clock(), mt8188_audsys_clk_register() was called
followed by several other devm functions. The caller of
mt8188_afe_init_clock() utilized devm_add_action_or_reset() to call
mt8188_afe_deinit_clock(). However, the order was incorrect, causing a
use-after-free issue during remove time.

At probe time, the order of calls was:
1. mt8188_audsys_clk_register
2. afe_priv->clk = devm_kcalloc
3. afe_priv->clk[i] = devm_clk_get

At remove time, the order of calls was:
1. mt8188_audsys_clk_unregister
3. free afe_priv->clk[i]
2. free afe_priv->clk

To resolve the problem, it's necessary to move devm_add_action_or_reset()
to the appropriate position so that the remove order can be 3->2->1.

Fixes: f6b026479b13 ("ASoC: mediatek: mt8188: support audio clock control")
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230601033318.10408-2-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>

show more ...


# fb167449 09-May-2023 Trevor Wu <trevor.wu@mediatek.com>

ASoC: mediatek: mt8188: add bus protection

Add bus protection for reset controller.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com
Link: https://lore.kernel.org/r/20230510035526.18137-7-trevor.wu

ASoC: mediatek: mt8188: add bus protection

Add bus protection for reset controller.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com
Link: https://lore.kernel.org/r/20230510035526.18137-7-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org

show more ...


# e9eab4be 09-May-2023 Trevor Wu <trevor.wu@mediatek.com>

ASoC: mediatek: mt8188: combine afe component registration

There is no benefit to separate two components for AFE, so DAI driver
registration is moved to dev_snd_soc_register_component to merge thes

ASoC: mediatek: mt8188: combine afe component registration

There is no benefit to separate two components for AFE, so DAI driver
registration is moved to dev_snd_soc_register_component to merge these
two components.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com
Link: https://lore.kernel.org/r/20230510035526.18137-6-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org

show more ...


# bb5ba5fe 15-Mar-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ASoC: mediatek: mt8188-afe-pcm: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's pos

ASoC: mediatek: mt8188-afe-pcm: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Trevor Wu <trevor.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20230315150745.67084-112-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>

show more ...


# aa326917 26-Jan-2023 Dan Carpenter <error27@gmail.com>

ASoC: mediatek: mt8188: remove some dead code

We know that "irq < 0", so delete the unnecessary check.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <ange

ASoC: mediatek: mt8188: remove some dead code

We know that "irq < 0", so delete the unnecessary check.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/Y9JHSwcfdNcfMjjt@kili
Signed-off-by: Mark Brown <broonie@kernel.org>

show more ...


# da387d32 15-Jan-2023 Trevor Wu <trevor.wu@mediatek.com>

ASoC: mediatek: mt8188: add control for timing select

Add mixer control for irq and memif timing selection.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno

ASoC: mediatek: mt8188: add control for timing select

Add mixer control for irq and memif timing selection.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230116034131.23943-10-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>

show more ...


# bf106bf0 15-Jan-2023 Trevor Wu <trevor.wu@mediatek.com>

ASoC: mediatek: mt8188: add platform driver

Add mt8188 platform driver.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.or

ASoC: mediatek: mt8188: add platform driver

Add mt8188 platform driver.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20230116034131.23943-9-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>

show more ...