From: Chen Liangjun Date: Thu, 5 Jul 2012 07:10:14 +0000 (+0800) Subject: ENGR00215851 ASRC:fix datawidth type mismatch X-Git-Tag: v3.0.35-fsl~794 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e919b316d951db4343d5971bffb6b61cd2879d20;p=karo-tx-linux.git ENGR00215851 ASRC:fix datawidth type mismatch 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 --- diff --git a/sound/soc/imx/imx-esai.c b/sound/soc/imx/imx-esai.c index daa3a8ae7a11..f11757b0e7cc 100644 --- a/sound/soc/imx/imx-esai.c +++ b/sound/soc/imx/imx-esai.c @@ -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;