Using 256fs or 512fs will result in distortion of 24-bit
audio samples. This is because the lrclk generated is not
proper. Using 384 fs generates proper output.
Signed-off-by: Giridhar Maruthy <giridhar.maruthy@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
*/
#include "../codecs/wm8994.h"
+#include <sound/pcm_params.h>
/*
* Default CFG switch settings to use this driver:
int ret;
/* AIF1CLK should be >=3MHz for optimal performance */
- if (params_rate(params) == 8000 || params_rate(params) == 11025)
+ if (params_format(params) == SNDRV_PCM_FORMAT_S24_LE)
+ pll_out = params_rate(params) * 384;
+ else if (params_rate(params) == 8000 || params_rate(params) == 11025)
pll_out = params_rate(params) * 512;
else
pll_out = params_rate(params) * 256;