ASoC: Intel: atom: fix frame polarity
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thu, 26 Jan 2017 20:09:29 +0000 (14:09 -0600)
committerMark Brown <broonie@kernel.org>
Tue, 31 Jan 2017 19:56:20 +0000 (19:56 +0000)
The current frame sync polarity definitions are inconsistent in the
Atom/DPCM driver, fix to align with regular ASoC definitions and
update code in platform and machine drivers for RT5640 and RT5651.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/atom/sst-atom-controls.c
sound/soc/intel/boards/bytcr_rt5640.c
sound/soc/intel/boards/bytcr_rt5651.c

index c7b3cbf92faf2508b4aee69734b3a335cf547dc5..df4430bdafc070a836680afd78dd95b98a642557 100644 (file)
@@ -801,13 +801,11 @@ static int sst_get_frame_sync_polarity(struct snd_soc_dai *dai,
 
        switch (format) {
        case SND_SOC_DAIFMT_NB_NF:
-               return SSP_FS_ACTIVE_LOW;
-       case SND_SOC_DAIFMT_NB_IF:
+       case SND_SOC_DAIFMT_IB_NF:
                return SSP_FS_ACTIVE_HIGH;
+       case SND_SOC_DAIFMT_NB_IF:
        case SND_SOC_DAIFMT_IB_IF:
                return SSP_FS_ACTIVE_LOW;
-       case SND_SOC_DAIFMT_IB_NF:
-               return SSP_FS_ACTIVE_HIGH;
        default:
                dev_err(dai->dev, "Invalid frame sync polarity %d\n", format);
        }
index 9222fdb7af2750479bd81c27cc023331ef50d1db..1ae4d0ca80643b263e2dfe27bebed4a36ffafbef 100644 (file)
@@ -546,7 +546,7 @@ static int byt_rt5640_codec_fixup(struct snd_soc_pcm_runtime *rtd,
                 */
                ret = snd_soc_dai_set_fmt(rtd->cpu_dai,
                                        SND_SOC_DAIFMT_I2S     |
-                                       SND_SOC_DAIFMT_NB_IF   |
+                                       SND_SOC_DAIFMT_NB_NF   |
                                        SND_SOC_DAIFMT_CBS_CFS
                        );
                if (ret < 0) {
@@ -572,7 +572,7 @@ static int byt_rt5640_codec_fixup(struct snd_soc_pcm_runtime *rtd,
                 */
                ret = snd_soc_dai_set_fmt(rtd->cpu_dai,
                                        SND_SOC_DAIFMT_I2S     |
-                                       SND_SOC_DAIFMT_NB_IF   |
+                                       SND_SOC_DAIFMT_NB_NF   |
                                        SND_SOC_DAIFMT_CBS_CFS
                        );
                if (ret < 0) {
index 71d801323ff46feaa594e1a635596fdcadf654a7..3186f015939fb5fce3e8393fd40463362464dbf8 100644 (file)
@@ -185,7 +185,7 @@ static int byt_rt5651_codec_fixup(struct snd_soc_pcm_runtime *rtd,
         */
        ret = snd_soc_dai_set_fmt(rtd->cpu_dai,
                                  SND_SOC_DAIFMT_I2S     |
-                                 SND_SOC_DAIFMT_NB_IF   |
+                                 SND_SOC_DAIFMT_NB_NF   |
                                  SND_SOC_DAIFMT_CBS_CFS
                                  );