* [PATCH 1/2] ASoC: omap: Add hardware constraint for HDMI and ABE
@ 2010-12-06 22:34 Olaya, Margarita
2010-12-06 22:46 ` Mark Brown
2010-12-07 8:57 ` Peter Ujfalusi
0 siblings, 2 replies; 6+ messages in thread
From: Olaya, Margarita @ 2010-12-06 22:34 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood; +Cc: alsa-devel@alsa-project.org
From: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
The Audio Backend needs a step size of 24 * 4, while HDMI requires a
step size of 32 * 4 bits to align the audio buffer.
Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
---
sound/soc/omap/omap-pcm.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 8caeb8d..6a21447 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -280,6 +280,15 @@ static int omap_pcm_open(struct snd_pcm_substream *substream)
if (ret < 0)
goto out;
+ /*
+ * ABE needs a step of 24 * 4 data bits, and HDMI 32 * 4
+ * Ensure buffer size satisfies both constraints.
+ */
+ ret = snd_pcm_hw_constraint_step(runtime, 0,
+ SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 384);
+ if (ret < 0)
+ goto out;
+
prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
if (prtd == NULL) {
ret = -ENOMEM;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/2] ASoC: omap: Add hardware constraint for HDMI and ABE
2010-12-06 22:34 [PATCH 1/2] ASoC: omap: Add hardware constraint for HDMI and ABE Olaya, Margarita
@ 2010-12-06 22:46 ` Mark Brown
2010-12-07 8:57 ` Peter Ujfalusi
1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2010-12-06 22:46 UTC (permalink / raw)
To: Olaya, Margarita; +Cc: alsa-devel@alsa-project.org, Liam Girdwood
On Mon, Dec 06, 2010 at 04:34:44PM -0600, Olaya, Margarita wrote:
> From: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
>
> The Audio Backend needs a step size of 24 * 4, while HDMI requires a
> step size of 32 * 4 bits to align the audio buffer.
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] ASoC: omap: Add hardware constraint for HDMI and ABE
2010-12-06 22:34 [PATCH 1/2] ASoC: omap: Add hardware constraint for HDMI and ABE Olaya, Margarita
2010-12-06 22:46 ` Mark Brown
@ 2010-12-07 8:57 ` Peter Ujfalusi
2010-12-08 9:11 ` Peter Ujfalusi
1 sibling, 1 reply; 6+ messages in thread
From: Peter Ujfalusi @ 2010-12-07 8:57 UTC (permalink / raw)
To: alsa-devel; +Cc: ext Olaya, Margarita, Mark Brown, Liam Girdwood
On Tuesday 07 December 2010 00:34:44 ext Olaya, Margarita wrote:
> From: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
>
> The Audio Backend needs a step size of 24 * 4, while HDMI requires a
> step size of 32 * 4 bits to align the audio buffer.
>
> Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
> Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
> ---
> sound/soc/omap/omap-pcm.c | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
> index 8caeb8d..6a21447 100644
> --- a/sound/soc/omap/omap-pcm.c
> +++ b/sound/soc/omap/omap-pcm.c
> @@ -280,6 +280,15 @@ static int omap_pcm_open(struct snd_pcm_substream
> *substream) if (ret < 0)
> goto out;
>
> + /*
> + * ABE needs a step of 24 * 4 data bits, and HDMI 32 * 4
> + * Ensure buffer size satisfies both constraints.
> + */
> + ret = snd_pcm_hw_constraint_step(runtime, 0,
> + SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 384);
> + if (ret < 0)
> + goto out;
> +
Few things:
This only applicable for OMAP4, so please make it so that it only applies to
OMAP4.
We have the other constraints set in the omap-mcbsp.c:omap_mcbsp_dai_startup.
I think it would be better to keep them in a same place.
> prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
> if (prtd == NULL) {
> ret = -ENOMEM;
--
Péter
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/2] ASoC: omap: Add hardware constraint for HDMI and ABE
2010-12-07 8:57 ` Peter Ujfalusi
@ 2010-12-08 9:11 ` Peter Ujfalusi
2010-12-08 9:46 ` Mark Brown
2010-12-08 12:09 ` Liam Girdwood
0 siblings, 2 replies; 6+ messages in thread
From: Peter Ujfalusi @ 2010-12-08 9:11 UTC (permalink / raw)
To: alsa-devel; +Cc: ext Olaya, Margarita, Mark Brown, Liam Girdwood
On Tuesday 07 December 2010 10:57:24 Ujfalusi Peter (Nokia-MS/Tampere) wrote:
> On Tuesday 07 December 2010 00:34:44 ext Olaya, Margarita wrote:
> > From: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
> >
> > The Audio Backend needs a step size of 24 * 4, while HDMI requires a
> > step size of 32 * 4 bits to align the audio buffer.
...
> Few things:
> This only applicable for OMAP4, so please make it so that it only applies
> to OMAP4.
> We have the other constraints set in the
> omap-mcbsp.c:omap_mcbsp_dai_startup. I think it would be better to keep
> them in a same place.
One more thing:
Since this is ABE/HDMI specific constraint, I would add this from the
corresponding codec driver rather than setting this for all McBSP ports
regardless if it is used with HDMI or not.
--
Péter
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] ASoC: omap: Add hardware constraint for HDMI and ABE
2010-12-08 9:11 ` Peter Ujfalusi
@ 2010-12-08 9:46 ` Mark Brown
2010-12-08 12:09 ` Liam Girdwood
1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2010-12-08 9:46 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: ext Olaya, Margarita, alsa-devel, Liam Girdwood
On Wed, Dec 08, 2010 at 11:11:40AM +0200, Peter Ujfalusi wrote:
> Since this is ABE/HDMI specific constraint, I would add this from the
> corresponding codec driver rather than setting this for all McBSP ports
> regardless if it is used with HDMI or not.
Can the ABE support route changes while a stream is active?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] ASoC: omap: Add hardware constraint for HDMI and ABE
2010-12-08 9:11 ` Peter Ujfalusi
2010-12-08 9:46 ` Mark Brown
@ 2010-12-08 12:09 ` Liam Girdwood
1 sibling, 0 replies; 6+ messages in thread
From: Liam Girdwood @ 2010-12-08 12:09 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: ext Olaya, Margarita, alsa-devel, Mark Brown
On Wed, 2010-12-08 at 11:11 +0200, Peter Ujfalusi wrote:
> On Tuesday 07 December 2010 10:57:24 Ujfalusi Peter (Nokia-MS/Tampere) wrote:
> > On Tuesday 07 December 2010 00:34:44 ext Olaya, Margarita wrote:
> > > From: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
> > >
> > > The Audio Backend needs a step size of 24 * 4, while HDMI requires a
> > > step size of 32 * 4 bits to align the audio buffer.
>
> ...
>
> > Few things:
> > This only applicable for OMAP4, so please make it so that it only applies
> > to OMAP4.
> > We have the other constraints set in the
> > omap-mcbsp.c:omap_mcbsp_dai_startup. I think it would be better to keep
> > them in a same place.
>
> One more thing:
> Since this is ABE/HDMI specific constraint, I would add this from the
> corresponding codec driver rather than setting this for all McBSP ports
> regardless if it is used with HDMI or not.
>
I've spoken with Magi and this will be moved to the OAMP4 HDMI and ABE
DAI drivers only.
Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-12-08 12:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-06 22:34 [PATCH 1/2] ASoC: omap: Add hardware constraint for HDMI and ABE Olaya, Margarita
2010-12-06 22:46 ` Mark Brown
2010-12-07 8:57 ` Peter Ujfalusi
2010-12-08 9:11 ` Peter Ujfalusi
2010-12-08 9:46 ` Mark Brown
2010-12-08 12:09 ` Liam Girdwood
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.