From: Xin Ji <xji@analogixsemi.com>
To: a.hajda@samsung.com, narmstrong@baylibre.com,
dan.carpenter@oracle.com, robert.foss@linaro.org,
Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se,
jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch,
sam@ravnborg.org, pihsun@chromium.org, tzungbi@google.com,
maxime@cerno.tech, drinkcat@google.com, hsinyi@chromium.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
bliang@analogixsemi.com, qwen@analogixsemi.com
Cc: Xin Ji <xji@analogixsemi.com>
Subject: [PATCH 2/2] drm/bridge: anx7625: add audio codec .get_eld support
Date: Tue, 9 Nov 2021 10:42:37 +0800 [thread overview]
Message-ID: <20211109024237.3354741-2-xji@analogixsemi.com> (raw)
In-Reply-To: <20211109024237.3354741-1-xji@analogixsemi.com>
Provide .get_eld interface in hdmi_codec_ops for hdmi-codec driver.
Signed-off-by: Xin Ji <xji@analogixsemi.com>
---
drivers/gpu/drm/bridge/analogix/anx7625.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index 6d93026c2999..67a87d21b0ba 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -1821,9 +1821,27 @@ static int anx7625_audio_hook_plugged_cb(struct device *dev, void *data,
return 0;
}
+static int anx7625_audio_get_eld(struct device *dev, void *data,
+ u8 *buf, size_t len)
+{
+ struct anx7625_data *ctx = dev_get_drvdata(dev);
+
+ if (!ctx->connector) {
+ DRM_DEV_DEBUG_DRIVER(dev, "connector not initial\n");
+ return -EINVAL;
+ }
+
+ DRM_DEV_DEBUG_DRIVER(dev, "audio copy eld\n");
+ memcpy(buf, ctx->connector->eld,
+ min(sizeof(ctx->connector->eld), len));
+
+ return 0;
+}
+
static const struct hdmi_codec_ops anx7625_codec_ops = {
.hw_params = anx7625_audio_hw_params,
.audio_shutdown = anx7625_audio_shutdown,
+ .get_eld = anx7625_audio_get_eld,
.get_dai_id = anx7625_hdmi_i2s_get_dai_id,
.hook_plugged_cb = anx7625_audio_hook_plugged_cb,
};
--
2.25.1
next prev parent reply other threads:[~2021-11-09 2:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-09 2:42 [PATCH 1/2] drm/bridge: anx7625: add HDCP support Xin Ji
2021-11-09 2:42 ` Xin Ji [this message]
2022-01-04 14:51 ` [PATCH 2/2] drm/bridge: anx7625: add audio codec .get_eld support Robert Foss
2022-01-04 14:50 ` [PATCH 1/2] drm/bridge: anx7625: add HDCP support Robert Foss
2022-01-05 7:17 ` Xin Ji
2022-01-05 10:32 ` Robert Foss
2022-01-05 11:31 ` Xin Ji
2022-01-05 9:31 ` Andrzej Hajda
2022-01-05 11:53 ` Xin Ji
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211109024237.3354741-2-xji@analogixsemi.com \
--to=xji@analogixsemi.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=bliang@analogixsemi.com \
--cc=dan.carpenter@oracle.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=drinkcat@google.com \
--cc=hsinyi@chromium.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime@cerno.tech \
--cc=narmstrong@baylibre.com \
--cc=pihsun@chromium.org \
--cc=qwen@analogixsemi.com \
--cc=robert.foss@linaro.org \
--cc=sam@ravnborg.org \
--cc=tzungbi@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®