All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jyri Sarha <jsarha@ti.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	peter.ujfalusi@ti.com, moinejf@free.fr, airlied@linux.ie,
	tomi.valkeinen@ti.com, Takashi Iwai <tiwai@suse.de>,
	dri-devel@lists.freedesktop.org, liam.r.girdwood@linux.intel.com,
	tony@atomide.com, broonie@kernel.org, bcousson@baylibre.com,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH RFC v4 2/8] ALSA: pcm: add IEC958 channel status helper for hw_params
Date: Mon, 21 Sep 2015 17:39:58 +0300	[thread overview]
Message-ID: <560016BE.6010801@ti.com> (raw)
In-Reply-To: <20150921093748.GG21098@n2100.arm.linux.org.uk>

On 09/21/15 12:37, Russell King - ARM Linux wrote:
> On Fri, Sep 18, 2015 at 02:06:39PM +0300, Jyri Sarha wrote:
>> Add IEC958 channel status helper that gets the audio properties from
>> snd_pcm_hw_params instead of snd_pcm_runtime. This is needed to
>> produce the channel status bits already in audio stream configuration
>> phase.
>
> What is the reason for doing this early?
>

After some thinking, there is no good reason. It makes the codec bit 
more complicated, but that is not a good reason. I'll change that and 
use the prepare callback.

This patch can be dropped.

> ALSA documentation (which may be out of date) says that the hw_params
> callback can be called multiple times during stream setup.  Do we want
> to be repeatedly programming the HDMI infoframe with different settings,
> potentially confusing the attached device, or would it be better to do
> it slightly later (in the prepare callback) after the parameters have
> been fully negotiated?
>

If it is possible that hw_params() can be called multiple times, at 
least it does not happen very often. I wonder if it would ever happen 
again after a successful hw_params() call. But there is no downside in 
using prepare callback. I was just too much following the way ASoC 
codecs usually do the thing by writing everything to iron as the 
callbacks come in.

Best regards,
Jyri

  reply	other threads:[~2015-09-21 14:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 11:06 [PATCH RFC v4 0/8] Implement generic ASoC HDMI codec and use it in tda998x Jyri Sarha
2015-09-18 11:06 ` [PATCH RFC v4 3/8] ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders Jyri Sarha
     [not found]   ` <6fe9ab5dff972e6f228259d6818f3f481a11577d.1442572860.git.jsarha-l0cyMroinI0@public.gmane.org>
2015-09-19 17:54     ` Mark Brown
2015-09-21  9:31       ` Russell King - ARM Linux
2015-09-21 13:41         ` Jyri Sarha
2015-09-21 17:18           ` Mark Brown
     [not found] ` <cover.1442572860.git.jsarha-l0cyMroinI0@public.gmane.org>
2015-09-18 11:06   ` [PATCH RFC v4 1/8] ASoC: hdmi: Remove obsolete dummy HDMI codec Jyri Sarha
2015-09-18 11:06   ` [PATCH RFC v4 2/8] ALSA: pcm: add IEC958 channel status helper for hw_params Jyri Sarha
     [not found]     ` <a7b69fb075b0ae993846cfb65abb20ecab5c9805.1442572860.git.jsarha-l0cyMroinI0@public.gmane.org>
2015-09-19 17:46       ` Mark Brown
2015-09-21  9:37     ` Russell King - ARM Linux
2015-09-21 14:39       ` Jyri Sarha [this message]
2015-09-21 15:08         ` Clemens Ladisch
2015-09-21 17:25           ` Jyri Sarha
2015-09-18 11:06   ` [PATCH RFC v4 4/8] drm/i2c: tda998x: Add support of a DT graph of ports Jyri Sarha
     [not found]     ` <e9ebb04f781fef7cff99190d301fb64805b97d39.1442572860.git.jsarha-l0cyMroinI0@public.gmane.org>
2015-09-21 15:19       ` Rob Herring
2015-09-24 10:36         ` Jean-Francois Moine
2015-09-24 16:29           ` Rob Herring
2015-09-18 11:06   ` [PATCH RFC v4 6/8] drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata Jyri Sarha
2015-09-18 11:06 ` [PATCH RFC v4 5/8] drm/i2c: tda998x: Remove include/sound/tda998x.h and fix graph parsing Jyri Sarha
2015-09-18 11:06 ` [PATCH RFC v4 7/8] drm/i2c: tda998x: Register ASoC HDMI codec for audio functionality Jyri Sarha
2015-09-18 11:06 ` [PATCH RFC v4 8/8] ARM: dts: am335x-boneblack: Add HDMI audio support Jyri Sarha

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=560016BE.6010801@ti.com \
    --to=jsarha@ti.com \
    --cc=airlied@linux.ie \
    --cc=alsa-devel@alsa-project.org \
    --cc=bcousson@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=moinejf@free.fr \
    --cc=peter.ujfalusi@ti.com \
    --cc=tiwai@suse.de \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.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 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.