Skip to content

Commit

Permalink
Merge tag 'asoc-v3.11-rc1' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/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.
  • Loading branch information
tiwai committed Jul 15, 2013
2 parents 4b88460 + 4824b69 commit 1abfeb0
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 54 deletions.
2 changes: 1 addition & 1 deletion sound/soc/codecs/sgtl5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
static const struct reg_default sgtl5000_reg_defaults[] = {
{ SGTL5000_CHIP_CLK_CTRL, 0x0008 },
{ SGTL5000_CHIP_I2S_CTRL, 0x0010 },
{ SGTL5000_CHIP_SSS_CTRL, 0x0008 },
{ SGTL5000_CHIP_SSS_CTRL, 0x0010 },
{ SGTL5000_CHIP_DAC_VOL, 0x3c3c },
{ SGTL5000_CHIP_PAD_STRENGTH, 0x015f },
{ SGTL5000_CHIP_ANA_HP_CTRL, 0x1818 },
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/sgtl5000.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@
#define SGTL5000_PLL_INT_DIV_MASK 0xf800
#define SGTL5000_PLL_INT_DIV_SHIFT 11
#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_WIDTH 11

Expand Down
1 change: 1 addition & 0 deletions sound/soc/codecs/wm8978.c
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ static struct snd_soc_dai_driver wm8978_dai = {
.formats = WM8978_FORMATS,
},
.ops = &wm8978_dai_ops,
.symmetric_rates = 1,
};

static int wm8978_suspend(struct snd_soc_codec *codec)
Expand Down
4 changes: 0 additions & 4 deletions sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -3852,8 +3852,6 @@ static void wm8958_mic_work(struct work_struct *work)
mic_complete_work.work);
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);

mutex_lock(&wm8994->accdet_lock);
Expand All @@ -3863,8 +3861,6 @@ static void wm8958_mic_work(struct work_struct *work)
mutex_unlock(&wm8994->accdet_lock);

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)
Expand Down
39 changes: 22 additions & 17 deletions sound/soc/omap/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,28 +1012,33 @@ int omap_mcbsp_init(struct platform_device *pdev)
}
}

res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
if (!res) {
dev_err(&pdev->dev, "invalid rx DMA channel\n");
return -ENODEV;
}
/* RX DMA request number, and port address configuration */
mcbsp->dma_req[1] = res->start;
mcbsp->dma_data[1].filter_data = &mcbsp->dma_req[1];
mcbsp->dma_data[1].addr = omap_mcbsp_dma_reg_params(mcbsp, 1);
mcbsp->dma_data[1].maxburst = 4;
if (!pdev->dev.of_node) {
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
if (!res) {
dev_err(&pdev->dev, "invalid tx DMA channel\n");
return -ENODEV;
}
mcbsp->dma_req[0] = res->start;
mcbsp->dma_data[0].filter_data = &mcbsp->dma_req[0];

res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
if (!res) {
dev_err(&pdev->dev, "invalid tx DMA channel\n");
return -ENODEV;
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
if (!res) {
dev_err(&pdev->dev, "invalid rx DMA channel\n");
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].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");
if (IS_ERR(mcbsp->fclk)) {
ret = PTR_ERR(mcbsp->fclk);
Expand Down
11 changes: 1 addition & 10 deletions sound/soc/omap/omap-dmic.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ struct omap_dmic {
struct mutex mutex;

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)
Expand Down Expand Up @@ -478,15 +477,7 @@ static int asoc_dmic_probe(struct platform_device *pdev)
}
dmic->dma_data.addr = res->start + OMAP_DMIC_DATA_REG;

res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
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;
dmic->dma_data.filter_data = "up_link";

res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
if (!res) {
Expand Down
16 changes: 2 additions & 14 deletions sound/soc/omap/omap-mcpdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ struct omap_mcpdm {
bool restart;

struct snd_dmaengine_dai_dma_data dma_data[2];
unsigned int dma_req[2];
};

/*
Expand Down Expand Up @@ -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[1].addr = res->start + MCPDM_REG_UP_DATA;

res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "dn_link");
if (!res)
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];
mcpdm->dma_data[0].filter_data = "dn_link";
mcpdm->dma_data[1].filter_data = "up_link";

res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
if (res == NULL)
Expand Down
17 changes: 14 additions & 3 deletions sound/soc/omap/omap-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_dmaengine_dai_dma_data *dma_data;
int ret;

snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware);

dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);

return snd_dmaengine_pcm_open_request_chan(substream,
omap_dma_filter_fn,
dma_data->filter_data);
/* DT boot: filter_data is the DMA name */
if (rtd->cpu_dai->dev->of_node) {
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,
Expand Down
8 changes: 4 additions & 4 deletions sound/soc/samsung/i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,13 +742,13 @@ static int config_setup(struct i2s_dai *i2s)
return -EAGAIN;
}

/* Don't bother RFS, BFS & PSR in Slave mode */
if (is_slave(i2s))
return 0;

set_bfs(i2s, bfs);
set_rfs(i2s, rfs);

/* Don't bother with PSR in Slave mode */
if (is_slave(i2s))
return 0;

if (!(i2s->quirks & QUIRK_NO_MUXPSR)) {
psr = i2s->rclk_srcrate / i2s->frmclk / rfs;
writel(((psr - 1) << 8) | PSR_PSREN, i2s->addr + I2SPSR);
Expand Down

0 comments on commit 1abfeb0

Please sign in to comment.