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

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

 



On Thu, 10 Dec 2020 16:39:54 +0100,
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;
> +
> +	if (!per_pin->silent_stream)
> +		return;
> +
> +	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;
> +}

Better to protect with per_pin->lock?


thanks,

Takashi



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux