Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1409214 > unrolled thread

[PATCH 3/3] tda998x: add HPD delay to avoid disabling sound when EDID checksum fails.

Started byJoao Pinto <Joao.Pinto@synopsys.com>
First post2016-05-30 17:20 +0200
Last post2016-05-30 21:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/3] tda998x: add HPD delay to avoid disabling sound when EDID checksum fails. Joao Pinto <Joao.Pinto@synopsys.com> - 2016-05-30 17:20 +0200
    Re: [PATCH 3/3] tda998x: add HPD delay to avoid disabling sound when  EDID checksum fails. Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-05-30 21:20 +0200

#1409214 — [PATCH 3/3] tda998x: add HPD delay to avoid disabling sound when EDID checksum fails.

FromJoao Pinto <Joao.Pinto@synopsys.com>
Date2016-05-30 17:20 +0200
Subject[PATCH 3/3] tda998x: add HPD delay to avoid disabling sound when EDID checksum fails.
Message-ID<rEx90-5Uj-29@gated-at.bofh.it>
When using ffplay to reproduce video+sound it was noticed that sometimes the
sound was disabled. The cause was an initial EDID checksum error that disabled
the HDMI sound. By adding this tweak, it was noticed that the sound is not
even when initial EDID checksum error ocurres.

Signed-off-by: Joao Pinto <jpinto@synopsys.com>
---
 drivers/gpu/drm/i2c/tda998x_drv.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index 7020b50..fc7c1c3 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -587,6 +587,17 @@ static void tda998x_detect_work(struct work_struct *work)
 		drm_kms_helper_hotplug_event(dev);
 }
 
+/* handle HDMI connect/disconnect */
+static void tda998x_hpd(struct work_struct *work)
+{
+	struct delayed_work *dwork = to_delayed_work(work);
+	struct tda998x_priv *priv =
+			container_of(dwork, struct tda998x_priv, dwork);
+
+	if (&priv->encoder && priv->encoder.dev)
+		drm_kms_helper_hotplug_event(priv->encoder.dev);
+}
+
 /*
  * only 2 interrupts may occur: screen plug/unplug and EDID read
  */
@@ -1313,6 +1324,7 @@ static int tda998x_create(struct i2c_client *client, struct tda998x_priv *priv)
 
 		/* init read EDID waitqueue and HDP work */
 		init_waitqueue_head(&priv->wq_edid);
+		INIT_DELAYED_WORK(&priv->dwork, tda998x_hpd);
 
 		/* clear pending interrupts */
 		reg_read(priv, REG_INT_FLAGS_0);
-- 
1.8.1.5

[toc] | [next] | [standalone]


#1409335 — Re: [PATCH 3/3] tda998x: add HPD delay to avoid disabling sound when EDID checksum fails.

FromRussell King - ARM Linux <linux@armlinux.org.uk>
Date2016-05-30 21:20 +0200
SubjectRe: [PATCH 3/3] tda998x: add HPD delay to avoid disabling sound when EDID checksum fails.
Message-ID<rEATg-8ry-5@gated-at.bofh.it>
In reply to#1409214
On Mon, May 30, 2016 at 04:15:54PM +0100, Joao Pinto wrote:
> When using ffplay to reproduce video+sound it was noticed that sometimes the
> sound was disabled. The cause was an initial EDID checksum error that disabled
> the HDMI sound. By adding this tweak, it was noticed that the sound is not
> even when initial EDID checksum error ocurres.
> 
> Signed-off-by: Joao Pinto <jpinto@synopsys.com>
> ---
>  drivers/gpu/drm/i2c/tda998x_drv.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
> index 7020b50..fc7c1c3 100644
> --- a/drivers/gpu/drm/i2c/tda998x_drv.c
> +++ b/drivers/gpu/drm/i2c/tda998x_drv.c
> @@ -587,6 +587,17 @@ static void tda998x_detect_work(struct work_struct *work)
>  		drm_kms_helper_hotplug_event(dev);
>  }
>  
> +/* handle HDMI connect/disconnect */
> +static void tda998x_hpd(struct work_struct *work)
> +{
> +	struct delayed_work *dwork = to_delayed_work(work);
> +	struct tda998x_priv *priv =
> +			container_of(dwork, struct tda998x_priv, dwork);
> +
> +	if (&priv->encoder && priv->encoder.dev)
> +		drm_kms_helper_hotplug_event(priv->encoder.dev);
> +}
> +
>  /*
>   * only 2 interrupts may occur: screen plug/unplug and EDID read
>   */
> @@ -1313,6 +1324,7 @@ static int tda998x_create(struct i2c_client *client, struct tda998x_priv *priv)
>  
>  		/* init read EDID waitqueue and HDP work */
>  		init_waitqueue_head(&priv->wq_edid);
> +		INIT_DELAYED_WORK(&priv->dwork, tda998x_hpd);
>  
>  		/* clear pending interrupts */
>  		reg_read(priv, REG_INT_FLAGS_0);

Clearly, this patch is incomplete.  There's nothing that schedules this
work to be run.

In any case, this is reintroducing the code which I deleted when I fixed
the (rather crappy) previous implemention of delaying the EDID read after
a hotplug event.  You should not need this patch.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web