All of lore.kernel.org
 help / color / mirror / Atom feed
From: phucduc.bui@gmail.com
To: Mark Brown <broonie@kernel.org>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Paweł Anikiel" <pan@semihalf.com>,
	"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	"bui duc phuc" <phucduc.bui@gmail.com>
Subject: [PATCH 1/3] ASoC: google: Fix frame size calculation in pointer callback
Date: Thu, 29 Oct 2026 15:01:41 +0700	[thread overview]
Message-ID: <20261029080143.12304-2-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20261029080143.12304-1-phucduc.bui@gmail.com>

From: bui duc phuc <phucduc.bui@gmail.com>

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@gmail.com>
---
 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


  reply	other threads:[~2026-10-29  8:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29  8:01 [PATCH 0/3] ASoC: google: Fix bugs in Chameleon v3 I2S driver phucduc.bui
2026-10-29  8:01 ` phucduc.bui [this message]
2026-10-29  8:01 ` [PATCH 2/3] ASoC: google: Propagate platform_get_irq() errors phucduc.bui
2026-10-29  8:01 ` [PATCH 3/3] ASoC: google: Remove redundant error message phucduc.bui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261029080143.12304-2-phucduc.bui@gmail.com \
    --to=phucduc.bui@gmail.com \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=pan@semihalf.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.