Commit 1abfeb03 authored by Takashi Iwai's avatar Takashi Iwai

Merge tag 'asoc-v3.11-rc1' of...

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.
parents 4b884606 4824b69a
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
static const struct reg_default sgtl5000_reg_defaults[] = { static const struct reg_default sgtl5000_reg_defaults[] = {
{ SGTL5000_CHIP_CLK_CTRL, 0x0008 }, { SGTL5000_CHIP_CLK_CTRL, 0x0008 },
{ SGTL5000_CHIP_I2S_CTRL, 0x0010 }, { SGTL5000_CHIP_I2S_CTRL, 0x0010 },
{ SGTL5000_CHIP_SSS_CTRL, 0x0008 }, { SGTL5000_CHIP_SSS_CTRL, 0x0010 },
{ SGTL5000_CHIP_DAC_VOL, 0x3c3c }, { SGTL5000_CHIP_DAC_VOL, 0x3c3c },
{ SGTL5000_CHIP_PAD_STRENGTH, 0x015f }, { SGTL5000_CHIP_PAD_STRENGTH, 0x015f },
{ SGTL5000_CHIP_ANA_HP_CTRL, 0x1818 }, { SGTL5000_CHIP_ANA_HP_CTRL, 0x1818 },
......
...@@ -347,7 +347,7 @@ ...@@ -347,7 +347,7 @@
#define SGTL5000_PLL_INT_DIV_MASK 0xf800 #define SGTL5000_PLL_INT_DIV_MASK 0xf800
#define SGTL5000_PLL_INT_DIV_SHIFT 11 #define SGTL5000_PLL_INT_DIV_SHIFT 11
#define SGTL5000_PLL_INT_DIV_WIDTH 5 #define SGTL5000_PLL_INT_DIV_WIDTH 5
#define SGTL5000_PLL_FRAC_DIV_MASK 0x0700 #define SGTL5000_PLL_FRAC_DIV_MASK 0x07ff
#define SGTL5000_PLL_FRAC_DIV_SHIFT 0 #define SGTL5000_PLL_FRAC_DIV_SHIFT 0
#define SGTL5000_PLL_FRAC_DIV_WIDTH 11 #define SGTL5000_PLL_FRAC_DIV_WIDTH 11
......
...@@ -921,6 +921,7 @@ static struct snd_soc_dai_driver wm8978_dai = { ...@@ -921,6 +921,7 @@ static struct snd_soc_dai_driver wm8978_dai = {
.formats = WM8978_FORMATS, .formats = WM8978_FORMATS,
}, },
.ops = &wm8978_dai_ops, .ops = &wm8978_dai_ops,
.symmetric_rates = 1,
}; };
static int wm8978_suspend(struct snd_soc_codec *codec) static int wm8978_suspend(struct snd_soc_codec *codec)
......
...@@ -3852,8 +3852,6 @@ static void wm8958_mic_work(struct work_struct *work) ...@@ -3852,8 +3852,6 @@ static void wm8958_mic_work(struct work_struct *work)
mic_complete_work.work); mic_complete_work.work);
struct snd_soc_codec *codec = wm8994->hubs.codec; struct snd_soc_codec *codec = wm8994->hubs.codec;
dev_crit(codec->dev, "MIC WORK %x\n", wm8994->mic_status);
pm_runtime_get_sync(codec->dev); pm_runtime_get_sync(codec->dev);
mutex_lock(&wm8994->accdet_lock); mutex_lock(&wm8994->accdet_lock);
...@@ -3863,8 +3861,6 @@ static void wm8958_mic_work(struct work_struct *work) ...@@ -3863,8 +3861,6 @@ static void wm8958_mic_work(struct work_struct *work)
mutex_unlock(&wm8994->accdet_lock); mutex_unlock(&wm8994->accdet_lock);
pm_runtime_put(codec->dev); pm_runtime_put(codec->dev);
dev_crit(codec->dev, "MIC WORK %x DONE\n", wm8994->mic_status);
} }
static irqreturn_t wm8958_mic_irq(int irq, void *data) static irqreturn_t wm8958_mic_irq(int irq, void *data)
......
...@@ -1012,28 +1012,33 @@ int omap_mcbsp_init(struct platform_device *pdev) ...@@ -1012,28 +1012,33 @@ int omap_mcbsp_init(struct platform_device *pdev)
} }
} }
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); if (!pdev->dev.of_node) {
if (!res) { res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
dev_err(&pdev->dev, "invalid rx DMA channel\n"); if (!res) {
return -ENODEV; dev_err(&pdev->dev, "invalid tx DMA channel\n");
} return -ENODEV;
/* RX DMA request number, and port address configuration */ }
mcbsp->dma_req[1] = res->start; mcbsp->dma_req[0] = res->start;
mcbsp->dma_data[1].filter_data = &mcbsp->dma_req[1]; mcbsp->dma_data[0].filter_data = &mcbsp->dma_req[0];
mcbsp->dma_data[1].addr = omap_mcbsp_dma_reg_params(mcbsp, 1);
mcbsp->dma_data[1].maxburst = 4;
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
if (!res) { if (!res) {
dev_err(&pdev->dev, "invalid tx DMA channel\n"); dev_err(&pdev->dev, "invalid rx DMA channel\n");
return -ENODEV; return -ENODEV;
}
mcbsp->dma_req[1] = res->start;
mcbsp->dma_data[1].filter_data = &mcbsp->dma_req[1];
} else {
mcbsp->dma_data[0].filter_data = "tx";
mcbsp->dma_data[1].filter_data = "rx";
} }
/* TX DMA request number, and port address configuration */
mcbsp->dma_req[0] = res->start;
mcbsp->dma_data[0].filter_data = &mcbsp->dma_req[0];
mcbsp->dma_data[0].addr = omap_mcbsp_dma_reg_params(mcbsp, 0); mcbsp->dma_data[0].addr = omap_mcbsp_dma_reg_params(mcbsp, 0);
mcbsp->dma_data[0].maxburst = 4; mcbsp->dma_data[0].maxburst = 4;
mcbsp->dma_data[1].addr = omap_mcbsp_dma_reg_params(mcbsp, 1);
mcbsp->dma_data[1].maxburst = 4;
mcbsp->fclk = clk_get(&pdev->dev, "fck"); mcbsp->fclk = clk_get(&pdev->dev, "fck");
if (IS_ERR(mcbsp->fclk)) { if (IS_ERR(mcbsp->fclk)) {
ret = PTR_ERR(mcbsp->fclk); ret = PTR_ERR(mcbsp->fclk);
......
...@@ -57,7 +57,6 @@ struct omap_dmic { ...@@ -57,7 +57,6 @@ struct omap_dmic {
struct mutex mutex; struct mutex mutex;
struct snd_dmaengine_dai_dma_data dma_data; struct snd_dmaengine_dai_dma_data dma_data;
unsigned int dma_req;
}; };
static inline void omap_dmic_write(struct omap_dmic *dmic, u16 reg, u32 val) 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,15 +477,7 @@ static int asoc_dmic_probe(struct platform_device *pdev)
} }
dmic->dma_data.addr = res->start + OMAP_DMIC_DATA_REG; dmic->dma_data.addr = res->start + OMAP_DMIC_DATA_REG;
res = platform_get_resource(pdev, IORESOURCE_DMA, 0); dmic->dma_data.filter_data = "up_link";
if (!res) {
dev_err(dmic->dev, "invalid dma resource\n");
ret = -ENODEV;
goto err_put_clk;
}
dmic->dma_req = res->start;
dmic->dma_data.filter_data = &dmic->dma_req;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
if (!res) { if (!res) {
......
...@@ -66,7 +66,6 @@ struct omap_mcpdm { ...@@ -66,7 +66,6 @@ struct omap_mcpdm {
bool restart; bool restart;
struct snd_dmaengine_dai_dma_data dma_data[2]; struct snd_dmaengine_dai_dma_data dma_data[2];
unsigned int dma_req[2];
}; };
/* /*
...@@ -477,19 +476,8 @@ static int asoc_mcpdm_probe(struct platform_device *pdev) ...@@ -477,19 +476,8 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
mcpdm->dma_data[0].addr = res->start + MCPDM_REG_DN_DATA; mcpdm->dma_data[0].addr = res->start + MCPDM_REG_DN_DATA;
mcpdm->dma_data[1].addr = res->start + MCPDM_REG_UP_DATA; mcpdm->dma_data[1].addr = res->start + MCPDM_REG_UP_DATA;
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "dn_link"); mcpdm->dma_data[0].filter_data = "dn_link";
if (!res) mcpdm->dma_data[1].filter_data = "up_link";
return -ENODEV;
mcpdm->dma_req[0] = res->start;
mcpdm->dma_data[0].filter_data = &mcpdm->dma_req[0];
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "up_link");
if (!res)
return -ENODEV;
mcpdm->dma_req[1] = res->start;
mcpdm->dma_data[1].filter_data = &mcpdm->dma_req[1];
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
if (res == NULL) if (res == NULL)
......
...@@ -113,14 +113,25 @@ static int omap_pcm_open(struct snd_pcm_substream *substream) ...@@ -113,14 +113,25 @@ static int omap_pcm_open(struct snd_pcm_substream *substream)
{ {
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_dmaengine_dai_dma_data *dma_data; struct snd_dmaengine_dai_dma_data *dma_data;
int ret;
snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware); snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware);
dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
return snd_dmaengine_pcm_open_request_chan(substream, /* DT boot: filter_data is the DMA name */
omap_dma_filter_fn, if (rtd->cpu_dai->dev->of_node) {
dma_data->filter_data); struct dma_chan *chan;
chan = dma_request_slave_channel(rtd->cpu_dai->dev,
dma_data->filter_data);
ret = snd_dmaengine_pcm_open(substream, chan);
} else {
ret = snd_dmaengine_pcm_open_request_chan(substream,
omap_dma_filter_fn,
dma_data->filter_data);
}
return ret;
} }
static int omap_pcm_mmap(struct snd_pcm_substream *substream, static int omap_pcm_mmap(struct snd_pcm_substream *substream,
......
...@@ -742,13 +742,13 @@ static int config_setup(struct i2s_dai *i2s) ...@@ -742,13 +742,13 @@ static int config_setup(struct i2s_dai *i2s)
return -EAGAIN; return -EAGAIN;
} }
/* Don't bother RFS, BFS & PSR in Slave mode */
if (is_slave(i2s))
return 0;
set_bfs(i2s, bfs); set_bfs(i2s, bfs);
set_rfs(i2s, rfs); set_rfs(i2s, rfs);
/* Don't bother with PSR in Slave mode */
if (is_slave(i2s))
return 0;
if (!(i2s->quirks & QUIRK_NO_MUXPSR)) { if (!(i2s->quirks & QUIRK_NO_MUXPSR)) {
psr = i2s->rclk_srcrate / i2s->frmclk / rfs; psr = i2s->rclk_srcrate / i2s->frmclk / rfs;
writel(((psr - 1) << 8) | PSR_PSREN, i2s->addr + I2SPSR); writel(((psr - 1) << 8) | PSR_PSREN, i2s->addr + I2SPSR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment