diff options
Diffstat (limited to 'sound/soc/omap/osk5912.c')
-rw-r--r-- | sound/soc/omap/osk5912.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/sound/soc/omap/osk5912.c b/sound/soc/omap/osk5912.c index 498ca2e03519..f0e662556428 100644 --- a/sound/soc/omap/osk5912.c +++ b/sound/soc/omap/osk5912.c | |||
@@ -55,8 +55,8 @@ static int osk_hw_params(struct snd_pcm_substream *substream, | |||
55 | struct snd_pcm_hw_params *params) | 55 | struct snd_pcm_hw_params *params) |
56 | { | 56 | { |
57 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 57 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
58 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 58 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
59 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 59 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
60 | int err; | 60 | int err; |
61 | 61 | ||
62 | /* Set codec DAI configuration */ | 62 | /* Set codec DAI configuration */ |
@@ -113,8 +113,9 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
113 | {"MICIN", NULL, "Mic Jack"}, | 113 | {"MICIN", NULL, "Mic Jack"}, |
114 | }; | 114 | }; |
115 | 115 | ||
116 | static int osk_tlv320aic23_init(struct snd_soc_codec *codec) | 116 | static int osk_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd) |
117 | { | 117 | { |
118 | struct snd_soc_codec *codec = rtd->codec; | ||
118 | 119 | ||
119 | /* Add osk5912 specific widgets */ | 120 | /* Add osk5912 specific widgets */ |
120 | snd_soc_dapm_new_controls(codec, tlv320aic23_dapm_widgets, | 121 | snd_soc_dapm_new_controls(codec, tlv320aic23_dapm_widgets, |
@@ -136,8 +137,10 @@ static int osk_tlv320aic23_init(struct snd_soc_codec *codec) | |||
136 | static struct snd_soc_dai_link osk_dai = { | 137 | static struct snd_soc_dai_link osk_dai = { |
137 | .name = "TLV320AIC23", | 138 | .name = "TLV320AIC23", |
138 | .stream_name = "AIC23", | 139 | .stream_name = "AIC23", |
139 | .cpu_dai = &omap_mcbsp_dai[0], | 140 | .cpu_dai_name = "omap-mcbsp-dai.0", |
140 | .codec_dai = &tlv320aic23_dai, | 141 | .codec_dai_name = "tlv320aic23-hifi", |
142 | .platform_name = "omap-pcm-audio", | ||
143 | .codec_name = "tlv320aic23-codec", | ||
141 | .init = osk_tlv320aic23_init, | 144 | .init = osk_tlv320aic23_init, |
142 | .ops = &osk_ops, | 145 | .ops = &osk_ops, |
143 | }; | 146 | }; |
@@ -145,17 +148,10 @@ static struct snd_soc_dai_link osk_dai = { | |||
145 | /* Audio machine driver */ | 148 | /* Audio machine driver */ |
146 | static struct snd_soc_card snd_soc_card_osk = { | 149 | static struct snd_soc_card snd_soc_card_osk = { |
147 | .name = "OSK5912", | 150 | .name = "OSK5912", |
148 | .platform = &omap_soc_platform, | ||
149 | .dai_link = &osk_dai, | 151 | .dai_link = &osk_dai, |
150 | .num_links = 1, | 152 | .num_links = 1, |
151 | }; | 153 | }; |
152 | 154 | ||
153 | /* Audio subsystem */ | ||
154 | static struct snd_soc_device osk_snd_devdata = { | ||
155 | .card = &snd_soc_card_osk, | ||
156 | .codec_dev = &soc_codec_dev_tlv320aic23, | ||
157 | }; | ||
158 | |||
159 | static struct platform_device *osk_snd_device; | 155 | static struct platform_device *osk_snd_device; |
160 | 156 | ||
161 | static int __init osk_soc_init(void) | 157 | static int __init osk_soc_init(void) |
@@ -171,9 +167,7 @@ static int __init osk_soc_init(void) | |||
171 | if (!osk_snd_device) | 167 | if (!osk_snd_device) |
172 | return -ENOMEM; | 168 | return -ENOMEM; |
173 | 169 | ||
174 | platform_set_drvdata(osk_snd_device, &osk_snd_devdata); | 170 | platform_set_drvdata(osk_snd_device, &snd_soc_card_osk); |
175 | osk_snd_devdata.dev = &osk_snd_device->dev; | ||
176 | *(unsigned int *)osk_dai.cpu_dai->private_data = 0; /* McBSP1 */ | ||
177 | err = platform_device_add(osk_snd_device); | 171 | err = platform_device_add(osk_snd_device); |
178 | if (err) | 172 | if (err) |
179 | goto err1; | 173 | goto err1; |