Re: [PATCH RFC v2 3/7] ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux