[PATCH v2] ALSA: hda/hdmi: fix silent stream for first playback to DP

Takashi Iwai tiwai at suse.de
Fri Jan 1 08:57:56 CET 2021


On Fri, 01 Jan 2021 06:15:42 +0100,
Jan Alexander Steffens (heftig) wrote:
> 
> On Thu, 2020-12-10 at 19:44 +0200, Kai Vehmanen wrote:
> > +static void silent_stream_disable(struct hda_codec *codec,
> > +                                 struct hdmi_spec_per_pin *per_pin)
> > +{
> > +       struct hdmi_spec *spec = codec->spec;
> > +       struct hdmi_spec_per_cvt *per_cvt;
> > +       int cvt_idx;
> > +
> > +       mutex_lock(&per_pin->lock);
> > +       if (!per_pin->silent_stream)
> > +               goto unlock_out;
> > +
> > +       codec_dbg(codec, "HDMI: disable silent stream on pin-NID=0x%x
> > cvt-NID=0x%x\n",
> > +                 per_pin->pin_nid, per_pin->cvt_nid);
> > +
> > +       cvt_idx = cvt_nid_to_cvt_index(codec, per_pin->cvt_nid);
> > +       if (cvt_idx >= 0 && cvt_idx < spec->num_cvts) {
> > +               per_cvt = get_cvt(spec, cvt_idx);
> > +               per_cvt->assigned = 0;
> > +       }
> > +
> > +       per_pin->cvt_nid = 0;
> > +       per_pin->silent_stream = false;
> > +
> > + unlock_out:
> > +       mutex_unlock(&spec->pcm_lock);
> 
> Shouldn't this be `mutex_unlock(&per_pin->lock);`?

Oh yes, obviously.

> I'm experiencing deadlocks since 5.10.4, which backported this patch.

Could you check whether correcting the unlock fixes the problem?


thanks,

Takashi


More information about the Alsa-devel mailing list