mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
vc4: Add jack detection to HDMI audio driver
Add ALSA jack detection to the vc4-hdmi audio driver so userspace knows when to add/remove HDMI audio devices. Signed-off-by: David Turner <david.turner@raspberrypi.com>
This commit is contained in:
@@ -365,6 +365,12 @@ static void vc4_hdmi_handle_hotplug(struct vc4_hdmi *vc4_hdmi,
|
|||||||
struct drm_connector *connector = &vc4_hdmi->connector;
|
struct drm_connector *connector = &vc4_hdmi->connector;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Needs to be called for both connects and disconnects for HDMI
|
||||||
|
* audio hotplug to work correctly.
|
||||||
|
*/
|
||||||
|
drm_atomic_helper_connector_hdmi_hotplug(connector, status);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTE: This function should really be called with vc4_hdmi->mutex
|
* NOTE: This function should really be called with vc4_hdmi->mutex
|
||||||
* held, but doing so results in reentrancy issues since
|
* held, but doing so results in reentrancy issues since
|
||||||
@@ -2344,6 +2350,8 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
|
|||||||
dai_link->platforms->name = dev_name(dev);
|
dai_link->platforms->name = dev_name(dev);
|
||||||
dai_link->init = vc4_hdmi_codec_init;
|
dai_link->init = vc4_hdmi_codec_init;
|
||||||
|
|
||||||
|
dai_link->init = vc4_hdmi_codec_init;
|
||||||
|
|
||||||
card->dai_link = dai_link;
|
card->dai_link = dai_link;
|
||||||
card->num_links = 1;
|
card->num_links = 1;
|
||||||
card->name = vc4_hdmi->variant->card_name;
|
card->name = vc4_hdmi->variant->card_name;
|
||||||
|
|||||||
Reference in New Issue
Block a user