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

Commit 7d40acc3 authored by Jyri Sarha's avatar Jyri Sarha Committed by Mark Brown
Browse files

ASoC: omap-hdmi-audio: Set buffer bytes step constraint to 128



Set buffer bytes step constraint to 128. A matching constraint has
already been set to period size. This helps PCM setup to tolerate ALSA
clients that set the PCM hw params in unusual order.

Signed-off-by: default avatarJyri Sarha <jsarha@ti.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5aec892a
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -81,7 +81,15 @@ static int hdmi_dai_startup(struct snd_pcm_substream *substream,
	ret = snd_pcm_hw_constraint_step(substream->runtime, 0,
	ret = snd_pcm_hw_constraint_step(substream->runtime, 0,
					 SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 128);
					 SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 128);
	if (ret < 0) {
	if (ret < 0) {
		dev_err(dai->dev, "could not apply constraint\n");
		dev_err(dai->dev, "Could not apply period constraint: %d\n",
			ret);
		return ret;
	}
	ret = snd_pcm_hw_constraint_step(substream->runtime, 0,
					 SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 128);
	if (ret < 0) {
		dev_err(dai->dev, "Could not apply buffer constraint: %d\n",
			ret);
		return ret;
		return ret;
	}
	}