From: Jyri Sarha <jsarha@ti.com>
To: alsa-devel@alsa-project.org, linux-fbdev@vger.kernel.org,
linux-omap@vger.kernel.org
Cc: peter.ujfalusi@ti.com, liam.r.girdwood@linux.intel.com,
tomi.valkeinen@ti.com, broonie@kernel.org,
Jyri Sarha <jsarha@ti.com>
Subject: [PATCH 2/2] ASoC: omap-hdmi-audio: Set buffer bytes step constraint to 128
Date: Wed, 26 Aug 2015 16:11:40 +0300 [thread overview]
Message-ID: <041db517d2b5313648e20536a3fc0b13d4a72d09.1440594174.git.jsarha@ti.com> (raw)
In-Reply-To: <cover.1440594174.git.jsarha@ti.com>
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: Jyri Sarha <jsarha@ti.com>
---
sound/soc/omap/omap-hdmi-audio.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sound/soc/omap/omap-hdmi-audio.c b/sound/soc/omap/omap-hdmi-audio.c
index aeef25c..584b237 100644
--- a/sound/soc/omap/omap-hdmi-audio.c
+++ b/sound/soc/omap/omap-hdmi-audio.c
@@ -81,7 +81,15 @@ static int hdmi_dai_startup(struct snd_pcm_substream *substream,
ret = snd_pcm_hw_constraint_step(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 128);
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;
}
--
1.9.1
next prev parent reply other threads:[~2015-08-26 13:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-26 13:11 [PATCH 0/2] OMAPDSS: Couple of HDMI audio fixes Jyri Sarha
2015-08-26 13:11 ` [PATCH 1/2] OMAPDSS: hdmi: Reconfigure and restart audio when display is enabled Jyri Sarha
2015-08-27 14:30 ` Tomi Valkeinen
2015-08-28 10:37 ` Tomi Valkeinen
2015-08-28 11:35 ` Jyri Sarha
2015-08-26 13:11 ` Jyri Sarha [this message]
2015-08-26 17:42 ` [PATCH 0/2] OMAPDSS: Couple of HDMI audio fixes Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=041db517d2b5313648e20536a3fc0b13d4a72d09.1440594174.git.jsarha@ti.com \
--to=jsarha@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=peter.ujfalusi@ti.com \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox