Fix TDM configuration
authorTracy Yi <tracy-yi@ti.com>
Sat, 3 Feb 2018 15:57:19 +0000 (23:57 +0800)
committerTracy Yi <tracy-yi@ti.com>
Sat, 3 Feb 2018 15:57:19 +0000 (23:57 +0800)
Signed-off-by: Tracy Yi <tracy-yi@ti.com>
tas2770-codec.c

index c15c4195552f72cd64a4ce01dfc717f46edc12e8..bab7ab0ea93d0abe15329f56b113e589b465be1f 100644 (file)
@@ -106,7 +106,6 @@ static int tas2770_codec_suspend(struct snd_soc_codec *codec)
        mutex_lock(&pTAS2770->codec_lock);
 
        dev_dbg(pTAS2770->dev, "%s\n", __func__);
        mutex_lock(&pTAS2770->codec_lock);
 
        dev_dbg(pTAS2770->dev, "%s\n", __func__);
-       pTAS2770->runtime_suspend(pTAS2770);
 
        mutex_unlock(&pTAS2770->codec_lock);
        return ret;
 
        mutex_unlock(&pTAS2770->codec_lock);
        return ret;
@@ -120,7 +119,6 @@ static int tas2770_codec_resume(struct snd_soc_codec *codec)
        mutex_lock(&pTAS2770->codec_lock);
 
        dev_dbg(pTAS2770->dev, "%s\n", __func__);
        mutex_lock(&pTAS2770->codec_lock);
 
        dev_dbg(pTAS2770->dev, "%s\n", __func__);
-       pTAS2770->runtime_resume(pTAS2770);
 
        mutex_unlock(&pTAS2770->codec_lock);
        return ret;
 
        mutex_unlock(&pTAS2770->codec_lock);
        return ret;
@@ -229,7 +227,7 @@ static int tas2770_hw_params(struct snd_pcm_substream *substream,
                        TAS2770_TDMConfigurationReg2_RXWLEN32_Mask |
                        TAS2770_TDMConfigurationReg2_RXSLEN10_Mask,
                        TAS2770_TDMConfigurationReg2_RXWLEN32_16Bits |
                        TAS2770_TDMConfigurationReg2_RXWLEN32_Mask |
                        TAS2770_TDMConfigurationReg2_RXSLEN10_Mask,
                        TAS2770_TDMConfigurationReg2_RXWLEN32_16Bits |
-                       TAS2770_TDMConfigurationReg2_RXWLEN32_16Bits);
+                       TAS2770_TDMConfigurationReg2_RXSLEN10_16Bits);
                        pTAS2770->ch_size = 16;
                break;
        case SNDRV_PCM_FORMAT_S24_LE:
                        pTAS2770->ch_size = 16;
                break;
        case SNDRV_PCM_FORMAT_S24_LE:
@@ -238,7 +236,7 @@ static int tas2770_hw_params(struct snd_pcm_substream *substream,
                        TAS2770_TDMConfigurationReg2_RXWLEN32_Mask |
                        TAS2770_TDMConfigurationReg2_RXSLEN10_Mask,
                        TAS2770_TDMConfigurationReg2_RXWLEN32_24Bits  |
                        TAS2770_TDMConfigurationReg2_RXWLEN32_Mask |
                        TAS2770_TDMConfigurationReg2_RXSLEN10_Mask,
                        TAS2770_TDMConfigurationReg2_RXWLEN32_24Bits  |
-                       TAS2770_TDMConfigurationReg2_RXWLEN32_24Bits);
+                       TAS2770_TDMConfigurationReg2_RXSLEN10_32Bits);
                        pTAS2770->ch_size = 32;
                break;
        case SNDRV_PCM_FORMAT_S32_LE:
                        pTAS2770->ch_size = 32;
                break;
        case SNDRV_PCM_FORMAT_S32_LE:
@@ -247,7 +245,7 @@ static int tas2770_hw_params(struct snd_pcm_substream *substream,
                        TAS2770_TDMConfigurationReg2_RXWLEN32_Mask |
                        TAS2770_TDMConfigurationReg2_RXSLEN10_Mask,
                        TAS2770_TDMConfigurationReg2_RXWLEN32_32Bits |
                        TAS2770_TDMConfigurationReg2_RXWLEN32_Mask |
                        TAS2770_TDMConfigurationReg2_RXSLEN10_Mask,
                        TAS2770_TDMConfigurationReg2_RXWLEN32_32Bits |
-                       TAS2770_TDMConfigurationReg2_RXWLEN32_32Bits);
+                       TAS2770_TDMConfigurationReg2_RXSLEN10_32Bits);
                        pTAS2770->ch_size = 32;
                break;
 
                        pTAS2770->ch_size = 32;
                break;