aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/samsung/i2s.c6
-rw-r--r--sound/soc/samsung/pcm.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index ff5d9194d11f..87a874dc7a35 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -15,6 +15,7 @@
15#include <linux/clk.h> 15#include <linux/clk.h>
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/pm_runtime.h>
18 19
19#include <sound/soc.h> 20#include <sound/soc.h>
20#include <sound/pcm_params.h> 21#include <sound/pcm_params.h>
@@ -1095,6 +1096,8 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev)
1095 1096
1096 snd_soc_register_dai(&pri_dai->pdev->dev, &pri_dai->i2s_dai_drv); 1097 snd_soc_register_dai(&pri_dai->pdev->dev, &pri_dai->i2s_dai_drv);
1097 1098
1099 pm_runtime_enable(&pdev->dev);
1100
1098 return 0; 1101 return 0;
1099err: 1102err:
1100 release_mem_region(regs_base, resource_size(res)); 1103 release_mem_region(regs_base, resource_size(res));
@@ -1105,6 +1108,7 @@ err:
1105static __devexit int samsung_i2s_remove(struct platform_device *pdev) 1108static __devexit int samsung_i2s_remove(struct platform_device *pdev)
1106{ 1109{
1107 struct i2s_dai *i2s, *other; 1110 struct i2s_dai *i2s, *other;
1111 struct resource *res;
1108 1112
1109 i2s = dev_get_drvdata(&pdev->dev); 1113 i2s = dev_get_drvdata(&pdev->dev);
1110 other = i2s->pri_dai ? : i2s->sec_dai; 1114 other = i2s->pri_dai ? : i2s->sec_dai;
@@ -1113,7 +1117,7 @@ static __devexit int samsung_i2s_remove(struct platform_device *pdev)
1113 other->pri_dai = NULL; 1117 other->pri_dai = NULL;
1114 other->sec_dai = NULL; 1118 other->sec_dai = NULL;
1115 } else { 1119 } else {
1116 struct resource *res; 1120 pm_runtime_disable(&pdev->dev);
1117 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1121 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1118 if (res) 1122 if (res)
1119 release_mem_region(res->start, resource_size(res)); 1123 release_mem_region(res->start, resource_size(res));
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index 5776addd1f94..56780206c000 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -14,6 +14,7 @@
14#include <linux/clk.h> 14#include <linux/clk.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/pm_runtime.h>
17 18
18#include <sound/soc.h> 19#include <sound/soc.h>
19#include <sound/pcm_params.h> 20#include <sound/pcm_params.h>
@@ -580,6 +581,8 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
580 pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id]; 581 pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id];
581 pcm->dma_playback = &s3c_pcm_stereo_out[pdev->id]; 582 pcm->dma_playback = &s3c_pcm_stereo_out[pdev->id];
582 583
584 pm_runtime_enable(&pdev->dev);
585
583 ret = snd_soc_register_dai(&pdev->dev, &s3c_pcm_dai[pdev->id]); 586 ret = snd_soc_register_dai(&pdev->dev, &s3c_pcm_dai[pdev->id]);
584 if (ret != 0) { 587 if (ret != 0) {
585 dev_err(&pdev->dev, "failed to get register DAI: %d\n", ret); 588 dev_err(&pdev->dev, "failed to get register DAI: %d\n", ret);
@@ -609,6 +612,8 @@ static __devexit int s3c_pcm_dev_remove(struct platform_device *pdev)
609 612
610 snd_soc_unregister_dai(&pdev->dev); 613 snd_soc_unregister_dai(&pdev->dev);
611 614
615 pm_runtime_disable(&pdev->dev);
616
612 iounmap(pcm->regs); 617 iounmap(pcm->regs);
613 618
614 mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 619 mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);