]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ALSA: ASoC: Davinci: Replaced DAI format RIGHT_J by DSP_B for SFFSDR
authorHugo Villeneuve <hugo@hugovil.com>
Tue, 10 Mar 2009 03:32:07 +0000 (23:32 -0400)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 10 Mar 2009 15:42:48 +0000 (15:42 +0000)
Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/davinci/davinci-sffsdr.c

index 0bf81abba8c79048ef6f1be76129b68810ce6969..a1ae3736a5d7a99783b7c1bb62736f475197f1d2 100644 (file)
 #include "davinci-pcm.h"
 #include "davinci-i2s.h"
 
+/*
+ * CLKX and CLKR are the inputs for the Sample Rate Generator.
+ * FSX and FSR are outputs, driven by the sample Rate Generator.
+ */
+#define AUDIO_FORMAT (SND_SOC_DAIFMT_DSP_B |   \
+                     SND_SOC_DAIFMT_CBM_CFS |  \
+                     SND_SOC_DAIFMT_IB_NF)
+
 static int sffsdr_hw_params(struct snd_pcm_substream *substream,
                            struct snd_pcm_hw_params *params,
                            struct snd_soc_dai *dai)
@@ -56,13 +64,8 @@ static int sffsdr_hw_params(struct snd_pcm_substream *substream,
        }
 #endif
 
-       /* Set cpu DAI configuration:
-        * CLKX and CLKR are the inputs for the Sample Rate Generator.
-        * FSX and FSR are outputs, driven by the sample Rate Generator. */
-       ret = snd_soc_dai_set_fmt(cpu_dai,
-                                 SND_SOC_DAIFMT_RIGHT_J |
-                                 SND_SOC_DAIFMT_CBM_CFS |
-                                 SND_SOC_DAIFMT_IB_NF);
+       /* set cpu DAI configuration */
+       ret = snd_soc_dai_set_fmt(cpu_dai, AUDIO_FORMAT);
        if (ret < 0)
                return ret;