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 v6: - Fixed some review comments - Fix afg node D3 state
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 (12): 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 ASoC: hdac_hdmi: Fix to wait for D3 before powering off codec
include/drm/drm_edid.h | 12 + sound/soc/codecs/Kconfig | 1 + sound/soc/codecs/hdac_hdmi.c | 1208 +++++++++++++++++++++++++++++++++++++----- sound/soc/codecs/hdac_hdmi.h | 6 + 4 files changed, 1104 insertions(+), 123 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 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..dec6221 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),
The patch
drm/edid: Add API to help find connection type
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From 1aa8ec255370d3e6f60dfa4a8cdd5e1357b1ab78 Mon Sep 17 00:00:00 2001
From: "Subhransu S. Prusty" subhransu.s.prusty@intel.com Date: Fri, 12 Feb 2016 07:46:08 +0530 Subject: [PATCH] drm/edid: Add API to help find connection type
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 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 Signed-off-by: Mark Brown broonie@kernel.org --- 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..dec6221 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