diff options
Diffstat (limited to 'sound/soc/imx/eukrea-tlv320.c')
-rw-r--r-- | sound/soc/imx/eukrea-tlv320.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/sound/soc/imx/eukrea-tlv320.c b/sound/soc/imx/eukrea-tlv320.c index f15dfbdc47ee..75fb4b83548b 100644 --- a/sound/soc/imx/eukrea-tlv320.c +++ b/sound/soc/imx/eukrea-tlv320.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <sound/core.h> | 22 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
24 | #include <sound/soc.h> | 24 | #include <sound/soc.h> |
25 | #include <sound/soc-dapm.h> | ||
26 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
27 | 26 | ||
28 | #include "../codecs/tlv320aic23.h" | 27 | #include "../codecs/tlv320aic23.h" |
@@ -34,8 +33,8 @@ static int eukrea_tlv320_hw_params(struct snd_pcm_substream *substream, | |||
34 | struct snd_pcm_hw_params *params) | 33 | struct snd_pcm_hw_params *params) |
35 | { | 34 | { |
36 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 35 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
37 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 36 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
38 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 37 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
39 | int ret; | 38 | int ret; |
40 | 39 | ||
41 | ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | | 40 | ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | |
@@ -79,22 +78,19 @@ static struct snd_soc_ops eukrea_tlv320_snd_ops = { | |||
79 | static struct snd_soc_dai_link eukrea_tlv320_dai = { | 78 | static struct snd_soc_dai_link eukrea_tlv320_dai = { |
80 | .name = "tlv320aic23", | 79 | .name = "tlv320aic23", |
81 | .stream_name = "TLV320AIC23", | 80 | .stream_name = "TLV320AIC23", |
82 | .codec_dai = &tlv320aic23_dai, | 81 | .codec_dai_name = "tlv320aic23-hifi", |
82 | .platform_name = "imx-fiq-pcm-audio.0", | ||
83 | .codec_name = "tlv320aic23-codec.0-001a", | ||
84 | .cpu_dai_name = "imx-ssi.0", | ||
83 | .ops = &eukrea_tlv320_snd_ops, | 85 | .ops = &eukrea_tlv320_snd_ops, |
84 | }; | 86 | }; |
85 | 87 | ||
86 | static struct snd_soc_card eukrea_tlv320 = { | 88 | static struct snd_soc_card eukrea_tlv320 = { |
87 | .name = "cpuimx-audio", | 89 | .name = "cpuimx-audio", |
88 | .platform = &imx_soc_platform, | ||
89 | .dai_link = &eukrea_tlv320_dai, | 90 | .dai_link = &eukrea_tlv320_dai, |
90 | .num_links = 1, | 91 | .num_links = 1, |
91 | }; | 92 | }; |
92 | 93 | ||
93 | static struct snd_soc_device eukrea_tlv320_snd_devdata = { | ||
94 | .card = &eukrea_tlv320, | ||
95 | .codec_dev = &soc_codec_dev_tlv320aic23, | ||
96 | }; | ||
97 | |||
98 | static struct platform_device *eukrea_tlv320_snd_device; | 94 | static struct platform_device *eukrea_tlv320_snd_device; |
99 | 95 | ||
100 | static int __init eukrea_tlv320_init(void) | 96 | static int __init eukrea_tlv320_init(void) |
@@ -102,7 +98,8 @@ static int __init eukrea_tlv320_init(void) | |||
102 | int ret; | 98 | int ret; |
103 | 99 | ||
104 | if (!machine_is_eukrea_cpuimx27() && !machine_is_eukrea_cpuimx25sd() | 100 | if (!machine_is_eukrea_cpuimx27() && !machine_is_eukrea_cpuimx25sd() |
105 | && !machine_is_eukrea_cpuimx35sd()) | 101 | && !machine_is_eukrea_cpuimx35sd() |
102 | && !machine_is_eukrea_cpuimx51sd()) | ||
106 | /* return happy. We might run on a totally different machine */ | 103 | /* return happy. We might run on a totally different machine */ |
107 | return 0; | 104 | return 0; |
108 | 105 | ||
@@ -110,10 +107,7 @@ static int __init eukrea_tlv320_init(void) | |||
110 | if (!eukrea_tlv320_snd_device) | 107 | if (!eukrea_tlv320_snd_device) |
111 | return -ENOMEM; | 108 | return -ENOMEM; |
112 | 109 | ||
113 | eukrea_tlv320_dai.cpu_dai = &imx_ssi_pcm_dai[0]; | 110 | platform_set_drvdata(eukrea_tlv320_snd_device, &eukrea_tlv320); |
114 | |||
115 | platform_set_drvdata(eukrea_tlv320_snd_device, &eukrea_tlv320_snd_devdata); | ||
116 | eukrea_tlv320_snd_devdata.dev = &eukrea_tlv320_snd_device->dev; | ||
117 | ret = platform_device_add(eukrea_tlv320_snd_device); | 111 | ret = platform_device_add(eukrea_tlv320_snd_device); |
118 | 112 | ||
119 | if (ret) { | 113 | if (ret) { |