All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jyri Sarha <jsarha@ti.com>
To: Mark Brown <broonie@kernel.org>
Cc: peter.ujfalusi@ti.com, alsa-devel@alsa-project.org,
	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: Mon, 17 Aug 2015 11:39:31 +0300	[thread overview]
Message-ID: <55D19DC3.3070704@ti.com> (raw)
In-Reply-To: <20150814192521.GL10748@sirena.org.uk>

On 08/14/15 22:25, Mark Brown wrote:
> 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()?
>

No, I'll change that to debug level.

>> +	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.
>

Yes, it should be before it. I'll fix that.

If it is inside, there is a "possible deadlock" warning (atleast in the 
similar place in omap-hdmi-audio there was) if those warnings are turned 
on and there is another lock that is taken in the video side callbacks.

Thanks,
Jyri
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-08-17  8:39 UTC|newest]

Thread overview: 13+ 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-09-20  0:13   ` Applied "ASoC: hdmi: Remove obsolete dummy HDMI codec" to the asoc tree 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
2015-08-17  8:39     ` Jyri Sarha [this message]
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=55D19DC3.3070704@ti.com \
    --to=jsarha@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-omap@vger.kernel.org \
    --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 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.