Unverified Commit 9a2c9841 authored by Mark Brown's avatar Mark Brown
Browse files

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: default avatarMark Brown <broonie@kernel.org>
parents 66e384d8 0b3d5d2e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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) {
+4 −7
Original line number Diff line number Diff line
@@ -2822,16 +2822,13 @@ 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) {
			return rt5682_set_bclk1_ratio(dai, factor);

	dev_err(rt5682->i2c_dev, "dai %d not found in component\n",
		RT5682_AIF1);
	return -ENODEV;
}

	return rt5682_set_bclk1_ratio(dai, factor);
}

static const struct clk_ops rt5682_dai_clk_ops[RT5682_DAI_NUM_CLKS] = {
	[RT5682_DAI_WCLK_IDX] = {
		.prepare = rt5682_wclk_prepare,
+4 −7
Original line number Diff line number Diff line
@@ -2687,16 +2687,13 @@ 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) {
			return rt5682s_set_bclk1_ratio(dai, factor);

	dev_err(component->dev, "dai %d not found in component\n",
		RT5682S_AIF1);
	return -ENODEV;
}

	return rt5682s_set_bclk1_ratio(dai, factor);
}

static const struct clk_ops rt5682s_dai_clk_ops[RT5682S_DAI_NUM_CLKS] = {
	[RT5682S_DAI_WCLK_IDX] = {
		.prepare = rt5682s_wclk_prepare,
+2 −4
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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;

Loading