From 2afc23d3a67df6a1ee0bf76bd6e66a9317dc2260 Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Tue, 12 Apr 2016 15:26:43 +0800 Subject: [PATCH] MLK-12745-2: ASoC: fsl_esai: remove the channel swap workaround for imx6ull In imx6ull, the esai errata ERR008000 for imx6q/dl is fixed, so remove the workaround from imx6ull. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_esai.c | 16 +++++++++++----- sound/soc/fsl/imx-cs42888.c | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index dc7be8158a9b..4e2b3c0a08e2 100644 --- a/sound/soc/fsl/fsl_esai.c +++ b/sound/soc/fsl/fsl_esai.c @@ -1,7 +1,7 @@ /* * Freescale ESAI ALSA SoC Digital Audio Interface (DAI) driver * - * Copyright (C) 2014-2015 Freescale Semiconductor, Inc. + * Copyright (C) 2014-2016 Freescale Semiconductor, Inc. * * This file is licensed under the terms of the GNU General Public License * version 2. This program is licensed "as is" without any warranty of any @@ -983,10 +983,15 @@ static int fsl_esai_probe(struct platform_device *pdev) esai_priv->dma_params_tx.addr = res->start + REG_ESAI_ETDR; esai_priv->dma_params_rx.addr = res->start + REG_ESAI_ERDR; - esai_priv->dma_params_tx.check_xrun = fsl_esai_check_xrun; - esai_priv->dma_params_rx.check_xrun = fsl_esai_check_xrun; - esai_priv->dma_params_tx.device_reset = fsl_esai_reset; - esai_priv->dma_params_rx.device_reset = fsl_esai_reset; + /* From imx6ull, the channel swap issue in underrun/overrun is + * fixed in hardware. So remove the workaround. + */ + if (!of_device_is_compatible(pdev->dev.of_node, "fsl,imx6ull-esai")) { + esai_priv->dma_params_tx.check_xrun = fsl_esai_check_xrun; + esai_priv->dma_params_rx.check_xrun = fsl_esai_check_xrun; + esai_priv->dma_params_tx.device_reset = fsl_esai_reset; + esai_priv->dma_params_rx.device_reset = fsl_esai_reset; + } esai_priv->synchronous = of_property_read_bool(np, "fsl,esai-synchronous"); @@ -1041,6 +1046,7 @@ static int fsl_esai_probe(struct platform_device *pdev) } static const struct of_device_id fsl_esai_dt_ids[] = { + { .compatible = "fsl,imx6ull-esai", }, { .compatible = "fsl,imx35-esai", }, { .compatible = "fsl,vf610-esai", }, {} diff --git a/sound/soc/fsl/imx-cs42888.c b/sound/soc/fsl/imx-cs42888.c index f0f2bf461672..8bdb1709be26 100644 --- a/sound/soc/fsl/imx-cs42888.c +++ b/sound/soc/fsl/imx-cs42888.c @@ -332,6 +332,7 @@ static int imx_cs42888_probe(struct platform_device *pdev) } priv->mclk_freq = clk_get_rate(codec_clk); + priv->is_codec_master = false; if (of_property_read_bool(pdev->dev.of_node, "codec-master")) priv->is_codec_master = true; -- 2.17.1