diff options
Diffstat (limited to 'sound/soc/ep93xx/snappercl15.c')
-rw-r--r-- | sound/soc/ep93xx/snappercl15.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/sound/soc/ep93xx/snappercl15.c b/sound/soc/ep93xx/snappercl15.c index 64955340ff75..28ab5ff772ac 100644 --- a/sound/soc/ep93xx/snappercl15.c +++ b/sound/soc/ep93xx/snappercl15.c | |||
@@ -22,7 +22,6 @@ | |||
22 | 22 | ||
23 | #include "../codecs/tlv320aic23.h" | 23 | #include "../codecs/tlv320aic23.h" |
24 | #include "ep93xx-pcm.h" | 24 | #include "ep93xx-pcm.h" |
25 | #include "ep93xx-i2s.h" | ||
26 | 25 | ||
27 | #define CODEC_CLOCK 5644800 | 26 | #define CODEC_CLOCK 5644800 |
28 | 27 | ||
@@ -30,8 +29,8 @@ static int snappercl15_hw_params(struct snd_pcm_substream *substream, | |||
30 | struct snd_pcm_hw_params *params) | 29 | struct snd_pcm_hw_params *params) |
31 | { | 30 | { |
32 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 31 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
33 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 32 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
34 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 33 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
35 | int err; | 34 | int err; |
36 | 35 | ||
37 | err = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | | 36 | err = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | |
@@ -77,8 +76,10 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
77 | {"MICIN", NULL, "Mic Jack"}, | 76 | {"MICIN", NULL, "Mic Jack"}, |
78 | }; | 77 | }; |
79 | 78 | ||
80 | static int snappercl15_tlv320aic23_init(struct snd_soc_codec *codec) | 79 | static int snappercl15_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd) |
81 | { | 80 | { |
81 | struct snd_soc_codec *codec = rtd->codec; | ||
82 | |||
82 | snd_soc_dapm_new_controls(codec, tlv320aic23_dapm_widgets, | 83 | snd_soc_dapm_new_controls(codec, tlv320aic23_dapm_widgets, |
83 | ARRAY_SIZE(tlv320aic23_dapm_widgets)); | 84 | ARRAY_SIZE(tlv320aic23_dapm_widgets)); |
84 | 85 | ||
@@ -89,24 +90,20 @@ static int snappercl15_tlv320aic23_init(struct snd_soc_codec *codec) | |||
89 | static struct snd_soc_dai_link snappercl15_dai = { | 90 | static struct snd_soc_dai_link snappercl15_dai = { |
90 | .name = "tlv320aic23", | 91 | .name = "tlv320aic23", |
91 | .stream_name = "AIC23", | 92 | .stream_name = "AIC23", |
92 | .cpu_dai = &ep93xx_i2s_dai, | 93 | .cpu_dai_name = "ep93xx-i2s", |
93 | .codec_dai = &tlv320aic23_dai, | 94 | .codec_dai_name = "tlv320aic23-hifi", |
95 | .codec_name = "tlv320aic23-codec.0-001a", | ||
96 | .platform_name = "ep93xx-pcm-audio", | ||
94 | .init = snappercl15_tlv320aic23_init, | 97 | .init = snappercl15_tlv320aic23_init, |
95 | .ops = &snappercl15_ops, | 98 | .ops = &snappercl15_ops, |
96 | }; | 99 | }; |
97 | 100 | ||
98 | static struct snd_soc_card snd_soc_snappercl15 = { | 101 | static struct snd_soc_card snd_soc_snappercl15 = { |
99 | .name = "Snapper CL15", | 102 | .name = "Snapper CL15", |
100 | .platform = &ep93xx_soc_platform, | ||
101 | .dai_link = &snappercl15_dai, | 103 | .dai_link = &snappercl15_dai, |
102 | .num_links = 1, | 104 | .num_links = 1, |
103 | }; | 105 | }; |
104 | 106 | ||
105 | static struct snd_soc_device snappercl15_snd_devdata = { | ||
106 | .card = &snd_soc_snappercl15, | ||
107 | .codec_dev = &soc_codec_dev_tlv320aic23, | ||
108 | }; | ||
109 | |||
110 | static struct platform_device *snappercl15_snd_device; | 107 | static struct platform_device *snappercl15_snd_device; |
111 | 108 | ||
112 | static int __init snappercl15_init(void) | 109 | static int __init snappercl15_init(void) |
@@ -126,8 +123,7 @@ static int __init snappercl15_init(void) | |||
126 | if (!snappercl15_snd_device) | 123 | if (!snappercl15_snd_device) |
127 | return -ENOMEM; | 124 | return -ENOMEM; |
128 | 125 | ||
129 | platform_set_drvdata(snappercl15_snd_device, &snappercl15_snd_devdata); | 126 | platform_set_drvdata(snappercl15_snd_device, &snd_soc_snappercl15); |
130 | snappercl15_snd_devdata.dev = &snappercl15_snd_device->dev; | ||
131 | ret = platform_device_add(snappercl15_snd_device); | 127 | ret = platform_device_add(snappercl15_snd_device); |
132 | if (ret) | 128 | if (ret) |
133 | platform_device_put(snappercl15_snd_device); | 129 | platform_device_put(snappercl15_snd_device); |