Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 6fa4e0ca authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown
Browse files

ASoC: pcm3168a: Allow reconfiguration of tdm_slots and slot_width



When using right_j format and the codec is slave it can support 16bit
format, but only if slot_width == 16, in the same DAI mode the 24 bit
audio can work with 24 or 32 slot_width.

Because of this, the codec and CPU needs to be reconfigured when the sample
format changes.

Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20190812095226.18870-3-peter.ujfalusi@ti.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent abe51c35
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -402,18 +402,6 @@ static int pcm3168a_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
		return -EINVAL;
	}

	if (io_params->tdm_slots && io_params->tdm_slots != slots) {
		dev_err(component->dev, "Not matching slots %d vs %d\n",
			io_params->tdm_slots, slots);
		return -EINVAL;
	}

	if (io_params->slot_width && io_params->slot_width != slot_width) {
		dev_err(component->dev, "Not matching slot_width %d vs %d\n",
			io_params->slot_width, slot_width);
		return -EINVAL;
	}

	io_params->tdm_slots = slots;
	io_params->slot_width = slot_width;
	/* Ignore the not relevant mask for the DAI/direction */