mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
ASoC: Pull in fixes
cs35l41 is getting some active work and conflicts, plus some of the fixes are needed for my testing. Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
commit
9a2c984189
@ -831,12 +831,14 @@ int cs35l41_otp_unpack(struct device *dev, struct regmap *regmap)
|
||||
GENMASK(bit_offset + otp_map[i].size - 33, 0)) <<
|
||||
(32 - bit_offset);
|
||||
bit_offset += otp_map[i].size - 32;
|
||||
} else {
|
||||
} else if (bit_offset + otp_map[i].size - 1 >= 0) {
|
||||
otp_val = (otp_mem[word_offset] &
|
||||
GENMASK(bit_offset + otp_map[i].size - 1, bit_offset)
|
||||
) >> bit_offset;
|
||||
bit_offset += otp_map[i].size;
|
||||
}
|
||||
} else /* both bit_offset and otp_map[i].size are 0 */
|
||||
otp_val = 0;
|
||||
|
||||
bit_sum += otp_map[i].size;
|
||||
|
||||
if (bit_offset == 32) {
|
||||
|
@ -2822,14 +2822,11 @@ static int rt5682_bclk_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
|
||||
for_each_component_dais(component, dai)
|
||||
if (dai->id == RT5682_AIF1)
|
||||
break;
|
||||
if (!dai) {
|
||||
dev_err(rt5682->i2c_dev, "dai %d not found in component\n",
|
||||
RT5682_AIF1);
|
||||
return -ENODEV;
|
||||
}
|
||||
return rt5682_set_bclk1_ratio(dai, factor);
|
||||
|
||||
return rt5682_set_bclk1_ratio(dai, factor);
|
||||
dev_err(rt5682->i2c_dev, "dai %d not found in component\n",
|
||||
RT5682_AIF1);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static const struct clk_ops rt5682_dai_clk_ops[RT5682_DAI_NUM_CLKS] = {
|
||||
|
@ -2687,14 +2687,11 @@ static int rt5682s_bclk_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
|
||||
for_each_component_dais(component, dai)
|
||||
if (dai->id == RT5682S_AIF1)
|
||||
break;
|
||||
if (!dai) {
|
||||
dev_err(component->dev, "dai %d not found in component\n",
|
||||
RT5682S_AIF1);
|
||||
return -ENODEV;
|
||||
}
|
||||
return rt5682s_set_bclk1_ratio(dai, factor);
|
||||
|
||||
return rt5682s_set_bclk1_ratio(dai, factor);
|
||||
dev_err(component->dev, "dai %d not found in component\n",
|
||||
RT5682S_AIF1);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static const struct clk_ops rt5682s_dai_clk_ops[RT5682S_DAI_NUM_CLKS] = {
|
||||
|
@ -1687,8 +1687,7 @@ static void dapm_seq_run(struct snd_soc_card *card,
|
||||
switch (w->id) {
|
||||
case snd_soc_dapm_pre:
|
||||
if (!w->event)
|
||||
list_for_each_entry_safe_continue(w, n, list,
|
||||
power_list);
|
||||
continue;
|
||||
|
||||
if (event == SND_SOC_DAPM_STREAM_START)
|
||||
ret = w->event(w,
|
||||
@ -1700,8 +1699,7 @@ static void dapm_seq_run(struct snd_soc_card *card,
|
||||
|
||||
case snd_soc_dapm_post:
|
||||
if (!w->event)
|
||||
list_for_each_entry_safe_continue(w, n, list,
|
||||
power_list);
|
||||
continue;
|
||||
|
||||
if (event == SND_SOC_DAPM_STREAM_START)
|
||||
ret = w->event(w,
|
||||
|
@ -1214,7 +1214,7 @@ static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe,
|
||||
be_substream->pcm->nonatomic = 1;
|
||||
}
|
||||
|
||||
dpcm = kzalloc(sizeof(struct snd_soc_dpcm), GFP_ATOMIC);
|
||||
dpcm = kzalloc(sizeof(struct snd_soc_dpcm), GFP_KERNEL);
|
||||
if (!dpcm)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -1402,12 +1402,12 @@ static int soc_tplg_dapm_widget_create(struct soc_tplg *tplg,
|
||||
template.num_kcontrols = le32_to_cpu(w->num_kcontrols);
|
||||
kc = devm_kcalloc(tplg->dev, le32_to_cpu(w->num_kcontrols), sizeof(*kc), GFP_KERNEL);
|
||||
if (!kc)
|
||||
goto err;
|
||||
goto hdr_err;
|
||||
|
||||
kcontrol_type = devm_kcalloc(tplg->dev, le32_to_cpu(w->num_kcontrols), sizeof(unsigned int),
|
||||
GFP_KERNEL);
|
||||
if (!kcontrol_type)
|
||||
goto err;
|
||||
goto hdr_err;
|
||||
|
||||
for (i = 0; i < le32_to_cpu(w->num_kcontrols); i++) {
|
||||
control_hdr = (struct snd_soc_tplg_ctl_hdr *)tplg->pos;
|
||||
|
@ -952,11 +952,13 @@ static int sof_control_load(struct snd_soc_component *scomp, int index,
|
||||
default:
|
||||
dev_warn(scomp->dev, "control type not supported %d:%d:%d\n",
|
||||
hdr->ops.get, hdr->ops.put, hdr->ops.info);
|
||||
kfree(scontrol->name);
|
||||
kfree(scontrol);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ret < 0) {
|
||||
kfree(scontrol->name);
|
||||
kfree(scontrol);
|
||||
return ret;
|
||||
}
|
||||
@ -1391,6 +1393,7 @@ static int sof_widget_unload(struct snd_soc_component *scomp,
|
||||
}
|
||||
kfree(scontrol->ipc_control_data);
|
||||
list_del(&scontrol->list);
|
||||
kfree(scontrol->name);
|
||||
kfree(scontrol);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user