From 13aa980ff1316a7c64659b3b34d65d9deb565a9b Mon Sep 17 00:00:00 2001
From: Eric Laurent <elaurent@google.com>
Date: Wed, 1 Oct 2014 11:21:57 -0700
Subject: [PATCH] ASoC: msm: extend proxy port period count and size range

Allow more choices in proxy port period size and count
for use by telephony use cases

Bug: 17573788.

Signed-off-by: Eric Laurent <elaurent@google.com>
---
 sound/soc/msm/qdsp6v2/msm-pcm-afe-v2.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-afe-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-afe-v2.c
index 2c543a4ad2ac..af19106d58e6 100644
--- a/sound/soc/msm/qdsp6v2/msm-pcm-afe-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-pcm-afe-v2.c
@@ -34,12 +34,12 @@
 
 #define MIN_PLAYBACK_PERIOD_SIZE (128 * 2)
 #define MAX_PLAYBACK_PERIOD_SIZE (128 * 2 * 2 * 6)
-#define MIN_PLAYBACK_NUM_PERIODS (32)
+#define MIN_PLAYBACK_NUM_PERIODS (4)
 #define MAX_PLAYBACK_NUM_PERIODS (384)
 
-#define MIN_CAPTURE_PERIOD_SIZE (128 * 2 * 4)
+#define MIN_CAPTURE_PERIOD_SIZE (128 * 2)
 #define MAX_CAPTURE_PERIOD_SIZE (192 * 2 * 2 * 8 * 4)
-#define MIN_CAPTURE_NUM_PERIODS (32)
+#define MIN_CAPTURE_NUM_PERIODS (4)
 #define MAX_CAPTURE_NUM_PERIODS (384)
 
 static struct snd_pcm_hardware msm_afe_hardware_playback = {
@@ -57,7 +57,7 @@ static struct snd_pcm_hardware msm_afe_hardware_playback = {
 	.channels_min =         1,
 	.channels_max =         6,
 	.buffer_bytes_max =     MAX_PLAYBACK_PERIOD_SIZE *
-				MIN_PLAYBACK_NUM_PERIODS,
+				MAX_PLAYBACK_NUM_PERIODS,
 	.period_bytes_min =     MIN_PLAYBACK_PERIOD_SIZE,
 	.period_bytes_max =     MAX_PLAYBACK_PERIOD_SIZE,
 	.periods_min =          MIN_PLAYBACK_NUM_PERIODS,
@@ -80,7 +80,7 @@ static struct snd_pcm_hardware msm_afe_hardware_capture = {
 	.channels_min =         1,
 	.channels_max =         6,
 	.buffer_bytes_max =     MAX_CAPTURE_PERIOD_SIZE *
-				MIN_CAPTURE_NUM_PERIODS,
+				MAX_CAPTURE_NUM_PERIODS,
 	.period_bytes_min =     MIN_CAPTURE_PERIOD_SIZE,
 	.period_bytes_max =     MAX_CAPTURE_PERIOD_SIZE,
 	.periods_min =          MIN_CAPTURE_NUM_PERIODS,
-- 
GitLab