lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAG3jFyu-JtZRHod7fv_J7y5CrBo+2BMdOCLMnP2qEfP-kKLUPQ@mail.gmail.com>
Date:   Tue, 4 Jan 2022 15:51:38 +0100
From:   Robert Foss <robert.foss@...aro.org>
To:     Xin Ji <xji@...logixsemi.com>
Cc:     a.hajda@...sung.com, narmstrong@...libre.com,
        dan.carpenter@...cle.com, laurent.pinchart@...asonboard.com,
        jonas@...boo.se, jernej.skrabec@...il.com, airlied@...ux.ie,
        daniel@...ll.ch, sam@...nborg.org, pihsun@...omium.org,
        tzungbi@...gle.com, maxime@...no.tech, drinkcat@...gle.com,
        hsinyi@...omium.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, bliang@...logixsemi.com,
        qwen@...logixsemi.com
Subject: Re: [PATCH 2/2] drm/bridge: anx7625: add audio codec .get_eld support

On Tue, 9 Nov 2021 at 03:43, Xin Ji <xji@...logixsemi.com> wrote:
>
> Provide .get_eld interface in hdmi_codec_ops for hdmi-codec driver.
>
> Signed-off-by: Xin Ji <xji@...logixsemi.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
>

Reviewed-by: Robert Foss <robert.foss@...aro.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ