You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/11/22 09:38:22 UTC
[incubator-nuttx] 02/07: drivers: audio: Limit supported rates in cxd56
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit b36d08ef45da3d2c8ac4dc5f8d9aa1a83d4cf199
Author: Tobias Johansson <to...@sony.com>
AuthorDate: Wed Nov 17 11:51:48 2021 +0100
drivers: audio: Limit supported rates in cxd56
Only support the audio sample rate 48kHz when the sample
rate converter is not enabled.
Signed-off-by: Tobias Johansson <to...@sony.com>
---
drivers/audio/cxd56.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/audio/cxd56.c b/drivers/audio/cxd56.c
index 0fea604..753ff3c 100644
--- a/drivers/audio/cxd56.c
+++ b/drivers/audio/cxd56.c
@@ -80,6 +80,7 @@
/* Samplerates field is split into low and high byte */
+#ifdef CONFIG_AUDIO_CXD56_SRC
#define CXD56_SUPP_RATES_L (AUDIO_SAMP_RATE_8K | AUDIO_SAMP_RATE_11K | \
AUDIO_SAMP_RATE_16K | AUDIO_SAMP_RATE_22K | \
AUDIO_SAMP_RATE_32K | AUDIO_SAMP_RATE_44K | \
@@ -87,6 +88,12 @@
#define CXD56_SUPP_RATES_H ((AUDIO_SAMP_RATE_96K | AUDIO_SAMP_RATE_128K | \
AUDIO_SAMP_RATE_192K) >> 8)
#define CXD56_SUPP_RATES (CXD56_SUPP_RATES_L | CXD56_SUPP_RATES_H)
+#else
+/* No sample rate converter, only support system rate of 48kHz */
+#define CXD56_SUPP_RATES_L AUDIO_SAMP_RATE_48K
+#define CXD56_SUPP_RATES_H 0x0
+#define CXD56_SUPP_RATES (CXD56_SUPP_RATES_L | CXD56_SUPP_RATES_H)
+#endif
/* Mic setting definitions */