]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00218774 ESAI ASRC: fix multi channel p2pplayback bug
authorChen Liangjun <b36089@freescale.com>
Mon, 30 Jul 2012 06:55:39 +0000 (14:55 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:07 +0000 (08:35 +0200)
ASRC driver would configure ASRC as ideal ratio mode for p2p playback.
However, multi channel convert can't work well with ideal ratio mode.

In this patch, change ASRC p2p playbck mode to internal ratio mode to
better support multi channel p2p playback.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
drivers/mxc/asrc/mxc_asrc.c

index f67274fccf5481da046b395f4d7893028d72e6c4..cf41f29942264074553525a4ab0904c0876a6a94 100644 (file)
@@ -586,21 +586,14 @@ int asrc_config_pair(struct asrc_config *config)
        if ((config->inclk == INCLK_ASRCK1_CLK) &&
                        (config->outclk == OUTCLK_ESAI_TX)) {
                reg = __raw_readl(g_asrc->vaddr + ASRC_ASRCTR_REG);
-               reg &= ~(1 << (20 + config->pair));
-               reg |= (0x03 << (13 + (config->pair << 1)));
+               reg |= (1 << (20 + config->pair));
+               reg |= (0x02 << (13 + (config->pair << 1)));
                __raw_writel(reg, g_asrc->vaddr + ASRC_ASRCTR_REG);
                err = asrc_set_clock_ratio(config->pair,
                                           config->input_sample_rate,
                                           config->output_sample_rate);
                if (err < 0)
                        return err;
-
-               err = asrc_set_process_configuration(config->pair,
-                                                    config->input_sample_rate,
-                                                    config->
-                                                    output_sample_rate);
-               if (err < 0)
-                       return err;
        }
 
        /* Config input and output wordwidth */