Merge "asoc: fix silence data during concurrent capture" into audio-drivers.lnx.2.0
diff --git a/asoc/codecs/wcd934x/wcd934x.c b/asoc/codecs/wcd934x/wcd934x.c
index aa4afdc..c800e95 100644
--- a/asoc/codecs/wcd934x/wcd934x.c
+++ b/asoc/codecs/wcd934x/wcd934x.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -8742,7 +8742,7 @@
.rate_min = 8000,
.rate_max = 192000,
.channels_min = 1,
- .channels_max = 4,
+ .channels_max = 8,
},
.ops = &tavil_dai_ops,
},
diff --git a/asoc/msm-audio-effects-q6-v2.c b/asoc/msm-audio-effects-q6-v2.c
index 5bab856..c8532df 100644
--- a/asoc/msm-audio-effects-q6-v2.c
+++ b/asoc/msm-audio-effects-q6-v2.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2017, 2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -11,6 +11,7 @@
*/
#include <linux/slab.h>
+#include <linux/ratelimit.h>
#include <sound/compress_params.h>
#include <sound/devdep_params.h>
#include <dsp/apr_audio-v2.h>
@@ -22,7 +23,8 @@
#define GET_NEXT(ptr, upper_limit, rc) \
({ \
if (((ptr) + 1) > (upper_limit)) { \
- pr_err("%s: param list out of boundary\n", __func__); \
+ pr_err_ratelimited("%s: param list out of boundary\n", \
+ __func__); \
(rc) = -EINVAL; \
} \
((rc) == 0) ? *(ptr)++ : -EINVAL; \
@@ -31,7 +33,8 @@
#define CHECK_PARAM_LEN(len, max_len, tag, rc) \
do { \
if ((len) > (max_len)) { \
- pr_err("%s: params length overflows\n", (tag)); \
+ pr_err_ratelimited("%s: params length overflows\n", \
+ (tag)); \
(rc) = -EINVAL; \
} \
} while (0)
@@ -266,7 +269,8 @@
}
break;
default:
- pr_err("%s: Invalid command to set config\n", __func__);
+ pr_err_ratelimited("%s: Invalid command to set config\n",
+ __func__);
break;
}
}
@@ -747,7 +751,8 @@
}
break;
default:
- pr_err("%s: Invalid command to set config\n", __func__);
+ pr_err_ratelimited("%s: Invalid command to set config\n",
+ __func__);
break;
}
}
@@ -893,7 +898,8 @@
}
break;
default:
- pr_err("%s: Invalid command to set config\n", __func__);
+ pr_err_ratelimited("%s: Invalid command to set config\n",
+ __func__);
break;
}
}
@@ -1013,7 +1019,8 @@
}
break;
default:
- pr_err("%s: Invalid command to set config\n", __func__);
+ pr_err_ratelimited("%s: Invalid command to set config\n",
+ __func__);
break;
}
}
@@ -1254,7 +1261,8 @@
}
break;
default:
- pr_err("%s: Invalid command to set config\n", __func__);
+ pr_err_ratelimited("%s: Invalid command to set config\n",
+ __func__);
break;
}
}
@@ -1410,7 +1418,7 @@
}
break;
default:
- pr_err("%s: Invalid command id: %d to set config\n",
+ pr_err_ratelimited("%s: Invalid command id: %d to set config\n",
__func__, command_id);
break;
}
diff --git a/asoc/msm-pcm-q6-v2.c b/asoc/msm-pcm-q6-v2.c
index 6951dff..e49f5d7 100644
--- a/asoc/msm-pcm-q6-v2.c
+++ b/asoc/msm-pcm-q6-v2.c
@@ -75,7 +75,7 @@
.rate_min = 8000,
.rate_max = 384000,
.channels_min = 1,
- .channels_max = 4,
+ .channels_max = 8,
.buffer_bytes_max = CAPTURE_MAX_NUM_PERIODS *
CAPTURE_MAX_PERIOD_SIZE,
.period_bytes_min = CAPTURE_MIN_PERIOD_SIZE,
diff --git a/asoc/msm-pcm-routing-v2.c b/asoc/msm-pcm-routing-v2.c
index bab28d1..18d805e 100644
--- a/asoc/msm-pcm-routing-v2.c
+++ b/asoc/msm-pcm-routing-v2.c
@@ -17463,6 +17463,12 @@
uint32_t be_idx = ucontrol->value.integer.value[0];
int i;
+ if (be_idx < 0 || be_idx >= MSM_BACKEND_DAI_MAX) {
+ pr_err("%s: Invalid Backend ID %d\n",
+ __func__, be_idx);
+ return -EINVAL;
+ }
+
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++) {
channel_map[i] = (char)(ucontrol->value.integer.value[i + 1]);
if (channel_map[i] > PCM_MAX_CHMAP_ID) {