This patch series adds DP audio and hotplug notification support.
In skylake platform the DP is on a different port which is not enabled by default. A vendor widget is programmed to enable playback on all ports. This also enables all the converters.
Codec Dais, widgets, graph are now created dynamically based on the nodes enumerated, thus removing the hardcoding. Mux controls are used to establish routing stream to a specific port.
For DP audio support, infoframe needs to be different. Based on ELD queried we either pack HDMI or DP infoframe.
Also with this series, Jack notification support is added and Jack event is reported to userspace as is done in case of legacy driver.
Few fixes are added to check for possible memory leak, reconfiguring register during resume from D3 etc.
The 8th patch is adding a small macro for getting connection type in drm header. It is reviewed by drm folks, CCed them. Please merge it through sound trees.
Changes in v5: - Added more comments and reworded some commit messages - Jack reporting support to user space added - Fix to check for possible memory leak in hw_params - Fix not to fail in dai startup to make userland APIs happy
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 jack reporting ASoC: hdac_hdmi: Add PM support
Ramesh Babu (1): ASoC: hdac_hdmi: Fix to keep codec power active during enumeration.
Subhransu S. Prusty (11): 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 cvts ASoC: hdac_hdmi: Create widget/route based on nodes enumerated ASoC: hdac_hdmi: Enable playback on all enumerated ports drm/edid: Add API to help find connection type ASoC: hdac_hdmi: Add infoframe support for dp audio ASoC: hdac_hdmi: Fix possible memory leak in hw_params ASoC: hdac_hdmi: Don't fail in dai startup to make userland happy ASoC: hdac_hdmi: Fix to reconfigure registers in runtime resume
include/drm/drm_edid.h | 12 + sound/soc/codecs/Kconfig | 1 + sound/soc/codecs/hdac_hdmi.c | 1197 +++++++++++++++++++++++++++++++++++++----- sound/soc/codecs/hdac_hdmi.h | 6 + 4 files changed, 1094 insertions(+), 122 deletions(-) create mode 100644 sound/soc/codecs/hdac_hdmi.h
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