From b36d08ef45da3d2c8ac4dc5f8d9aa1a83d4cf199 Mon Sep 17 00:00:00 2001 From: Tobias Johansson Date: Wed, 17 Nov 2021 11:51:48 +0100 Subject: [PATCH] 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 --- drivers/audio/cxd56.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/audio/cxd56.c b/drivers/audio/cxd56.c index 0fea60464c..753ff3cfef 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 */