dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Jyri Sarha <jsarha@ti.com>
Cc: peter.ujfalusi@ti.com, alsa-devel@alsa-project.org,
	moinejf@free.fr, airlied@linux.ie,
	dri-devel@lists.freedesktop.org, liam.r.girdwood@linux.intel.com,
	tomi.valkeinen@ti.com, rmk+kernel@arm.linux.org.uk,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH RFC v2 3/7] ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders
Date: Fri, 14 Aug 2015 20:25:21 +0100	[thread overview]
Message-ID: <20150814192521.GL10748@sirena.org.uk> (raw)
In-Reply-To: <1432666751-24794-4-git-send-email-jsarha@ti.com>


[-- Attachment #1.1: Type: text/plain, Size: 843 bytes --]

On Tue, May 26, 2015 at 09:59:07PM +0300, Jyri Sarha wrote:

> +
> +	mutex_lock(&hcp->current_stream_lock);
> +	if (hcp->current_stream && hcp->current_stream->runtime &&
> +	    snd_pcm_running(hcp->current_stream)) {
> +		dev_info(dev, "HDMI audio playback aborted\n");

Does this really need to be dev_info()?

> +	if (hcp->hcd.ops->get_eld) {
> +		hcp->eld = hcp->hcd.ops->get_eld(hcp->hcd.dev);
> +
> +		/* Call snd_pcm_hw_constraint_eld here */
> +	}

...

> +	dev_dbg(dai->dev, "%s()\n", __func__);
> +
> +	mutex_lock(&hcp->current_stream_lock);
> +	BUG_ON(hcp->current_stream != substream);
> +	hcp->current_stream = NULL;
> +	mutex_unlock(&hcp->current_stream_lock);
> +
> +	hcp->hcd.ops->audio_shutdown(hcp->hcd.dev);

Shouldn't the callback be in or before the lock?  Otherwise we could
potentially race with starting a new stream.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2015-08-14 19:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26 18:59 [PATCH RFC v2 0/7] Implement generic ASoC HDMI codec Jyri Sarha
2015-05-26 18:59 ` [PATCH RFC v2 1/7] ASoC: core: If component doesn't have of_node use parent's node instead Jyri Sarha
2015-06-02 20:09   ` Mark Brown
2015-05-26 18:59 ` [PATCH RFC v2 2/7] ASoC: hdmi: Remove obsolete dummy HDMI codec Jyri Sarha
2015-06-02 20:10   ` Mark Brown
2015-05-26 18:59 ` [PATCH RFC v2 3/7] ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders Jyri Sarha
2015-08-14 19:25   ` Mark Brown [this message]
2015-08-17  8:39     ` Jyri Sarha
2015-05-26 18:59 ` [PATCH RFC v2 4/7] ASoC: hdmi-codec: Add ELD based audio pcm rules DO NOT MERGE Jyri Sarha
2015-05-26 18:59 ` [PATCH RFC v2 5/7] drm/i2c: tda998x: Add support of a DT graph of ports " Jyri Sarha
2015-05-26 18:59 ` [PATCH RFC v2 6/7] drm/i2c: tda998x: Register ASoC HDMI codec for audio functionality " Jyri Sarha
2015-05-26 18:59 ` [PATCH RFC v2 7/7] 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=20150814192521.GL10748@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=airlied@linux.ie \
    --cc=alsa-devel@alsa-project.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=moinejf@free.fr \
    --cc=peter.ujfalusi@ti.com \
    --cc=rmk+kernel@arm.linux.org.uk \
    --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