From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Harsha Priya <harshapriya.n@intel.com>,
alsa-devel@alsa-project.org, tiwai@suse.de
Cc: kai.vehmanen@intel.com, Emmanuel Jillela <emmanuel.jillela@intel.com>
Subject: Re: [PATCH] ALSA: hda/hdmi: Add Intel silent stream support
Date: Tue, 23 Jun 2020 19:28:43 -0500 [thread overview]
Message-ID: <d9608b01-a111-d5ac-dcf7-c2dfdae79d08@linux.intel.com> (raw)
In-Reply-To: <1592954796-12449-1-git-send-email-harshapriya.n@intel.com>
2 nit-picks that I missed in previous versions of this patch, sorry:
> diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig
> index 7ba542e45a3d..8804808410b3 100644
> --- a/sound/pci/hda/Kconfig
> +++ b/sound/pci/hda/Kconfig
> @@ -232,4 +232,20 @@ config SND_HDA_POWER_SAVE_DEFAULT
>
> endif
>
> +config SND_HDA_INTEL_HDMI_SILENT_STREAM
> + bool "Enable Silent Stream always for HDMI"
> + depends on SND_HDA
nit-pick: should this be 'depends on SND_HDA_INTEL'?
if not, this 'depends on SND_HDA' is redundant, already within an
'if SND_HDA' block
> + help
> + Intel hardware has a feature called 'silent stream', that
> + keeps external HDMI receiver's analog circuitry powered on
> + avoiding 2-3 sec silence during playback start. This mechanism
> + relies on an info packet and preventing the codec from going to
> + D3. (increasing the platform static power consumption when a
> + HDMI receiver is plugged-in). 2-3 sec silence at the playback
> + start is expected whenever there is format change. (default is
> + 2 channel format).
> + Say Y to enable Silent Stream feature.
> +
> +endif
> +
[...]
> /* 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) {
> + snd_hda_power_up_pm(codec);
nit-pick: is there a need to test the return value? I see this in
patch_hdmi.c
ret = snd_hda_power_up_pm(codec);
if (ret < 0 && pm_runtime_suspended(hda_codec_dev(codec)))
goto out;
> + silent_stream_enable(codec, per_pin);
> + } else if (monitor_prev && !monitor_next)
> + snd_hda_power_down_pm(codec);
> + }
> }
>
> static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
>
next prev parent reply other threads:[~2020-06-24 0:29 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 [this message]
2020-06-24 0:51 ` N, Harshapriya
2020-06-24 7:45 ` Takashi Iwai
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=d9608b01-a111-d5ac-dcf7-c2dfdae79d08@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=emmanuel.jillela@intel.com \
--cc=harshapriya.n@intel.com \
--cc=kai.vehmanen@intel.com \
--cc=tiwai@suse.de \
/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.