Commit d2893232 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branch 'asoc/topic/core' into asoc-next

parents 6a473669 b5a8fe43
...@@ -53,7 +53,7 @@ struct snd_compr_stream; ...@@ -53,7 +53,7 @@ struct snd_compr_stream;
* Specifies whether the DAI can also support inverted clocks for the specified * Specifies whether the DAI can also support inverted clocks for the specified
* format. * format.
*/ */
#define SND_SOC_DAIFMT_NB_NF (1 << 8) /* normal bit clock + frame */ #define SND_SOC_DAIFMT_NB_NF (0 << 8) /* normal bit clock + frame */
#define SND_SOC_DAIFMT_NB_IF (2 << 8) /* normal BCLK + inv FRM */ #define SND_SOC_DAIFMT_NB_IF (2 << 8) /* normal BCLK + inv FRM */
#define SND_SOC_DAIFMT_IB_NF (3 << 8) /* invert BCLK + nor FRM */ #define SND_SOC_DAIFMT_IB_NF (3 << 8) /* invert BCLK + nor FRM */
#define SND_SOC_DAIFMT_IB_IF (4 << 8) /* invert BCLK + FRM */ #define SND_SOC_DAIFMT_IB_IF (4 << 8) /* invert BCLK + FRM */
......
...@@ -906,8 +906,8 @@ struct snd_soc_dai_link { ...@@ -906,8 +906,8 @@ struct snd_soc_dai_link {
struct snd_pcm_hw_params *params); struct snd_pcm_hw_params *params);
/* machine stream operations */ /* machine stream operations */
struct snd_soc_ops *ops; const struct snd_soc_ops *ops;
struct snd_soc_compr_ops *compr_ops; const struct snd_soc_compr_ops *compr_ops;
}; };
struct snd_soc_codec_conf { struct snd_soc_codec_conf {
......
...@@ -1107,6 +1107,10 @@ static int soc_probe_codec(struct snd_soc_card *card, ...@@ -1107,6 +1107,10 @@ static int soc_probe_codec(struct snd_soc_card *card,
"ASoC: failed to probe CODEC %d\n", ret); "ASoC: failed to probe CODEC %d\n", ret);
goto err_probe; goto err_probe;
} }
WARN(codec->dapm.idle_bias_off &&
codec->dapm.bias_level != SND_SOC_BIAS_OFF,
"codec %s can not start from non-off bias"
" with idle_bias_off==1\n", codec->name);
} }
/* If the driver didn't set I/O up try regmap */ /* If the driver didn't set I/O up try regmap */
...@@ -3122,9 +3126,12 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol, ...@@ -3122,9 +3126,12 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol,
if (!codec->using_regmap) if (!codec->using_regmap)
return -EINVAL; return -EINVAL;
data = ucontrol->value.bytes.data;
len = params->num_regs * codec->val_bytes; len = params->num_regs * codec->val_bytes;
data = kmemdup(ucontrol->value.bytes.data, len, GFP_KERNEL | GFP_DMA);
if (!data)
return -ENOMEM;
/* /*
* If we've got a mask then we need to preserve the register * If we've got a mask then we need to preserve the register
* bits. We shouldn't modify the incoming data so take a * bits. We shouldn't modify the incoming data so take a
...@@ -3137,10 +3144,6 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol, ...@@ -3137,10 +3144,6 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol,
val &= params->mask; val &= params->mask;
data = kmemdup(data, len, GFP_KERNEL);
if (!data)
return -ENOMEM;
switch (codec->val_bytes) { switch (codec->val_bytes) {
case 1: case 1:
((u8 *)data)[0] &= ~params->mask; ((u8 *)data)[0] &= ~params->mask;
...@@ -3162,8 +3165,7 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol, ...@@ -3162,8 +3165,7 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol,
ret = regmap_raw_write(codec->control_data, params->base, ret = regmap_raw_write(codec->control_data, params->base,
data, len); data, len);
if (params->mask) kfree(data);
kfree(data);
return ret; return ret;
} }
......
...@@ -1728,20 +1728,16 @@ static int dpcm_run_update_startup(struct snd_soc_pcm_runtime *fe, int stream) ...@@ -1728,20 +1728,16 @@ static int dpcm_run_update_startup(struct snd_soc_pcm_runtime *fe, int stream)
/* startup must always be called for new BEs */ /* startup must always be called for new BEs */
ret = dpcm_be_dai_startup(fe, stream); ret = dpcm_be_dai_startup(fe, stream);
if (ret < 0) { if (ret < 0)
goto disconnect; goto disconnect;
return ret;
}
/* keep going if FE state is > open */ /* keep going if FE state is > open */
if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_OPEN) if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_OPEN)
return 0; return 0;
ret = dpcm_be_dai_hw_params(fe, stream); ret = dpcm_be_dai_hw_params(fe, stream);
if (ret < 0) { if (ret < 0)
goto close; goto close;
return ret;
}
/* keep going if FE state is > hw_params */ /* keep going if FE state is > hw_params */
if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_HW_PARAMS) if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_HW_PARAMS)
...@@ -1749,10 +1745,8 @@ static int dpcm_run_update_startup(struct snd_soc_pcm_runtime *fe, int stream) ...@@ -1749,10 +1745,8 @@ static int dpcm_run_update_startup(struct snd_soc_pcm_runtime *fe, int stream)
ret = dpcm_be_dai_prepare(fe, stream); ret = dpcm_be_dai_prepare(fe, stream);
if (ret < 0) { if (ret < 0)
goto hw_free; goto hw_free;
return ret;
}
/* run the stream event for each BE */ /* run the stream event for each BE */
dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_NOP); dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_NOP);
......
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