ALSA: hda/hdmi: Add Intel silent stream support
PATCH v3 1/1 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.
---
Change History:
v3:
- Removed eld_valid check along side of silent stream enable check as its redundant with the monitor_present variable
- Limited the change to take affect only for Haswell and beyond Intel platforms
- As per the spec, setting the channel_id as 0xf before sending info packet
- Fixed issue reported by Kernel Test Robot (tag added)
- Tested on Intel Cometlake based Chromebook connected to few different monitors and docks.
v2:
- Kconfig symbol depends on SND_HDA_INTEL.
- Added valid eld check to along side of silent stream enable check, under which silent stream is enabled.
- Error prints added for codec power up, power down functions.
- The silent stream is enabled with a Kconfig/module parameter following 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.
v1:
- Initial version.
sound/pci/hda/Kconfig | 14 ++++++++++ sound/pci/hda/patch_hdmi.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+)
sound/pci/hda/Kconfig +14 -0
@@ -239,6 +239,20 @@ config SND_HDA_POWER_SAVE_DEFAULT The default time-out value in seconds for HD-audio automatic power-save mode. 0 means to disable the power-save mode. +config SND_HDA_INTEL_HDMI_SILENT_STREAM + bool "Enable Silent Stream always for HDMI" + depends on SND_HDA_INTEL + 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 setting channel_id as 0xf, sending info packet and + preventing codec D3 entry (increasing platform static power + consumption when 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 endmenu
sound/pci/hda/patch_hdmi.c +64 -0
103 lines not on this page · raw message
Signature · 1 line
2.7.4
Quoted 22 lines · Harsha Priya
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_idas0xf, 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
Kconfigoption, as well as a kernel parameter should there be a need to override the build time default. This approach is used based on thepower_savecapability as an example, but in the future, it may be used with a kcontrol,
depending on UCM support for HDaudio legacy.
Quoted 4 lines
Signed-off-by Harsha Priya <[email protected]>Signed-off-by Emmanuel Jillela <[email protected]>Reviewed-by Kai Vehmanen <[email protected]>Reported-by kernel test robot <[email protected]>
Applied now to for-next branch. Thanks.
Takashi