[PATCH v2 4/5] ASoC: qdsp6: q6apm-dai: set correct period size
From: srinivas . kandagatla
Date: Thu Feb 20 2025 - 11:34:23 EST
From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
For some reason we ended up with a period size which is less than 1ms,
DSP does not support such a small fragment size. Adjust this to be in
the range of 16ms to 32ms.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
---
sound/soc/qcom/qdsp6/q6apm-dai.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c
index 7466fe0c661a..049b91fd7a23 100644
--- a/sound/soc/qcom/qdsp6/q6apm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6apm-dai.c
@@ -21,11 +21,11 @@
#define PLAYBACK_MIN_NUM_PERIODS 2
#define PLAYBACK_MAX_NUM_PERIODS 8
#define PLAYBACK_MAX_PERIOD_SIZE 65536
-#define PLAYBACK_MIN_PERIOD_SIZE 128
-#define CAPTURE_MIN_NUM_PERIODS 2
-#define CAPTURE_MAX_NUM_PERIODS 8
-#define CAPTURE_MAX_PERIOD_SIZE 4096
-#define CAPTURE_MIN_PERIOD_SIZE 320
+#define PLAYBACK_MIN_PERIOD_SIZE 6144
+#define CAPTURE_MIN_NUM_PERIODS PLAYBACK_MIN_NUM_PERIODS
+#define CAPTURE_MAX_NUM_PERIODS PLAYBACK_MAX_NUM_PERIODS
+#define CAPTURE_MAX_PERIOD_SIZE PLAYBACK_MAX_PERIOD_SIZE
+#define CAPTURE_MIN_PERIOD_SIZE PLAYBACK_MIN_PERIOD_SIZE
#define BUFFER_BYTES_MAX (PLAYBACK_MAX_NUM_PERIODS * PLAYBACK_MAX_PERIOD_SIZE)
#define BUFFER_BYTES_MIN (PLAYBACK_MIN_NUM_PERIODS * PLAYBACK_MIN_PERIOD_SIZE)
#define COMPR_PLAYBACK_MAX_FRAGMENT_SIZE (128 * 1024)
--
2.39.5