aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-10-24 06:24:06 -0400
committerMark Brown <broonie@linaro.org>2013-10-24 06:24:06 -0400
commit8ff9f38bda4d7a49eb7afd203cddcb5d79236061 (patch)
tree0ff47ac63fd69d6ee8370148d35f8ab0d834e87c
parent54128df2ba578b091c563d8e698f4944020fb8d9 (diff)
parent1abe729f783fece81d93e9a0253fd8079f19d7f6 (diff)
Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next
-rw-r--r--sound/soc/fsl/fsl_spdif.c4
-rw-r--r--sound/soc/fsl/fsl_ssi.c22
-rw-r--r--sound/soc/fsl/imx-audmux.c9
-rw-r--r--sound/soc/fsl/imx-mc13783.c1
-rw-r--r--sound/soc/fsl/imx-sgtl5000.c1
-rw-r--r--sound/soc/fsl/imx-ssi.c3
-rw-r--r--sound/soc/fsl/imx-wm8962.c1
7 files changed, 17 insertions, 24 deletions
diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index 44378e6e2696..ff1f34766ee3 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -963,7 +963,7 @@ static bool fsl_spdif_readable_reg(struct device *dev, unsigned int reg)
963 return true; 963 return true;
964 default: 964 default:
965 return false; 965 return false;
966 }; 966 }
967} 967}
968 968
969static bool fsl_spdif_writeable_reg(struct device *dev, unsigned int reg) 969static bool fsl_spdif_writeable_reg(struct device *dev, unsigned int reg)
@@ -982,7 +982,7 @@ static bool fsl_spdif_writeable_reg(struct device *dev, unsigned int reg)
982 return true; 982 return true;
983 default: 983 default:
984 return false; 984 return false;
985 }; 985 }
986} 986}
987 987
988static const struct regmap_config fsl_spdif_regmap_config = { 988static const struct regmap_config fsl_spdif_regmap_config = {
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 6b81d0ce2c44..35e277379b86 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -469,19 +469,12 @@ static int fsl_ssi_startup(struct snd_pcm_substream *substream,
469 * parameters, then the second stream may be 469 * parameters, then the second stream may be
470 * constrained to the wrong sample rate or size. 470 * constrained to the wrong sample rate or size.
471 */ 471 */
472 if (!first_runtime->sample_bits) { 472 if (first_runtime->sample_bits) {
473 dev_err(substream->pcm->card->dev, 473 snd_pcm_hw_constraint_minmax(substream->runtime,
474 "set sample size in %s stream first\n", 474 SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
475 substream->stream ==
476 SNDRV_PCM_STREAM_PLAYBACK
477 ? "capture" : "playback");
478 return -EAGAIN;
479 }
480
481 snd_pcm_hw_constraint_minmax(substream->runtime,
482 SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
483 first_runtime->sample_bits, 475 first_runtime->sample_bits,
484 first_runtime->sample_bits); 476 first_runtime->sample_bits);
477 }
485 } 478 }
486 479
487 ssi_private->second_stream = substream; 480 ssi_private->second_stream = substream;
@@ -748,7 +741,7 @@ static void fsl_ssi_ac97_init(void)
748 fsl_ssi_setup(fsl_ac97_data); 741 fsl_ssi_setup(fsl_ac97_data);
749} 742}
750 743
751void fsl_ssi_ac97_write(struct snd_ac97 *ac97, unsigned short reg, 744static void fsl_ssi_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
752 unsigned short val) 745 unsigned short val)
753{ 746{
754 struct ccsr_ssi *ssi = fsl_ac97_data->ssi; 747 struct ccsr_ssi *ssi = fsl_ac97_data->ssi;
@@ -770,7 +763,7 @@ void fsl_ssi_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
770 udelay(100); 763 udelay(100);
771} 764}
772 765
773unsigned short fsl_ssi_ac97_read(struct snd_ac97 *ac97, 766static unsigned short fsl_ssi_ac97_read(struct snd_ac97 *ac97,
774 unsigned short reg) 767 unsigned short reg)
775{ 768{
776 struct ccsr_ssi *ssi = fsl_ac97_data->ssi; 769 struct ccsr_ssi *ssi = fsl_ac97_data->ssi;
@@ -936,7 +929,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
936 ssi_private->ssi_phys = res.start; 929 ssi_private->ssi_phys = res.start;
937 930
938 ssi_private->irq = irq_of_parse_and_map(np, 0); 931 ssi_private->irq = irq_of_parse_and_map(np, 0);
939 if (ssi_private->irq == 0) { 932 if (!ssi_private->irq) {
940 dev_err(&pdev->dev, "no irq for node %s\n", np->full_name); 933 dev_err(&pdev->dev, "no irq for node %s\n", np->full_name);
941 return -ENXIO; 934 return -ENXIO;
942 } 935 }
@@ -1135,7 +1128,6 @@ static int fsl_ssi_remove(struct platform_device *pdev)
1135 if (ssi_private->ssi_on_imx) 1128 if (ssi_private->ssi_on_imx)
1136 imx_pcm_dma_exit(pdev); 1129 imx_pcm_dma_exit(pdev);
1137 snd_soc_unregister_component(&pdev->dev); 1130 snd_soc_unregister_component(&pdev->dev);
1138 dev_set_drvdata(&pdev->dev, NULL);
1139 device_remove_file(&pdev->dev, &ssi_private->dev_attr); 1131 device_remove_file(&pdev->dev, &ssi_private->dev_attr);
1140 if (ssi_private->ssi_on_imx) 1132 if (ssi_private->ssi_on_imx)
1141 clk_disable_unprepare(ssi_private->clk); 1133 clk_disable_unprepare(ssi_private->clk);
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index d3bf71a0ec56..ac869931d7f1 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -66,13 +66,10 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
66 size_t count, loff_t *ppos) 66 size_t count, loff_t *ppos)
67{ 67{
68 ssize_t ret; 68 ssize_t ret;
69 char *buf = kmalloc(PAGE_SIZE, GFP_KERNEL); 69 char *buf;
70 int port = (int)file->private_data; 70 int port = (int)file->private_data;
71 u32 pdcr, ptcr; 71 u32 pdcr, ptcr;
72 72
73 if (!buf)
74 return -ENOMEM;
75
76 if (audmux_clk) { 73 if (audmux_clk) {
77 ret = clk_prepare_enable(audmux_clk); 74 ret = clk_prepare_enable(audmux_clk);
78 if (ret) 75 if (ret)
@@ -85,6 +82,10 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
85 if (audmux_clk) 82 if (audmux_clk)
86 clk_disable_unprepare(audmux_clk); 83 clk_disable_unprepare(audmux_clk);
87 84
85 buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
86 if (!buf)
87 return -ENOMEM;
88
88 ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n", 89 ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n",
89 pdcr, ptcr); 90 pdcr, ptcr);
90 91
diff --git a/sound/soc/fsl/imx-mc13783.c b/sound/soc/fsl/imx-mc13783.c
index a2fd7321b5a9..79cee782dbbf 100644
--- a/sound/soc/fsl/imx-mc13783.c
+++ b/sound/soc/fsl/imx-mc13783.c
@@ -160,6 +160,7 @@ static struct platform_driver imx_mc13783_audio_driver = {
160 .driver = { 160 .driver = {
161 .name = "imx_mc13783", 161 .name = "imx_mc13783",
162 .owner = THIS_MODULE, 162 .owner = THIS_MODULE,
163 .pm = &snd_soc_pm_ops,
163 }, 164 },
164 .probe = imx_mc13783_probe, 165 .probe = imx_mc13783_probe,
165 .remove = imx_mc13783_remove 166 .remove = imx_mc13783_remove
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index ed6ba1eba557..f2beae78969f 100644
--- a/sound/soc/fsl/imx-sgtl5000.c
+++ b/sound/soc/fsl/imx-sgtl5000.c
@@ -201,6 +201,7 @@ static struct platform_driver imx_sgtl5000_driver = {
201 .driver = { 201 .driver = {
202 .name = "imx-sgtl5000", 202 .name = "imx-sgtl5000",
203 .owner = THIS_MODULE, 203 .owner = THIS_MODULE,
204 .pm = &snd_soc_pm_ops,
204 .of_match_table = imx_sgtl5000_dt_ids, 205 .of_match_table = imx_sgtl5000_dt_ids,
205 }, 206 },
206 .probe = imx_sgtl5000_probe, 207 .probe = imx_sgtl5000_probe,
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index 57d6941676ff..f5f248c91c16 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -613,7 +613,6 @@ static int imx_ssi_probe(struct platform_device *pdev)
613failed_pcm: 613failed_pcm:
614 snd_soc_unregister_component(&pdev->dev); 614 snd_soc_unregister_component(&pdev->dev);
615failed_register: 615failed_register:
616 release_mem_region(res->start, resource_size(res));
617 clk_disable_unprepare(ssi->clk); 616 clk_disable_unprepare(ssi->clk);
618failed_clk: 617failed_clk:
619 snd_soc_set_ac97_ops(NULL); 618 snd_soc_set_ac97_ops(NULL);
@@ -623,7 +622,6 @@ failed_clk:
623 622
624static int imx_ssi_remove(struct platform_device *pdev) 623static int imx_ssi_remove(struct platform_device *pdev)
625{ 624{
626 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
627 struct imx_ssi *ssi = platform_get_drvdata(pdev); 625 struct imx_ssi *ssi = platform_get_drvdata(pdev);
628 626
629 if (!ssi->dma_init) 627 if (!ssi->dma_init)
@@ -637,7 +635,6 @@ static int imx_ssi_remove(struct platform_device *pdev)
637 if (ssi->flags & IMX_SSI_USE_AC97) 635 if (ssi->flags & IMX_SSI_USE_AC97)
638 ac97_ssi = NULL; 636 ac97_ssi = NULL;
639 637
640 release_mem_region(res->start, resource_size(res));
641 clk_disable_unprepare(ssi->clk); 638 clk_disable_unprepare(ssi->clk);
642 snd_soc_set_ac97_ops(NULL); 639 snd_soc_set_ac97_ops(NULL);
643 640
diff --git a/sound/soc/fsl/imx-wm8962.c b/sound/soc/fsl/imx-wm8962.c
index 6c6066618f3b..72064e995687 100644
--- a/sound/soc/fsl/imx-wm8962.c
+++ b/sound/soc/fsl/imx-wm8962.c
@@ -310,6 +310,7 @@ static struct platform_driver imx_wm8962_driver = {
310 .driver = { 310 .driver = {
311 .name = "imx-wm8962", 311 .name = "imx-wm8962",
312 .owner = THIS_MODULE, 312 .owner = THIS_MODULE,
313 .pm = &snd_soc_pm_ops,
313 .of_match_table = imx_wm8962_dt_ids, 314 .of_match_table = imx_wm8962_dt_ids,
314 }, 315 },
315 .probe = imx_wm8962_probe, 316 .probe = imx_wm8962_probe,