~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to sound/soc/omap/omap3evm.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include <linux/clk.h>
21
21
#include <linux/platform_device.h>
 
22
#include <linux/module.h>
22
23
#include <sound/core.h>
23
24
#include <sound/pcm.h>
24
25
#include <sound/soc.h>
36
37
{
37
38
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
38
39
        struct snd_soc_dai *codec_dai = rtd->codec_dai;
39
 
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
40
40
        int ret;
41
41
 
42
 
        /* Set codec DAI configuration */
43
 
        ret = snd_soc_dai_set_fmt(codec_dai,
44
 
                                  SND_SOC_DAIFMT_I2S |
45
 
                                  SND_SOC_DAIFMT_NB_NF |
46
 
                                  SND_SOC_DAIFMT_CBM_CFM);
47
 
        if (ret < 0) {
48
 
                printk(KERN_ERR "Can't set codec DAI configuration\n");
49
 
                return ret;
50
 
        }
51
 
 
52
 
        /* Set cpu DAI configuration */
53
 
        ret = snd_soc_dai_set_fmt(cpu_dai,
54
 
                                  SND_SOC_DAIFMT_I2S |
55
 
                                  SND_SOC_DAIFMT_NB_NF |
56
 
                                  SND_SOC_DAIFMT_CBM_CFM);
57
 
        if (ret < 0) {
58
 
                printk(KERN_ERR "Can't set cpu DAI configuration\n");
59
 
                return ret;
60
 
        }
61
 
 
62
42
        /* Set the codec system clock for DAC and ADC */
63
43
        ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000,
64
44
                                     SND_SOC_CLOCK_IN);
82
62
        .codec_dai_name = "twl4030-hifi",
83
63
        .platform_name = "omap-pcm-audio",
84
64
        .codec_name = "twl4030-codec",
 
65
        .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
 
66
                   SND_SOC_DAIFMT_CBM_CFM,
85
67
        .ops            = &omap3evm_ops,
86
68
};
87
69