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: <9385f8642e6ad5491a036360c644dc21b9a3f009.camel@mediatek.com>
Date:   Tue, 26 Jul 2022 17:15:54 +0800
From:   Jiaxin Yu <jiaxin.yu@...iatek.com>
To:     Xin Ji <xji@...logixsemi.com>,
        Andrzej Hajda <andrzej.hajda@...el.com>,
        Neil Armstrong <narmstrong@...libre.com>,
        Robert Foss <robert.foss@...aro.org>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        Jonas Karlman <jonas@...boo.se>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>
CC:     <bliang@...logixsemi.com>, <qwen@...logixsemi.com>,
        <hsinyi@...omium.org>, <dri-devel@...ts.freedesktop.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/bridge: anx7625: Support HDMI_I2S audio format

On Tue, 2022-07-26 at 11:30 +0800, Xin Ji wrote:
> 1. Support HDMI_I2S audio format.
> 2. Return 0 if there is no sink connection in .hw_param callback.
> 
> Signed-off-by: Xin Ji <xji@...logixsemi.com>
> ---
>  drivers/gpu/drm/bridge/analogix/anx7625.c | 23 +++++++++++++++++--
> ----
>  1 file changed, 17 insertions(+), 6 deletions(-)
> 
Acked-by: Jiaxin Yu<jiaxin.yu@...iatek.com>
> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c
> b/drivers/gpu/drm/bridge/analogix/anx7625.c
> index 79fc7a50b497..c74b5df4cade 100644
> --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> @@ -1797,8 +1797,13 @@ static int anx7625_audio_hw_params(struct
> device *dev, void *data,
>  	int wl, ch, rate;
>  	int ret = 0;
>  
> -	if (fmt->fmt != HDMI_DSP_A) {
> -		DRM_DEV_ERROR(dev, "only supports DSP_A\n");
> +	if (anx7625_sink_detect(ctx) == connector_status_disconnected)
> {
> +		DRM_DEV_DEBUG_DRIVER(dev, "DP not connected\n");
> +		return 0;
> +	}
> +
> +	if (fmt->fmt != HDMI_DSP_A && fmt->fmt != HDMI_I2S) {
> +		DRM_DEV_ERROR(dev, "only supports DSP_A & I2S\n");
>  		return -EINVAL;
>  	}
>  
> @@ -1806,10 +1811,16 @@ static int anx7625_audio_hw_params(struct
> device *dev, void *data,
>  			     params->sample_rate, params->sample_width,
>  			     params->cea.channels);
>  
> -	ret |= anx7625_write_and_or(ctx, ctx->i2c.tx_p2_client,
> -				    AUDIO_CHANNEL_STATUS_6,
> -				    ~I2S_SLAVE_MODE,
> -				    TDM_SLAVE_MODE);
> +	if (fmt->fmt == HDMI_DSP_A)
> +		ret = anx7625_write_and_or(ctx, ctx->i2c.tx_p2_client,
> +					   AUDIO_CHANNEL_STATUS_6,
> +					   ~I2S_SLAVE_MODE,
> +					   TDM_SLAVE_MODE);
> +	else
> +		ret = anx7625_write_and_or(ctx, ctx->i2c.tx_p2_client,
> +					   AUDIO_CHANNEL_STATUS_6,
> +					   ~TDM_SLAVE_MODE,
> +					   I2S_SLAVE_MODE);
>  
>  	/* Word length */
>  	switch (params->sample_width) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ