Thread (5 messages) 5 messages, 2 authors, 25d ago

[PATCH 2/2] ASoC: mediatek: common: Propagate PCM buffer errors

flat view
COLD25d

From: <hidden>
Date: 2026-09-10 11:44:12
Also in: linux-mediatek, linux-sound, lkml
Subsystem: sound, sound - soc layer / dynamic audio power management (asoc), the rest · Maintainers: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown, Linus Torvalds

From: bui duc phuc <redacted>

mtk_afe_pcm_new() currently ignores the return value of
snd_pcm_set_managed_buffer_all().

Return the error to the ASoC core.

Signed-off-by: bui duc phuc <redacted>
---
 sound/soc/mediatek/common/mtk-afe-platform-driver.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/soc/mediatek/common/mtk-afe-platform-driver.c b/sound/soc/mediatek/common/mtk-afe-platform-driver.c
index c1869b38c9e7..84218d137143 100644
--- a/sound/soc/mediatek/common/mtk-afe-platform-driver.c
+++ b/sound/soc/mediatek/common/mtk-afe-platform-driver.c
@@ -151,11 +151,10 @@ int mtk_afe_pcm_new(struct snd_soc_component *component,
 	struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
 
 	size = afe->mtk_afe_hardware->buffer_bytes_max;
-	snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, afe->dev,
-				       afe->preallocate_buffers ? size : 0,
-				       size);
 
-	return 0;
+	return snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, afe->dev,
+					      afe->preallocate_buffers ? size : 0,
+					      size);
 }
 EXPORT_SYMBOL_GPL(mtk_afe_pcm_new);
 
-- 
2.43.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help