[PATCH 7/8] ASoC: soc-component: Fix return type of snd_soc_pcm_component_pointer()

From: Amadeusz Sławiński

Date: Wed Oct 14 2026 - 16:13:01 EST


Both caller and pointer callback expect the return value to be
snd_pcm_uframes_t, however it was defined incorrectly leading to
potential truncation of returned value.

Fixes: 0035e2565b93 ("ASoC: soc-component: add snd_soc_pcm_component_pointer()")
Signed-off-by: Amadeusz Sławiński <amade@xxxxxxxxxx>
---
include/sound/soc-component.h | 2 +-
sound/soc/soc-component.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index ac5e9412582e..ba860e28eec1 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -432,7 +432,7 @@ int snd_soc_component_compr_set_metadata(struct snd_compr_stream *cstream,
int snd_soc_component_compr_get_metadata(struct snd_compr_stream *cstream,
struct snd_compr_metadata *metadata);

-int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream);
+snd_pcm_uframes_t snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream);
int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream,
unsigned int cmd, void *arg);
int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream);
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 34efb270ce29..746fa4f54450 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -920,7 +920,7 @@ int snd_soc_component_test_bits(struct snd_soc_component *component,
}
EXPORT_SYMBOL_GPL(snd_soc_component_test_bits);

-int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream)
+snd_pcm_uframes_t snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct snd_soc_component *component;
--
2.56.0