This patch series adds DP audio and hotplug notification support.
On Skylake two DP ports are available and to enable DP on both ports all pins need to be enabled.
There is a special vendor widget which need to be programmed to enable all pins and converters. This series adds hotplug notification, read/set constraint based on ELD, enable all pin/cvts, DP1.2, programs the audio infoframe for DP. There is a one to one mapping between converter and stream, so the dais are created based on the no of streams supported on hdmi codec. Even though cvts can be mapped dynamically to the streams, currently it is statically mapped as simultaneous playback on both DP and HDMI is not supported as of now.
Pin muxes and controls are created dynamically to map converter to pin widget. So at run time specific pin is mapped to the dai based on the control selected (based on the display type DP/HDMI connected).
Finally the DP audio infoframe programming is added to support the DP feature.
Also with hotplug notification support, ELD is read and capabilities are set for rate, formats and channels. drm_eld sound/core framework is updated to limit the formats based on ELD.
There are few fixes one fixing the static checker warning and other one not to fail if no connection list is found for a pin widget.
Pls note, the 10th patch is adding a small macro for getting connection type in drm header, we have CCed drm folks on that and this one. Pls ack so that we can have this series merged thru sound trees
changes in v4: - Added NULL check - Dropped the Jack reporting patch for now.
Cc: Jani Nikula jani.nikula@intel.com Cc: David Airlie airlied@linux.ie Cc: dri-devel@lists.freedesktop.org Cc: Daniel Vetter daniel.vetter@intel.com
Jeeja KP (2): ASoC: hdac_hdmi: Add codec suspend/resume handler ASoC: hdac_hdmi: Fix to enable device configuration in hw_params
Ramesh Babu (1): ASoC: hdac_hdmi: Fix to keep display active while enumerating codec
Subhransu S. Prusty (11): ASoC: hdac_hdmi: Fix to check num nodes correctly ASoC: hdac_hdmi: Fix to warn instead of err for no connected nids ASoC: hdac_hdmi: Use list to add pins and converters ASoC: hdac_hdmi: Add hotplug notification and read eld ASoC: hdac_hdmi: Apply constraints based on ELD ASoC: hdac_hdmi: Enable DP1.2 and all converters/pins ASoC: hdac_hdmi: create dais based on number of streams ASoC: hdac_hdmi: Create widget/route based on nodes enumerated ASoC: hdac_hdmi: Assign pin for stream based on dapm connection drm/edid: Add API to help find connection type ASoC: hdac_hdmi: Add infoframe support for dp audio
include/drm/drm_edid.h | 12 + sound/soc/codecs/Kconfig | 1 + sound/soc/codecs/hdac_hdmi.c | 1116 +++++++++++++++++++++++++++++++++++------- 3 files changed, 951 insertions(+), 178 deletions(-)
To fill the audio infoframe it is required to identify the connection type as DP or HDMI. This patch adds an API which parses ELD and returns the display type of connected.
Signed-off-by: Subhransu S. Prusty subhransu.s.prusty@intel.com Signed-off-by: Vinod Koul vinod.koul@intel.com Reviewed-by: Jani Nikula jani.nikula@intel.com Cc: David Airlie airlied@linux.ie Cc: dri-devel@lists.freedesktop.org Cc: Daniel Vetter daniel.vetter@intel.com --- include/drm/drm_edid.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index 2af9769..8c537a0 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h @@ -403,6 +403,18 @@ static inline int drm_eld_size(const uint8_t *eld) return DRM_ELD_HEADER_BLOCK_SIZE + eld[DRM_ELD_BASELINE_ELD_LEN] * 4; }
+/** + * drm_eld_get_conn_type - Get device type hdmi/dp connected + * @eld: pointer to an eld memory structure + * + * The caller need to use %DRM_ELD_CONN_TYPE_HDMI or %DRM_ELD_CONN_TYPE_DP to + * identify the display type connected. + */ +static inline u8 drm_eld_get_conn_type(const uint8_t *eld) +{ + return eld[DRM_ELD_SAD_COUNT_CONN_TYPE] & DRM_ELD_CONN_TYPE_MASK; +} + struct edid *drm_do_get_edid(struct drm_connector *connector, int (*get_edid_block)(void *data, u8 *buf, unsigned int block, size_t len),
dri-devel@lists.freedesktop.org