14 Aug
2015
14 Aug
'15
9:25 p.m.
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.