aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-11-08 05:43:35 -0500
committerMark Brown <broonie@linaro.org>2013-11-08 05:43:35 -0500
commit87373ad1f322cd4b0eabc90ecbe38ed6a3ed3d40 (patch)
tree9ece33ad7d332d714c9c0d8b2c504b4bba5b43ff /sound
parent457eb9016bf00e90cc84513e70d21bcf64742919 (diff)
parent29ca9c73e54131c9ad90c5381f368d9b09b5aca4 (diff)
Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/samsung/bells.c1
-rw-r--r--sound/soc/samsung/i2s.c16
-rw-r--r--sound/soc/samsung/smdk_wm8994.c14
3 files changed, 12 insertions, 19 deletions
diff --git a/sound/soc/samsung/bells.c b/sound/soc/samsung/bells.c
index 29e246803626..84f5d8b76679 100644
--- a/sound/soc/samsung/bells.c
+++ b/sound/soc/samsung/bells.c
@@ -356,6 +356,7 @@ static struct snd_soc_dapm_widget bells_widgets[] = {
356 356
357static struct snd_soc_dapm_route bells_routes[] = { 357static struct snd_soc_dapm_route bells_routes[] = {
358 { "Sub CLK_SYS", NULL, "OPCLK" }, 358 { "Sub CLK_SYS", NULL, "OPCLK" },
359 { "CLKIN", NULL, "OPCLK" },
359 360
360 { "DMIC", NULL, "MICBIAS2" }, 361 { "DMIC", NULL, "MICBIAS2" },
361 { "IN2L", NULL, "DMIC" }, 362 { "IN2L", NULL, "DMIC" },
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 3e08b6c0f7ba..a5cbdb4f1655 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -1055,7 +1055,7 @@ static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec)
1055 i2s->i2s_dai_drv.ops = &samsung_i2s_dai_ops; 1055 i2s->i2s_dai_drv.ops = &samsung_i2s_dai_ops;
1056 i2s->i2s_dai_drv.suspend = i2s_suspend; 1056 i2s->i2s_dai_drv.suspend = i2s_suspend;
1057 i2s->i2s_dai_drv.resume = i2s_resume; 1057 i2s->i2s_dai_drv.resume = i2s_resume;
1058 i2s->i2s_dai_drv.playback.channels_min = 2; 1058 i2s->i2s_dai_drv.playback.channels_min = 1;
1059 i2s->i2s_dai_drv.playback.channels_max = 2; 1059 i2s->i2s_dai_drv.playback.channels_max = 2;
1060 i2s->i2s_dai_drv.playback.rates = SAMSUNG_I2S_RATES; 1060 i2s->i2s_dai_drv.playback.rates = SAMSUNG_I2S_RATES;
1061 i2s->i2s_dai_drv.playback.formats = SAMSUNG_I2S_FMTS; 1061 i2s->i2s_dai_drv.playback.formats = SAMSUNG_I2S_FMTS;
@@ -1068,7 +1068,7 @@ static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec)
1068 dev_set_drvdata(&i2s->pdev->dev, i2s); 1068 dev_set_drvdata(&i2s->pdev->dev, i2s);
1069 } else { /* Create a new platform_device for Secondary */ 1069 } else { /* Create a new platform_device for Secondary */
1070 i2s->pdev = platform_device_alloc("samsung-i2s-sec", -1); 1070 i2s->pdev = platform_device_alloc("samsung-i2s-sec", -1);
1071 if (IS_ERR(i2s->pdev)) 1071 if (!i2s->pdev)
1072 return NULL; 1072 return NULL;
1073 1073
1074 i2s->pdev->dev.parent = &pdev->dev; 1074 i2s->pdev->dev.parent = &pdev->dev;
@@ -1138,9 +1138,9 @@ static int samsung_i2s_probe(struct platform_device *pdev)
1138 dev_err(&pdev->dev, "Unable to get drvdata\n"); 1138 dev_err(&pdev->dev, "Unable to get drvdata\n");
1139 return -EFAULT; 1139 return -EFAULT;
1140 } 1140 }
1141 snd_soc_register_component(&sec_dai->pdev->dev, 1141 devm_snd_soc_register_component(&sec_dai->pdev->dev,
1142 &samsung_i2s_component, 1142 &samsung_i2s_component,
1143 &sec_dai->i2s_dai_drv, 1); 1143 &sec_dai->i2s_dai_drv, 1);
1144 samsung_asoc_dma_platform_register(&pdev->dev); 1144 samsung_asoc_dma_platform_register(&pdev->dev);
1145 return 0; 1145 return 0;
1146 } 1146 }
@@ -1253,8 +1253,9 @@ static int samsung_i2s_probe(struct platform_device *pdev)
1253 goto err; 1253 goto err;
1254 } 1254 }
1255 1255
1256 snd_soc_register_component(&pri_dai->pdev->dev, &samsung_i2s_component, 1256 devm_snd_soc_register_component(&pri_dai->pdev->dev,
1257 &pri_dai->i2s_dai_drv, 1); 1257 &samsung_i2s_component,
1258 &pri_dai->i2s_dai_drv, 1);
1258 1259
1259 pm_runtime_enable(&pdev->dev); 1260 pm_runtime_enable(&pdev->dev);
1260 1261
@@ -1289,7 +1290,6 @@ static int samsung_i2s_remove(struct platform_device *pdev)
1289 i2s->sec_dai = NULL; 1290 i2s->sec_dai = NULL;
1290 1291
1291 samsung_asoc_dma_platform_unregister(&pdev->dev); 1292 samsung_asoc_dma_platform_unregister(&pdev->dev);
1292 snd_soc_unregister_component(&pdev->dev);
1293 1293
1294 return 0; 1294 return 0;
1295} 1295}
diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
index 5fd7a05a9b9e..b072bd107b31 100644
--- a/sound/soc/samsung/smdk_wm8994.c
+++ b/sound/soc/samsung/smdk_wm8994.c
@@ -9,6 +9,7 @@
9 9
10#include "../codecs/wm8994.h" 10#include "../codecs/wm8994.h"
11#include <sound/pcm_params.h> 11#include <sound/pcm_params.h>
12#include <sound/soc.h>
12#include <linux/module.h> 13#include <linux/module.h>
13#include <linux/of.h> 14#include <linux/of.h>
14#include <linux/of_device.h> 15#include <linux/of_device.h>
@@ -193,7 +194,7 @@ static int smdk_audio_probe(struct platform_device *pdev)
193 194
194 platform_set_drvdata(pdev, board); 195 platform_set_drvdata(pdev, board);
195 196
196 ret = snd_soc_register_card(card); 197 ret = devm_snd_soc_register_card(&pdev->dev, card);
197 198
198 if (ret) 199 if (ret)
199 dev_err(&pdev->dev, "snd_soc_register_card() failed:%d\n", ret); 200 dev_err(&pdev->dev, "snd_soc_register_card() failed:%d\n", ret);
@@ -201,23 +202,14 @@ static int smdk_audio_probe(struct platform_device *pdev)
201 return ret; 202 return ret;
202} 203}
203 204
204static int smdk_audio_remove(struct platform_device *pdev)
205{
206 struct snd_soc_card *card = platform_get_drvdata(pdev);
207
208 snd_soc_unregister_card(card);
209
210 return 0;
211}
212
213static struct platform_driver smdk_audio_driver = { 205static struct platform_driver smdk_audio_driver = {
214 .driver = { 206 .driver = {
215 .name = "smdk-audio-wm8894", 207 .name = "smdk-audio-wm8894",
216 .owner = THIS_MODULE, 208 .owner = THIS_MODULE,
217 .of_match_table = of_match_ptr(samsung_wm8994_of_match), 209 .of_match_table = of_match_ptr(samsung_wm8994_of_match),
210 .pm = &snd_soc_pm_ops,
218 }, 211 },
219 .probe = smdk_audio_probe, 212 .probe = smdk_audio_probe,
220 .remove = smdk_audio_remove,
221}; 213};
222 214
223module_platform_driver(smdk_audio_driver); 215module_platform_driver(smdk_audio_driver);