mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: test-component: Support continuous rates for test component
@ 2024-11-12 10:34 John Watts
  2024-11-13  4:35 ` Kuninori Morimoto
  2024-11-13 13:03 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: John Watts @ 2024-11-12 10:34 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
  Cc: linux-sound, linux-kernel, John Watts

There's no reason to limit the supported rates of the test component
to specific ones as if it's a real piece of hardware. Set the rates to
continuous to aid in testing different rates.

Signed-off-by: John Watts <contact@jookia.org>
---
I've needed to use this while testing audio-graph-card2 with a variable
MCLK. I'm not sure if there's a reason why it's not continous already but this
patch seems to work well enough from my test results.
---
 sound/soc/generic/test-component.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/generic/test-component.c b/sound/soc/generic/test-component.c
index e9e5e235a8a659cabffee7acd747a68bd45f177f..e675b69109a8cf39e2462db8006daf6dbe75840b 100644
--- a/sound/soc/generic/test-component.c
+++ b/sound/soc/generic/test-component.c
@@ -233,7 +233,7 @@ static const struct snd_soc_dai_ops test_verbose_ops = {
 	.num_auto_selectable_formats	= 1,
 };
 
-#define STUB_RATES	SNDRV_PCM_RATE_8000_384000
+#define STUB_RATES	SNDRV_PCM_RATE_CONTINUOUS
 #define STUB_FORMATS	(SNDRV_PCM_FMTBIT_S8		| \
 			 SNDRV_PCM_FMTBIT_U8		| \
 			 SNDRV_PCM_FMTBIT_S16_LE	| \

---
base-commit: 98f7e32f20d28ec452afb208f9cffc08448a2652
change-id: 20241112-alsa_test_rates-00dab3465bbc

Best regards,
-- 
John Watts <contact@jookia.org>


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

end of thread, other threads:[~2024-11-13 13:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-12 10:34 [PATCH] ASoC: test-component: Support continuous rates for test component John Watts
2024-11-13  4:35 ` Kuninori Morimoto
2024-11-13 13:03 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®