Commit 97f2c684 authored by Hsin-Yi Wang's avatar Hsin-Yi Wang Committed by Robert Foss

drm/bridge: anx7625: Fill in empty ELD when no connector

Speaker may share I2S with DP and .get_eld callback will be called when
speaker is playing. When HDMI wans't connected, the connector will be
null. Instead of return an error, fill in empty ELD.
Signed-off-by: default avatarHsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: default avatarXin Ji <xji@analogixsemi.com>
Signed-off-by: default avatarRobert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220414090003.1806535-1-hsinyi@chromium.org
parent c9b2d923
...@@ -1932,14 +1932,14 @@ static int anx7625_audio_get_eld(struct device *dev, void *data, ...@@ -1932,14 +1932,14 @@ static int anx7625_audio_get_eld(struct device *dev, void *data,
struct anx7625_data *ctx = dev_get_drvdata(dev); struct anx7625_data *ctx = dev_get_drvdata(dev);
if (!ctx->connector) { if (!ctx->connector) {
dev_err(dev, "connector not initial\n"); /* Pass en empty ELD if connector not available */
return -EINVAL; memset(buf, 0, len);
} else {
dev_dbg(dev, "audio copy eld\n");
memcpy(buf, ctx->connector->eld,
min(sizeof(ctx->connector->eld), len));
} }
dev_dbg(dev, "audio copy eld\n");
memcpy(buf, ctx->connector->eld,
min(sizeof(ctx->connector->eld), len));
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment