From: Takashi Iwai <tiwai@suse.de>
To: Harsha Priya <harshapriya.n@intel.com>
Cc: kai.vehmanen@intel.com,
Emmanuel Jillela <emmanuel.jillela@intel.com>,
alsa-devel@alsa-project.org
Subject: Re: [PATCH] ALSA: hda/hdmi: Add Intel silent stream support
Date: Wed, 24 Jun 2020 09:45:45 +0200 [thread overview]
Message-ID: <s5hr1u4lxee.wl-tiwai@suse.de> (raw)
In-Reply-To: <1592954796-12449-1-git-send-email-harshapriya.n@intel.com>
On Wed, 24 Jun 2020 01:26:36 +0200,
Harsha Priya wrote:
>
> External HDMI receivers have analog circuitry that needs to be powered-on
> when exiting standby, and a mechanism to detect PCM v. IEC61937 data.
> These two steps take time and up to 2-3 seconds of audio may be muted
> when starting playback.
>
> Intel hardware can keep the link active with a 'silent stream', so that
> the receiver does not go through those two steps when valid audio is
> transmitted. This mechanism relies on an info packet and preventing the
> codec from going to D3, which will increase the platform static power
> consumption. The info packet assumes a basic 2ch stereo, and the silent
> stream is enabled when connecting a monitor. In case of format changes the
> detection of PCM v. IEC61937 needs to be re-run. In this case there is no
> way to avoid the 2-3s mute.
>
> The silent stream is enabled with a Kconfig option, as well as a kernel
> parameter should there be a need to override the build time default.
I'm not sure whether the module option is the best interface.
An alternative is a mixer element that controls dynamically. Then
it'll be per card unlike the module option.
And I think Kconfig is redundant.
> Silent stream is supported in Intel platforms Skylake and beyond.
> Tested HDMI plug-out plug-in from Intel Cometlake based Chromebook
> connected to few different monitors.
IMO, the feature enablement should be done only for those devices.
The current patch influences on all HDMI devices including AMD and
others that are irrelevant so far.
About the code changes:
> /* update ELD and jack state via audio component */
> static void sync_eld_via_acomp(struct hda_codec *codec,
> struct hdmi_spec_per_pin *per_pin)
> {
> struct hdmi_spec *spec = codec->spec;
> struct hdmi_eld *eld = &spec->temp_eld;
> + bool monitor_prev, monitor_next;
>
> mutex_lock(&per_pin->lock);
> eld->monitor_present = false;
> + monitor_prev = per_pin->sink_eld.monitor_present;
> eld->eld_size = snd_hdac_acomp_get_eld(&codec->core, per_pin->pin_nid,
> per_pin->dev_id, &eld->monitor_present,
> eld->eld_buffer, ELD_MAX_SIZE);
> eld->eld_valid = (eld->eld_size > 0);
> update_eld(codec, per_pin, eld, 0);
> + monitor_next = per_pin->sink_eld.monitor_present;
> mutex_unlock(&per_pin->lock);
> +
> + /*
> + * Power-up will call hdmi_present_sense, so the PM calls
> + * have to be done without mutex held.
> + */
> +
> + if (enable_silent_stream) {
> + if (!monitor_prev && monitor_next) {
Isn't a valid ELD mandatory? The monitor_present flag itself can be
set even for the monitor without audio support, IIRC.
> + snd_hda_power_up_pm(codec);
> + silent_stream_enable(codec, per_pin);
> + } else if (monitor_prev && !monitor_next)
> + snd_hda_power_down_pm(codec);
This power up/down sequence may lead to the unbalance if the
enable_silent_stream flag is flipped during operation.
thanks,
Takashi
next prev parent reply other threads:[~2020-06-24 7:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 23:26 [PATCH] ALSA: hda/hdmi: Add Intel silent stream support Harsha Priya
2020-06-24 0:25 ` kernel test robot
2020-06-24 0:25 ` kernel test robot
2020-06-24 0:28 ` Pierre-Louis Bossart
2020-06-24 0:51 ` N, Harshapriya
2020-06-24 7:45 ` Takashi Iwai [this message]
2020-06-24 8:18 ` Jaroslav Kysela
2020-06-24 15:33 ` Pierre-Louis Bossart
2020-06-24 16:43 ` Takashi Iwai
2020-06-24 17:05 ` Pierre-Louis Bossart
2020-06-24 17:33 ` Takashi Iwai
2020-06-24 17:58 ` N, Harshapriya
2020-06-25 6:41 ` Takashi Iwai
2020-06-25 0:18 ` Arun Raghavan
2020-06-25 7:03 ` Takashi Iwai
2020-06-25 10:04 ` [pulseaudio-discuss] " Tanu Kaskinen
2020-06-25 14:46 ` Pierre-Louis Bossart
2020-06-25 15:30 ` Jaroslav Kysela
2020-06-25 15:43 ` Pierre-Louis Bossart
2020-06-24 17:21 ` Kai Vehmanen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hr1u4lxee.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=emmanuel.jillela@intel.com \
--cc=harshapriya.n@intel.com \
--cc=kai.vehmanen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.