Commit 733f4c79 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'asoc/fix/imx-spdif', 'asoc/fix/mtk',...

Merge remote-tracking branches 'asoc/fix/imx-spdif', 'asoc/fix/mtk', 'asoc/fix/mxs-saif', 'asoc/fix/qcom' and 'asoc/fix/rt286' into asoc-linus
...@@ -266,6 +266,8 @@ static int rt286_jack_detect(struct rt286_priv *rt286, bool *hp, bool *mic) ...@@ -266,6 +266,8 @@ static int rt286_jack_detect(struct rt286_priv *rt286, bool *hp, bool *mic)
} else { } else {
*mic = false; *mic = false;
regmap_write(rt286->regmap, RT286_SET_MIC1, 0x20); regmap_write(rt286->regmap, RT286_SET_MIC1, 0x20);
regmap_update_bits(rt286->regmap,
RT286_CBJ_CTRL1, 0x0400, 0x0000);
} }
} else { } else {
regmap_read(rt286->regmap, RT286_GET_HP_SENSE, &buf); regmap_read(rt286->regmap, RT286_GET_HP_SENSE, &buf);
...@@ -470,24 +472,6 @@ static int rt286_set_dmic1_event(struct snd_soc_dapm_widget *w, ...@@ -470,24 +472,6 @@ static int rt286_set_dmic1_event(struct snd_soc_dapm_widget *w,
return 0; return 0;
} }
static int rt286_vref_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
snd_soc_update_bits(codec,
RT286_CBJ_CTRL1, 0x0400, 0x0000);
mdelay(50);
break;
default:
return 0;
}
return 0;
}
static int rt286_ldo2_event(struct snd_soc_dapm_widget *w, static int rt286_ldo2_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) struct snd_kcontrol *kcontrol, int event)
{ {
...@@ -536,7 +520,7 @@ static const struct snd_soc_dapm_widget rt286_dapm_widgets[] = { ...@@ -536,7 +520,7 @@ static const struct snd_soc_dapm_widget rt286_dapm_widgets[] = {
SND_SOC_DAPM_SUPPLY_S("HV", 1, RT286_POWER_CTRL1, SND_SOC_DAPM_SUPPLY_S("HV", 1, RT286_POWER_CTRL1,
12, 1, NULL, 0), 12, 1, NULL, 0),
SND_SOC_DAPM_SUPPLY("VREF", RT286_POWER_CTRL1, SND_SOC_DAPM_SUPPLY("VREF", RT286_POWER_CTRL1,
0, 1, rt286_vref_event, SND_SOC_DAPM_PRE_PMU), 0, 1, NULL, 0),
SND_SOC_DAPM_SUPPLY_S("LDO1", 1, RT286_POWER_CTRL2, SND_SOC_DAPM_SUPPLY_S("LDO1", 1, RT286_POWER_CTRL2,
2, 0, NULL, 0), 2, 0, NULL, 0),
SND_SOC_DAPM_SUPPLY_S("LDO2", 2, RT286_POWER_CTRL1, SND_SOC_DAPM_SUPPLY_S("LDO2", 2, RT286_POWER_CTRL1,
...@@ -910,8 +894,6 @@ static int rt286_set_bias_level(struct snd_soc_codec *codec, ...@@ -910,8 +894,6 @@ static int rt286_set_bias_level(struct snd_soc_codec *codec,
case SND_SOC_BIAS_ON: case SND_SOC_BIAS_ON:
mdelay(10); mdelay(10);
snd_soc_update_bits(codec,
RT286_CBJ_CTRL1, 0x0400, 0x0400);
snd_soc_update_bits(codec, snd_soc_update_bits(codec,
RT286_DC_GAIN, 0x200, 0x0); RT286_DC_GAIN, 0x200, 0x0);
...@@ -920,8 +902,6 @@ static int rt286_set_bias_level(struct snd_soc_codec *codec, ...@@ -920,8 +902,6 @@ static int rt286_set_bias_level(struct snd_soc_codec *codec,
case SND_SOC_BIAS_STANDBY: case SND_SOC_BIAS_STANDBY:
snd_soc_write(codec, snd_soc_write(codec,
RT286_SET_AUDIO_POWER, AC_PWRST_D3); RT286_SET_AUDIO_POWER, AC_PWRST_D3);
snd_soc_update_bits(codec,
RT286_CBJ_CTRL1, 0x0400, 0x0000);
break; break;
default: default:
......
...@@ -72,8 +72,6 @@ static int imx_spdif_audio_probe(struct platform_device *pdev) ...@@ -72,8 +72,6 @@ static int imx_spdif_audio_probe(struct platform_device *pdev)
goto end; goto end;
} }
platform_set_drvdata(pdev, data);
end: end:
of_node_put(spdif_np); of_node_put(spdif_np);
......
...@@ -9,7 +9,7 @@ config SND_SOC_MEDIATEK ...@@ -9,7 +9,7 @@ config SND_SOC_MEDIATEK
config SND_SOC_MT8173_MAX98090 config SND_SOC_MT8173_MAX98090
tristate "ASoC Audio driver for MT8173 with MAX98090 codec" tristate "ASoC Audio driver for MT8173 with MAX98090 codec"
depends on SND_SOC_MEDIATEK depends on SND_SOC_MEDIATEK && I2C
select SND_SOC_MAX98090 select SND_SOC_MAX98090
help help
This adds ASoC driver for Mediatek MT8173 boards This adds ASoC driver for Mediatek MT8173 boards
...@@ -19,7 +19,7 @@ config SND_SOC_MT8173_MAX98090 ...@@ -19,7 +19,7 @@ config SND_SOC_MT8173_MAX98090
config SND_SOC_MT8173_RT5650_RT5676 config SND_SOC_MT8173_RT5650_RT5676
tristate "ASoC Audio driver for MT8173 with RT5650 RT5676 codecs" tristate "ASoC Audio driver for MT8173 with RT5650 RT5676 codecs"
depends on SND_SOC_MEDIATEK depends on SND_SOC_MEDIATEK && I2C
select SND_SOC_RT5645 select SND_SOC_RT5645
select SND_SOC_RT5677 select SND_SOC_RT5677
help help
......
...@@ -381,9 +381,19 @@ static int mxs_saif_startup(struct snd_pcm_substream *substream, ...@@ -381,9 +381,19 @@ static int mxs_saif_startup(struct snd_pcm_substream *substream,
__raw_writel(BM_SAIF_CTRL_CLKGATE, __raw_writel(BM_SAIF_CTRL_CLKGATE,
saif->base + SAIF_CTRL + MXS_CLR_ADDR); saif->base + SAIF_CTRL + MXS_CLR_ADDR);
clk_prepare(saif->clk);
return 0; return 0;
} }
static void mxs_saif_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai)
{
struct mxs_saif *saif = snd_soc_dai_get_drvdata(cpu_dai);
clk_unprepare(saif->clk);
}
/* /*
* Should only be called when port is inactive. * Should only be called when port is inactive.
* although can be called multiple times by upper layers. * although can be called multiple times by upper layers.
...@@ -424,8 +434,6 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream, ...@@ -424,8 +434,6 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
return ret; return ret;
} }
/* prepare clk in hw_param, enable in trigger */
clk_prepare(saif->clk);
if (saif != master_saif) { if (saif != master_saif) {
/* /*
* Set an initial clock rate for the saif internal logic to work * Set an initial clock rate for the saif internal logic to work
...@@ -611,6 +619,7 @@ static int mxs_saif_trigger(struct snd_pcm_substream *substream, int cmd, ...@@ -611,6 +619,7 @@ static int mxs_saif_trigger(struct snd_pcm_substream *substream, int cmd,
static const struct snd_soc_dai_ops mxs_saif_dai_ops = { static const struct snd_soc_dai_ops mxs_saif_dai_ops = {
.startup = mxs_saif_startup, .startup = mxs_saif_startup,
.shutdown = mxs_saif_shutdown,
.trigger = mxs_saif_trigger, .trigger = mxs_saif_trigger,
.prepare = mxs_saif_prepare, .prepare = mxs_saif_prepare,
.hw_params = mxs_saif_hw_params, .hw_params = mxs_saif_hw_params,
......
...@@ -440,18 +440,18 @@ static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data) ...@@ -440,18 +440,18 @@ static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data)
} }
static int lpass_platform_alloc_buffer(struct snd_pcm_substream *substream, static int lpass_platform_alloc_buffer(struct snd_pcm_substream *substream,
struct snd_soc_pcm_runtime *soc_runtime) struct snd_soc_pcm_runtime *rt)
{ {
struct snd_dma_buffer *buf = &substream->dma_buffer; struct snd_dma_buffer *buf = &substream->dma_buffer;
size_t size = lpass_platform_pcm_hardware.buffer_bytes_max; size_t size = lpass_platform_pcm_hardware.buffer_bytes_max;
buf->dev.type = SNDRV_DMA_TYPE_DEV; buf->dev.type = SNDRV_DMA_TYPE_DEV;
buf->dev.dev = soc_runtime->dev; buf->dev.dev = rt->platform->dev;
buf->private_data = NULL; buf->private_data = NULL;
buf->area = dma_alloc_coherent(soc_runtime->dev, size, &buf->addr, buf->area = dma_alloc_coherent(rt->platform->dev, size, &buf->addr,
GFP_KERNEL); GFP_KERNEL);
if (!buf->area) { if (!buf->area) {
dev_err(soc_runtime->dev, "%s: Could not allocate DMA buffer\n", dev_err(rt->platform->dev, "%s: Could not allocate DMA buffer\n",
__func__); __func__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -461,12 +461,12 @@ static int lpass_platform_alloc_buffer(struct snd_pcm_substream *substream, ...@@ -461,12 +461,12 @@ static int lpass_platform_alloc_buffer(struct snd_pcm_substream *substream,
} }
static void lpass_platform_free_buffer(struct snd_pcm_substream *substream, static void lpass_platform_free_buffer(struct snd_pcm_substream *substream,
struct snd_soc_pcm_runtime *soc_runtime) struct snd_soc_pcm_runtime *rt)
{ {
struct snd_dma_buffer *buf = &substream->dma_buffer; struct snd_dma_buffer *buf = &substream->dma_buffer;
if (buf->area) { if (buf->area) {
dma_free_coherent(soc_runtime->dev, buf->bytes, buf->area, dma_free_coherent(rt->dev, buf->bytes, buf->area,
buf->addr); buf->addr);
} }
buf->area = NULL; buf->area = NULL;
...@@ -499,9 +499,6 @@ static int lpass_platform_pcm_new(struct snd_soc_pcm_runtime *soc_runtime) ...@@ -499,9 +499,6 @@ static int lpass_platform_pcm_new(struct snd_soc_pcm_runtime *soc_runtime)
snd_soc_pcm_set_drvdata(soc_runtime, data); snd_soc_pcm_set_drvdata(soc_runtime, data);
soc_runtime->dev->coherent_dma_mask = DMA_BIT_MASK(32);
soc_runtime->dev->dma_mask = &soc_runtime->dev->coherent_dma_mask;
ret = lpass_platform_alloc_buffer(substream, soc_runtime); ret = lpass_platform_alloc_buffer(substream, soc_runtime);
if (ret) if (ret)
return ret; return ret;
......
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