|
@@ -53,29 +53,8 @@ static int sdp3430_hw_params(struct snd_pcm_substream *substream,
|
|
|
{
|
|
|
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
|
|
struct snd_soc_dai *codec_dai = rtd->codec_dai;
|
|
|
- struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
|
|
int ret;
|
|
|
|
|
|
- /* Set codec DAI configuration */
|
|
|
- ret = snd_soc_dai_set_fmt(codec_dai,
|
|
|
- SND_SOC_DAIFMT_I2S |
|
|
|
- SND_SOC_DAIFMT_NB_NF |
|
|
|
- SND_SOC_DAIFMT_CBM_CFM);
|
|
|
- if (ret < 0) {
|
|
|
- printk(KERN_ERR "can't set codec DAI configuration\n");
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- /* Set cpu DAI configuration */
|
|
|
- ret = snd_soc_dai_set_fmt(cpu_dai,
|
|
|
- SND_SOC_DAIFMT_I2S |
|
|
|
- SND_SOC_DAIFMT_NB_NF |
|
|
|
- SND_SOC_DAIFMT_CBM_CFM);
|
|
|
- if (ret < 0) {
|
|
|
- printk(KERN_ERR "can't set cpu DAI configuration\n");
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
/* Set the codec system clock for DAC and ADC */
|
|
|
ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000,
|
|
|
SND_SOC_CLOCK_IN);
|
|
@@ -96,29 +75,8 @@ static int sdp3430_hw_voice_params(struct snd_pcm_substream *substream,
|
|
|
{
|
|
|
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
|
|
struct snd_soc_dai *codec_dai = rtd->codec_dai;
|
|
|
- struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
|
|
int ret;
|
|
|
|
|
|
- /* Set codec DAI configuration */
|
|
|
- ret = snd_soc_dai_set_fmt(codec_dai,
|
|
|
- SND_SOC_DAIFMT_DSP_A |
|
|
|
- SND_SOC_DAIFMT_IB_NF |
|
|
|
- SND_SOC_DAIFMT_CBM_CFM);
|
|
|
- if (ret) {
|
|
|
- printk(KERN_ERR "can't set codec DAI configuration\n");
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- /* Set cpu DAI configuration */
|
|
|
- ret = snd_soc_dai_set_fmt(cpu_dai,
|
|
|
- SND_SOC_DAIFMT_DSP_A |
|
|
|
- SND_SOC_DAIFMT_IB_NF |
|
|
|
- SND_SOC_DAIFMT_CBM_CFM);
|
|
|
- if (ret < 0) {
|
|
|
- printk(KERN_ERR "can't set cpu DAI configuration\n");
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
/* Set the codec system clock for DAC and ADC */
|
|
|
ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000,
|
|
|
SND_SOC_CLOCK_IN);
|
|
@@ -267,6 +225,8 @@ static struct snd_soc_dai_link sdp3430_dai[] = {
|
|
|
.codec_dai_name = "twl4030-hifi",
|
|
|
.platform_name = "omap-pcm-audio",
|
|
|
.codec_name = "twl4030-codec",
|
|
|
+ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
|
|
|
+ SND_SOC_DAIFMT_CBM_CFM,
|
|
|
.init = sdp3430_twl4030_init,
|
|
|
.ops = &sdp3430_ops,
|
|
|
},
|
|
@@ -277,6 +237,8 @@ static struct snd_soc_dai_link sdp3430_dai[] = {
|
|
|
.codec_dai_name = "twl4030-voice",
|
|
|
.platform_name = "omap-pcm-audio",
|
|
|
.codec_name = "twl4030-codec",
|
|
|
+ .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF |
|
|
|
+ SND_SOC_DAIFMT_CBM_CFM,
|
|
|
.init = sdp3430_twl4030_voice_init,
|
|
|
.ops = &sdp3430_voice_ops,
|
|
|
},
|