All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ASoC: google: Fix bugs in Chameleon v3 I2S driver
@ 2026-10-29  8:01 phucduc.bui
  2026-10-29  8:01 ` [PATCH 1/3] ASoC: google: Fix frame size calculation in pointer callback phucduc.bui
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: phucduc.bui @ 2026-10-29  8:01 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Paweł Anikiel,
	Kuninori Morimoto, linux-sound, linux-kernel, bui duc phuc

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

Hi all,

This series fixes a frame size calculation bug, preserves IRQ error codes, 
and removes a redundant error message in the Chameleon v3 I2S driver.

Compile-tested only.

Best regards,
Phuc

bui duc phuc (3):
  ASoC: google: Fix frame size calculation in pointer callback
  ASoC: google: Propagate platform_get_irq() errors
  ASoC: google: Remove redundant error message

 sound/soc/google/chv3-i2s.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] ASoC: google: Fix frame size calculation in pointer callback
  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
  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
  2 siblings, 0 replies; 4+ messages in thread
From: phucduc.bui @ 2026-10-29  8:01 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Paweł Anikiel,
	Kuninori Morimoto, linux-sound, linux-kernel, bui duc phuc

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] ASoC: google: Propagate platform_get_irq() errors
  2026-10-29  8:01 [PATCH 0/3] ASoC: google: Fix bugs in Chameleon v3 I2S driver phucduc.bui
  2026-10-29  8:01 ` [PATCH 1/3] ASoC: google: Fix frame size calculation in pointer callback phucduc.bui
@ 2026-10-29  8:01 ` phucduc.bui
  2026-10-29  8:01 ` [PATCH 3/3] ASoC: google: Remove redundant error message phucduc.bui
  2 siblings, 0 replies; 4+ messages in thread
From: phucduc.bui @ 2026-10-29  8:01 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Paweł Anikiel,
	Kuninori Morimoto, linux-sound, linux-kernel, bui duc phuc

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

platform_get_irq() may return errors other than -ENXIO, including
-EPROBE_DEFER. Return the original error code instead of replacing
it with -ENXIO.

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 6353b2a079cd..ebc352bd9e9b 100644
--- a/sound/soc/google/chv3-i2s.c
+++ b/sound/soc/google/chv3-i2s.c
@@ -303,7 +303,7 @@ static int chv3_i2s_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-		return -ENXIO;
+		return irq;
 	res = devm_request_irq(i2s->dev, irq, chv3_i2s_isr, 0, "chv3-i2s", i2s);
 	if (res)
 		return res;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] ASoC: google: Remove redundant error message
  2026-10-29  8:01 [PATCH 0/3] ASoC: google: Fix bugs in Chameleon v3 I2S driver phucduc.bui
  2026-10-29  8:01 ` [PATCH 1/3] ASoC: google: Fix frame size calculation in pointer callback phucduc.bui
  2026-10-29  8:01 ` [PATCH 2/3] ASoC: google: Propagate platform_get_irq() errors phucduc.bui
@ 2026-10-29  8:01 ` phucduc.bui
  2 siblings, 0 replies; 4+ messages in thread
From: phucduc.bui @ 2026-10-29  8:01 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Paweł Anikiel,
	Kuninori Morimoto, linux-sound, linux-kernel, bui duc phuc

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

Remove the redundant error message when devm_snd_soc_register_component()
fails. The errors handled here are already reported deeper in the
call chain, so the additional dev_err() call is unnecessary.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 sound/soc/google/chv3-i2s.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/google/chv3-i2s.c b/sound/soc/google/chv3-i2s.c
index ebc352bd9e9b..102f931da357 100644
--- a/sound/soc/google/chv3-i2s.c
+++ b/sound/soc/google/chv3-i2s.c
@@ -310,10 +310,8 @@ static int chv3_i2s_probe(struct platform_device *pdev)
 
 	res = devm_snd_soc_register_component(&pdev->dev, &chv3_i2s_comp,
 					      &chv3_i2s_dai, 1);
-	if (res) {
-		dev_err(&pdev->dev, "couldn't register component: %d\n", res);
+	if (res)
 		return res;
-	}
 
 	return 0;
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-29  8:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29  8:01 [PATCH 0/3] ASoC: google: Fix bugs in Chameleon v3 I2S driver phucduc.bui
2026-10-29  8:01 ` [PATCH 1/3] ASoC: google: Fix frame size calculation in pointer callback phucduc.bui
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

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.