[PATCH 1/3] ASoC: google: Fix frame size calculation in pointer callback
From: phucduc . bui
Date: Thu Oct 29 2026 - 04:03:05 EST
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
runtime->frame_bits is the number of bits in a frame, so converting it
to bytes requires dividing by 8, not multiplying.
Fixes: 702648721db5 ("ASoC: Add Google Chameleon v3 i2s driver")
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/google/chv3-i2s.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/google/chv3-i2s.c b/sound/soc/google/chv3-i2s.c
index fd12cedfe1c9..6353b2a079cd 100644
--- a/sound/soc/google/chv3-i2s.c
+++ b/sound/soc/google/chv3-i2s.c
@@ -234,7 +234,7 @@ static snd_pcm_uframes_t chv3_dma_pointer(struct snd_soc_component *component,
u32 frame_bytes, buffer_bytes;
u32 idx_bytes;
- frame_bytes = substream->runtime->frame_bits * 8;
+ frame_bytes = substream->runtime->frame_bits / 8;
buffer_bytes = snd_pcm_lib_buffer_bytes(substream);
if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) {
--
2.43.0