[PATCH] ALSA: hda/hdmi: add keep-alive support for ADL-P and DG2

Amadeusz Sławiński amadeuszx.slawinski at linux.intel.com
Wed Feb 16 09:38:44 CET 2022


On 2/15/2022 3:01 PM, Kai Vehmanen wrote:

>   static void silent_stream_disable(struct hda_codec *codec,
> @@ -1726,7 +1786,16 @@ static void silent_stream_disable(struct hda_codec *codec,
>   {
>   	struct hdmi_spec *spec = codec->spec;
>   	struct hdmi_spec_per_cvt *per_cvt;
> -	int cvt_idx;
> +	int cvt_idx, err;
> +
> +	err = snd_hda_power_up_pm(codec);
> +	if (err < 0 && err != -EACCES) {
> +		codec_err(codec,
> +			  "Failed to power up codec for silent stream disable ret=[%d]\n",
> +			  err);
> +		snd_hda_power_down_pm(codec);

If power up failed, do you need to power down?

> +		return;
> +	}
>   
>   	mutex_lock(&per_pin->lock);
>   	if (!per_pin->silent_stream)



More information about the Alsa-devel mailing list