]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00215851 ASRC:fix datawidth type mismatch
authorChen Liangjun <b36089@freescale.com>
Thu, 5 Jul 2012 07:10:14 +0000 (15:10 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:58 +0000 (08:34 +0200)
When ESAI call ASRC for p2p playback. The datawidth may be
changed. The cpu dai would configure the ESAI data width according
to the modified datawidth(output_bits). The type mismatch between output_bits
and cpu dai's switch branch cause cpu dai's hardware parameter set
fail.

Match the type of output_bits to the switch branch in cpu dai's hardware
parameter configuration function.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
sound/soc/imx/imx-esai.c

index daa3a8ae7a11607d4ddd254268c74e844818f7fc..f11757b0e7cc126aedf60828de4167ed71727445 100644 (file)
@@ -320,11 +320,11 @@ static int imx_esai_hw_tx_params(struct snd_pcm_substream *substream,
 
        if (iprtd->asrc_enable) {
                switch (iprtd->output_bit) {
-               case 16:
+               case ASRC_WIDTH_16_BIT:
                        tfcr |= ESAI_WORD_LEN_16;
                        tcr |= ESAI_TCR_TSHFD_MSB | ESAI_TCR_TSWS_STL32_WDL16;
                        break;
-               case 24:
+               case ASRC_WIDTH_24_BIT:
                        tfcr |= ESAI_WORD_LEN_24;
                        tcr |= ESAI_TCR_TSHFD_MSB | ESAI_TCR_TSWS_STL32_WDL24;
                        break;