From: Jiaxin Yu <jiaxin.yu@mediatek.com>
To: Xin Ji <xji@analogixsemi.com>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Robert Foss <robert.foss@linaro.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: <bliang@analogixsemi.com>, <qwen@analogixsemi.com>,
<hsinyi@chromium.org>, <dri-devel@lists.freedesktop.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/bridge: anx7625: Support HDMI_I2S audio format
Date: Tue, 26 Jul 2022 17:15:54 +0800 [thread overview]
Message-ID: <9385f8642e6ad5491a036360c644dc21b9a3f009.camel@mediatek.com> (raw)
In-Reply-To: <20220726033058.403715-1-xji@analogixsemi.com>
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@analogixsemi.com>
> ---
> drivers/gpu/drm/bridge/analogix/anx7625.c | 23 +++++++++++++++++--
> ----
> 1 file changed, 17 insertions(+), 6 deletions(-)
>
Acked-by: Jiaxin Yu<jiaxin.yu@mediatek.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) {
next prev parent reply other threads:[~2022-07-26 9:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 3:30 Xin Ji
2022-07-26 9:15 ` Jiaxin Yu [this message]
2022-08-10 8:58 ` Hsin-Yi Wang
2022-08-29 13:56 ` Robert Foss
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=9385f8642e6ad5491a036360c644dc21b9a3f009.camel@mediatek.com \
--to=jiaxin.yu@mediatek.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@linux.ie \
--cc=andrzej.hajda@intel.com \
--cc=bliang@analogixsemi.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hsinyi@chromium.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=narmstrong@baylibre.com \
--cc=qwen@analogixsemi.com \
--cc=robert.foss@linaro.org \
--cc=xji@analogixsemi.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®