MLK-19797 sound: asoc: fix clk_div computed value
When clk_div is computed, the K factor from documentation is ignored. It happened to work on medium quality because the K factor was 1. Now the clk_div is computed accordingly to the documentation. Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>pull/10/head
parent
51c16110d5
commit
456406762c
|
@ -749,18 +749,18 @@ static inline int get_pdm_clk(struct fsl_micfil *micfil,
|
|||
|
||||
switch (qsel) {
|
||||
case MICFIL_HIGH_QUALITY:
|
||||
bclk = rate * 8 * osr;
|
||||
bclk = rate * 8 * osr / 2; /* kfactor = 0.5 */
|
||||
break;
|
||||
case MICFIL_MEDIUM_QUALITY:
|
||||
case MICFIL_VLOW0_QUALITY:
|
||||
bclk = rate * 4 * osr;
|
||||
bclk = rate * 4 * osr * 1; /* kfactor = 1 */
|
||||
break;
|
||||
case MICFIL_LOW_QUALITY:
|
||||
case MICFIL_VLOW1_QUALITY:
|
||||
bclk = rate * 2 * osr;
|
||||
bclk = rate * 2 * osr * 2; /* kfactor = 2 */
|
||||
break;
|
||||
case MICFIL_VLOW2_QUALITY:
|
||||
bclk = rate * osr;
|
||||
bclk = rate * osr * 4; /* kfactor = 4 */
|
||||
break;
|
||||
default:
|
||||
dev_err(&micfil->pdev->dev,
|
||||
|
|
Loading…
Reference in New Issue