Unverified Commit c0b38be1 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Pull in fixes

Cleanups for the dmaengine code build on top of current fixes.
parents 55d2a66c a962890a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -955,8 +955,7 @@ static int cs_dsp_create_control(struct cs_dsp *dsp,
	ctl->alg_region = *alg_region;
	if (subname && dsp->fw_ver >= 2) {
		ctl->subname_len = subname_len;
		ctl->subname = kmemdup(subname,
				       strlen(subname) + 1, GFP_KERNEL);
		ctl->subname = kasprintf(GFP_KERNEL, "%.*s", subname_len, subname);
		if (!ctl->subname) {
			ret = -ENOMEM;
			goto err_ctl;
+1 −0
Original line number Diff line number Diff line
@@ -966,6 +966,7 @@ static int mchp_pdmc_process(struct snd_pcm_substream *substream,

static struct snd_dmaengine_pcm_config mchp_pdmc_config = {
	.process = mchp_pdmc_process,
	.prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config,
};

static int mchp_pdmc_probe(struct platform_device *pdev)
+10 −4
Original line number Diff line number Diff line
@@ -446,7 +446,7 @@ static int da7219_tonegen_freq_put(struct snd_kcontrol *kcontrol,
	struct soc_mixer_control *mixer_ctrl =
		(struct soc_mixer_control *) kcontrol->private_value;
	unsigned int reg = mixer_ctrl->reg;
	__le16 val;
	__le16 val_new, val_old;
	int ret;

	/*
@@ -454,13 +454,19 @@ static int da7219_tonegen_freq_put(struct snd_kcontrol *kcontrol,
	 * Therefore we need to convert to little endian here to align with
	 * HW registers.
	 */
	val = cpu_to_le16(ucontrol->value.integer.value[0]);
	val_new = cpu_to_le16(ucontrol->value.integer.value[0]);

	mutex_lock(&da7219->ctrl_lock);
	ret = regmap_raw_write(da7219->regmap, reg, &val, sizeof(val));
	ret = regmap_raw_read(da7219->regmap, reg, &val_old, sizeof(val_old));
	if (ret == 0 && (val_old != val_new))
		ret = regmap_raw_write(da7219->regmap, reg,
				&val_new, sizeof(val_new));
	mutex_unlock(&da7219->ctrl_lock);

	if (ret < 0)
		return ret;

	return val_old != val_new;
}


+10 −4
Original line number Diff line number Diff line
@@ -3566,12 +3566,16 @@ static int rx_macro_probe(struct platform_device *pdev)
		return PTR_ERR(rx->pds);

	base = devm_platform_ioremap_resource(pdev, 0);
	if (IS_ERR(base))
		return PTR_ERR(base);
	if (IS_ERR(base)) {
		ret = PTR_ERR(base);
		goto err;
	}

	rx->regmap = devm_regmap_init_mmio(dev, base, &rx_regmap_config);
	if (IS_ERR(rx->regmap))
		return PTR_ERR(rx->regmap);
	if (IS_ERR(rx->regmap)) {
		ret = PTR_ERR(rx->regmap);
		goto err;
	}

	dev_set_drvdata(dev, rx);

@@ -3632,6 +3636,8 @@ static int rx_macro_probe(struct platform_device *pdev)
err_dcodec:
	clk_disable_unprepare(rx->macro);
err:
	lpass_macro_pds_exit(rx->pds);

	return ret;
}

+10 −4
Original line number Diff line number Diff line
@@ -1828,8 +1828,10 @@ static int tx_macro_probe(struct platform_device *pdev)
		return PTR_ERR(tx->pds);

	base = devm_platform_ioremap_resource(pdev, 0);
	if (IS_ERR(base))
		return PTR_ERR(base);
	if (IS_ERR(base)) {
		ret = PTR_ERR(base);
		goto err;
	}

	/* Update defaults for lpass sc7280 */
	if (of_device_is_compatible(np, "qcom,sc7280-lpass-tx-macro")) {
@@ -1846,8 +1848,10 @@ static int tx_macro_probe(struct platform_device *pdev)
	}

	tx->regmap = devm_regmap_init_mmio(dev, base, &tx_regmap_config);
	if (IS_ERR(tx->regmap))
		return PTR_ERR(tx->regmap);
	if (IS_ERR(tx->regmap)) {
		ret = PTR_ERR(tx->regmap);
		goto err;
	}

	dev_set_drvdata(dev, tx);

@@ -1907,6 +1911,8 @@ static int tx_macro_probe(struct platform_device *pdev)
err_dcodec:
	clk_disable_unprepare(tx->macro);
err:
	lpass_macro_pds_exit(tx->pds);

	return ret;
}

Loading