diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-07-15 08:29:07 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-07-15 08:29:07 -0400 |
commit | 1abfeb03a9ee05097aaa33a0f44984fc82131b7f (patch) | |
tree | 3b71f06e839f7470c1791c53e0a08afb18ca6698 /sound | |
parent | 4b8846062faac4e5c3f08e2e06bbb33c949aa51f (diff) | |
parent | 4824b69a928b6609cfb1cf232ef32d4a8125a371 (diff) |
Merge tag 'asoc-v3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v3.11
The biggest change here is the OMAP change, these are larger than I'd
have liked but make the driver actually usable - during the merge window
OMAP removed support for non-DT OMAP4 boards but in doing so removed the
method of accessing DMA channels used by the ASoC drivers rendering them
unusuable.
Otherwise nothing exciting, the symmetric rates change for WM8978 is a
fix for the information we expose to userspace.
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/sgtl5000.h | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8978.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 4 | ||||
-rw-r--r-- | sound/soc/omap/mcbsp.c | 39 | ||||
-rw-r--r-- | sound/soc/omap/omap-dmic.c | 11 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcpdm.c | 16 | ||||
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 17 | ||||
-rw-r--r-- | sound/soc/samsung/i2s.c | 8 |
9 files changed, 46 insertions, 54 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index d441559dc92c..d659d3adcfb3 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c | |||
@@ -38,7 +38,7 @@ | |||
38 | static const struct reg_default sgtl5000_reg_defaults[] = { | 38 | static const struct reg_default sgtl5000_reg_defaults[] = { |
39 | { SGTL5000_CHIP_CLK_CTRL, 0x0008 }, | 39 | { SGTL5000_CHIP_CLK_CTRL, 0x0008 }, |
40 | { SGTL5000_CHIP_I2S_CTRL, 0x0010 }, | 40 | { SGTL5000_CHIP_I2S_CTRL, 0x0010 }, |
41 | { SGTL5000_CHIP_SSS_CTRL, 0x0008 }, | 41 | { SGTL5000_CHIP_SSS_CTRL, 0x0010 }, |
42 | { SGTL5000_CHIP_DAC_VOL, 0x3c3c }, | 42 | { SGTL5000_CHIP_DAC_VOL, 0x3c3c }, |
43 | { SGTL5000_CHIP_PAD_STRENGTH, 0x015f }, | 43 | { SGTL5000_CHIP_PAD_STRENGTH, 0x015f }, |
44 | { SGTL5000_CHIP_ANA_HP_CTRL, 0x1818 }, | 44 | { SGTL5000_CHIP_ANA_HP_CTRL, 0x1818 }, |
diff --git a/sound/soc/codecs/sgtl5000.h b/sound/soc/codecs/sgtl5000.h index 4b69229a9818..2f8c88931f69 100644 --- a/sound/soc/codecs/sgtl5000.h +++ b/sound/soc/codecs/sgtl5000.h | |||
@@ -347,7 +347,7 @@ | |||
347 | #define SGTL5000_PLL_INT_DIV_MASK 0xf800 | 347 | #define SGTL5000_PLL_INT_DIV_MASK 0xf800 |
348 | #define SGTL5000_PLL_INT_DIV_SHIFT 11 | 348 | #define SGTL5000_PLL_INT_DIV_SHIFT 11 |
349 | #define SGTL5000_PLL_INT_DIV_WIDTH 5 | 349 | #define SGTL5000_PLL_INT_DIV_WIDTH 5 |
350 | #define SGTL5000_PLL_FRAC_DIV_MASK 0x0700 | 350 | #define SGTL5000_PLL_FRAC_DIV_MASK 0x07ff |
351 | #define SGTL5000_PLL_FRAC_DIV_SHIFT 0 | 351 | #define SGTL5000_PLL_FRAC_DIV_SHIFT 0 |
352 | #define SGTL5000_PLL_FRAC_DIV_WIDTH 11 | 352 | #define SGTL5000_PLL_FRAC_DIV_WIDTH 11 |
353 | 353 | ||
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index 029f31c8e703..d8fc531c0e59 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c | |||
@@ -921,6 +921,7 @@ static struct snd_soc_dai_driver wm8978_dai = { | |||
921 | .formats = WM8978_FORMATS, | 921 | .formats = WM8978_FORMATS, |
922 | }, | 922 | }, |
923 | .ops = &wm8978_dai_ops, | 923 | .ops = &wm8978_dai_ops, |
924 | .symmetric_rates = 1, | ||
924 | }; | 925 | }; |
925 | 926 | ||
926 | static int wm8978_suspend(struct snd_soc_codec *codec) | 927 | static int wm8978_suspend(struct snd_soc_codec *codec) |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 1d4b1ec66e36..ba832b77c543 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -3852,8 +3852,6 @@ static void wm8958_mic_work(struct work_struct *work) | |||
3852 | mic_complete_work.work); | 3852 | mic_complete_work.work); |
3853 | struct snd_soc_codec *codec = wm8994->hubs.codec; | 3853 | struct snd_soc_codec *codec = wm8994->hubs.codec; |
3854 | 3854 | ||
3855 | dev_crit(codec->dev, "MIC WORK %x\n", wm8994->mic_status); | ||
3856 | |||
3857 | pm_runtime_get_sync(codec->dev); | 3855 | pm_runtime_get_sync(codec->dev); |
3858 | 3856 | ||
3859 | mutex_lock(&wm8994->accdet_lock); | 3857 | mutex_lock(&wm8994->accdet_lock); |
@@ -3863,8 +3861,6 @@ static void wm8958_mic_work(struct work_struct *work) | |||
3863 | mutex_unlock(&wm8994->accdet_lock); | 3861 | mutex_unlock(&wm8994->accdet_lock); |
3864 | 3862 | ||
3865 | pm_runtime_put(codec->dev); | 3863 | pm_runtime_put(codec->dev); |
3866 | |||
3867 | dev_crit(codec->dev, "MIC WORK %x DONE\n", wm8994->mic_status); | ||
3868 | } | 3864 | } |
3869 | 3865 | ||
3870 | static irqreturn_t wm8958_mic_irq(int irq, void *data) | 3866 | static irqreturn_t wm8958_mic_irq(int irq, void *data) |
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c index eb68c7db1cf3..361e4c03646e 100644 --- a/sound/soc/omap/mcbsp.c +++ b/sound/soc/omap/mcbsp.c | |||
@@ -1012,28 +1012,33 @@ int omap_mcbsp_init(struct platform_device *pdev) | |||
1012 | } | 1012 | } |
1013 | } | 1013 | } |
1014 | 1014 | ||
1015 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); | 1015 | if (!pdev->dev.of_node) { |
1016 | if (!res) { | 1016 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); |
1017 | dev_err(&pdev->dev, "invalid rx DMA channel\n"); | 1017 | if (!res) { |
1018 | return -ENODEV; | 1018 | dev_err(&pdev->dev, "invalid tx DMA channel\n"); |
1019 | } | 1019 | return -ENODEV; |
1020 | /* RX DMA request number, and port address configuration */ | 1020 | } |
1021 | mcbsp->dma_req[1] = res->start; | 1021 | mcbsp->dma_req[0] = res->start; |
1022 | mcbsp->dma_data[1].filter_data = &mcbsp->dma_req[1]; | 1022 | mcbsp->dma_data[0].filter_data = &mcbsp->dma_req[0]; |
1023 | mcbsp->dma_data[1].addr = omap_mcbsp_dma_reg_params(mcbsp, 1); | ||
1024 | mcbsp->dma_data[1].maxburst = 4; | ||
1025 | 1023 | ||
1026 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); | 1024 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); |
1027 | if (!res) { | 1025 | if (!res) { |
1028 | dev_err(&pdev->dev, "invalid tx DMA channel\n"); | 1026 | dev_err(&pdev->dev, "invalid rx DMA channel\n"); |
1029 | return -ENODEV; | 1027 | return -ENODEV; |
1028 | } | ||
1029 | mcbsp->dma_req[1] = res->start; | ||
1030 | mcbsp->dma_data[1].filter_data = &mcbsp->dma_req[1]; | ||
1031 | } else { | ||
1032 | mcbsp->dma_data[0].filter_data = "tx"; | ||
1033 | mcbsp->dma_data[1].filter_data = "rx"; | ||
1030 | } | 1034 | } |
1031 | /* TX DMA request number, and port address configuration */ | 1035 | |
1032 | mcbsp->dma_req[0] = res->start; | ||
1033 | mcbsp->dma_data[0].filter_data = &mcbsp->dma_req[0]; | ||
1034 | mcbsp->dma_data[0].addr = omap_mcbsp_dma_reg_params(mcbsp, 0); | 1036 | mcbsp->dma_data[0].addr = omap_mcbsp_dma_reg_params(mcbsp, 0); |
1035 | mcbsp->dma_data[0].maxburst = 4; | 1037 | mcbsp->dma_data[0].maxburst = 4; |
1036 | 1038 | ||
1039 | mcbsp->dma_data[1].addr = omap_mcbsp_dma_reg_params(mcbsp, 1); | ||
1040 | mcbsp->dma_data[1].maxburst = 4; | ||
1041 | |||
1037 | mcbsp->fclk = clk_get(&pdev->dev, "fck"); | 1042 | mcbsp->fclk = clk_get(&pdev->dev, "fck"); |
1038 | if (IS_ERR(mcbsp->fclk)) { | 1043 | if (IS_ERR(mcbsp->fclk)) { |
1039 | ret = PTR_ERR(mcbsp->fclk); | 1044 | ret = PTR_ERR(mcbsp->fclk); |
diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c index 2ad0370146fd..4db1f8e6e172 100644 --- a/sound/soc/omap/omap-dmic.c +++ b/sound/soc/omap/omap-dmic.c | |||
@@ -57,7 +57,6 @@ struct omap_dmic { | |||
57 | struct mutex mutex; | 57 | struct mutex mutex; |
58 | 58 | ||
59 | struct snd_dmaengine_dai_dma_data dma_data; | 59 | struct snd_dmaengine_dai_dma_data dma_data; |
60 | unsigned int dma_req; | ||
61 | }; | 60 | }; |
62 | 61 | ||
63 | static inline void omap_dmic_write(struct omap_dmic *dmic, u16 reg, u32 val) | 62 | static inline void omap_dmic_write(struct omap_dmic *dmic, u16 reg, u32 val) |
@@ -478,15 +477,7 @@ static int asoc_dmic_probe(struct platform_device *pdev) | |||
478 | } | 477 | } |
479 | dmic->dma_data.addr = res->start + OMAP_DMIC_DATA_REG; | 478 | dmic->dma_data.addr = res->start + OMAP_DMIC_DATA_REG; |
480 | 479 | ||
481 | res = platform_get_resource(pdev, IORESOURCE_DMA, 0); | 480 | dmic->dma_data.filter_data = "up_link"; |
482 | if (!res) { | ||
483 | dev_err(dmic->dev, "invalid dma resource\n"); | ||
484 | ret = -ENODEV; | ||
485 | goto err_put_clk; | ||
486 | } | ||
487 | |||
488 | dmic->dma_req = res->start; | ||
489 | dmic->dma_data.filter_data = &dmic->dma_req; | ||
490 | 481 | ||
491 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); | 482 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); |
492 | if (!res) { | 483 | if (!res) { |
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c index eb05c7ed6d05..a49dc52f8abc 100644 --- a/sound/soc/omap/omap-mcpdm.c +++ b/sound/soc/omap/omap-mcpdm.c | |||
@@ -66,7 +66,6 @@ struct omap_mcpdm { | |||
66 | bool restart; | 66 | bool restart; |
67 | 67 | ||
68 | struct snd_dmaengine_dai_dma_data dma_data[2]; | 68 | struct snd_dmaengine_dai_dma_data dma_data[2]; |
69 | unsigned int dma_req[2]; | ||
70 | }; | 69 | }; |
71 | 70 | ||
72 | /* | 71 | /* |
@@ -477,19 +476,8 @@ static int asoc_mcpdm_probe(struct platform_device *pdev) | |||
477 | mcpdm->dma_data[0].addr = res->start + MCPDM_REG_DN_DATA; | 476 | mcpdm->dma_data[0].addr = res->start + MCPDM_REG_DN_DATA; |
478 | mcpdm->dma_data[1].addr = res->start + MCPDM_REG_UP_DATA; | 477 | mcpdm->dma_data[1].addr = res->start + MCPDM_REG_UP_DATA; |
479 | 478 | ||
480 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "dn_link"); | 479 | mcpdm->dma_data[0].filter_data = "dn_link"; |
481 | if (!res) | 480 | mcpdm->dma_data[1].filter_data = "up_link"; |
482 | return -ENODEV; | ||
483 | |||
484 | mcpdm->dma_req[0] = res->start; | ||
485 | mcpdm->dma_data[0].filter_data = &mcpdm->dma_req[0]; | ||
486 | |||
487 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "up_link"); | ||
488 | if (!res) | ||
489 | return -ENODEV; | ||
490 | |||
491 | mcpdm->dma_req[1] = res->start; | ||
492 | mcpdm->dma_data[1].filter_data = &mcpdm->dma_req[1]; | ||
493 | 481 | ||
494 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); | 482 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); |
495 | if (res == NULL) | 483 | if (res == NULL) |
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index c28e042f2208..a11405de86e8 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
@@ -113,14 +113,25 @@ static int omap_pcm_open(struct snd_pcm_substream *substream) | |||
113 | { | 113 | { |
114 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 114 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
115 | struct snd_dmaengine_dai_dma_data *dma_data; | 115 | struct snd_dmaengine_dai_dma_data *dma_data; |
116 | int ret; | ||
116 | 117 | ||
117 | snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware); | 118 | snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware); |
118 | 119 | ||
119 | dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); | 120 | dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); |
120 | 121 | ||
121 | return snd_dmaengine_pcm_open_request_chan(substream, | 122 | /* DT boot: filter_data is the DMA name */ |
122 | omap_dma_filter_fn, | 123 | if (rtd->cpu_dai->dev->of_node) { |
123 | dma_data->filter_data); | 124 | struct dma_chan *chan; |
125 | |||
126 | chan = dma_request_slave_channel(rtd->cpu_dai->dev, | ||
127 | dma_data->filter_data); | ||
128 | ret = snd_dmaengine_pcm_open(substream, chan); | ||
129 | } else { | ||
130 | ret = snd_dmaengine_pcm_open_request_chan(substream, | ||
131 | omap_dma_filter_fn, | ||
132 | dma_data->filter_data); | ||
133 | } | ||
134 | return ret; | ||
124 | } | 135 | } |
125 | 136 | ||
126 | static int omap_pcm_mmap(struct snd_pcm_substream *substream, | 137 | static int omap_pcm_mmap(struct snd_pcm_substream *substream, |
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 7a1734697434..959c702235c8 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c | |||
@@ -742,13 +742,13 @@ static int config_setup(struct i2s_dai *i2s) | |||
742 | return -EAGAIN; | 742 | return -EAGAIN; |
743 | } | 743 | } |
744 | 744 | ||
745 | /* Don't bother RFS, BFS & PSR in Slave mode */ | ||
746 | if (is_slave(i2s)) | ||
747 | return 0; | ||
748 | |||
749 | set_bfs(i2s, bfs); | 745 | set_bfs(i2s, bfs); |
750 | set_rfs(i2s, rfs); | 746 | set_rfs(i2s, rfs); |
751 | 747 | ||
748 | /* Don't bother with PSR in Slave mode */ | ||
749 | if (is_slave(i2s)) | ||
750 | return 0; | ||
751 | |||
752 | if (!(i2s->quirks & QUIRK_NO_MUXPSR)) { | 752 | if (!(i2s->quirks & QUIRK_NO_MUXPSR)) { |
753 | psr = i2s->rclk_srcrate / i2s->frmclk / rfs; | 753 | psr = i2s->rclk_srcrate / i2s->frmclk / rfs; |
754 | writel(((psr - 1) << 8) | PSR_PSREN, i2s->addr + I2SPSR); | 754 | writel(((psr - 1) << 8) | PSR_PSREN, i2s->addr + I2SPSR); |