ALSA: hda/hdmi: Add Intel silent stream support
authorHarsha Priya <harshapriya.n@intel.com>
Mon, 6 Jul 2020 20:53:17 +0000 (13:53 -0700)
committerTakashi Iwai <tiwai@suse.de>
Tue, 7 Jul 2020 10:42:35 +0000 (12:42 +0200)
commit951894cf30f417443d9e0eda33312613c2a7edf6
treeb97a2612992fd82727960f3c50dbf495c944bb8f
parentad1e0b7de0cc6f6670b3ffc279cb587a90ce4d47
ALSA: hda/hdmi: Add Intel silent stream support

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 (Haswell and beyond) 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 setting the channel_id as 0xf, sending 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.
This approach is used based on the power_save capability as an example,
but in the future, it may be used with a kcontrol,
depending on UCM support for HDaudio legacy.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Emmanuel Jillela <emmanuel.jillela@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/1594068797-14011-1-git-send-email-harshapriya.n@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/Kconfig
sound/pci/hda/patch_hdmi.c