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


Groups > linux.kernel > #1472164 > unrolled thread

[PATCH 4/4 v2] drm/bridge: adv7511: Initialize audio packet on adv7533

Started byJohn Stultz <john.stultz@linaro.org>
First post2016-08-30 01:50 +0200
Last post2016-09-07 01:00 +0200
Articles 3 — 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 4/4 v2] drm/bridge: adv7511: Initialize audio packet on adv7533 John Stultz <john.stultz@linaro.org> - 2016-08-30 01:50 +0200
    Re: [PATCH 4/4 v2] drm/bridge: adv7511: Initialize audio packet on  adv7533 Archit Taneja <architt@codeaurora.org> - 2016-09-02 11:50 +0200
      Re: [PATCH 4/4 v2] drm/bridge: adv7511: Initialize audio packet on adv7533 John Stultz <john.stultz@linaro.org> - 2016-09-07 01:00 +0200

#1472164 — [PATCH 4/4 v2] drm/bridge: adv7511: Initialize audio packet on adv7533

FromJohn Stultz <john.stultz@linaro.org>
Date2016-08-30 01:50 +0200
Subject[PATCH 4/4 v2] drm/bridge: adv7511: Initialize audio packet on adv7533
Message-ID<sbEtr-5qr-9@gated-at.bofh.it>
From: Andy Green <andy.green@linaro.org>

Set the initial audio packet settings to allow the audio
driver to work.

Cc: David Airlie <airlied@linux.ie>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Andy Green <andy@warmcat.com>
Cc: Dave Long <dave.long@linaro.org>
Cc: Guodong Xu <guodong.xu@linaro.org>
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jose Abreu <joabreu@synopsys.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Andy Green <andy.green@linaro.org>
[jstultz: Forward ported to mainline, changed to use register
 names rather then hex values, and removed config values set by
 audio driver.]
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 drivers/gpu/drm/bridge/adv7511/adv7533.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/gpu/drm/bridge/adv7511/adv7533.c b/drivers/gpu/drm/bridge/adv7511/adv7533.c
index 6798ecf..cced7c9 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7533.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7533.c
@@ -104,6 +104,28 @@ void adv7533_dsi_power_on(struct adv7511 *adv)
 	/* disable test mode */
 	regmap_write(adv->regmap_cec, 0x55, 0x00);
 
+	/* hide Audio infoframe updates */
+	regmap_update_bits(adv->regmap, ADV7511_REG_INFOFRAME_UPDATE,
+				BIT(5), BIT(5));
+	/* enable N/CTS, enable Audio sample packets */
+	regmap_update_bits(adv->regmap, ADV7511_REG_PACKET_ENABLE1,
+				BIT(5), BIT(5));
+	/* enable N/CTS */
+	regmap_update_bits(adv->regmap, ADV7511_REG_PACKET_ENABLE1,
+				BIT(6), BIT(6));
+	/* not copyrighted */
+	regmap_update_bits(adv->regmap, ADV7511_REG_AUDIO_CFG1,
+				BIT(5), BIT(5));
+	/* enable audio infoframes */
+	regmap_update_bits(adv->regmap, ADV7511_REG_PACKET_ENABLE1,
+				BIT(3), BIT(3));
+	/* AV mute disable */
+	regmap_update_bits(adv->regmap, ADV7511_REG_GC(0),
+				BIT(7) | BIT(6), BIT(7));
+	/* use Audio infoframe updated info */
+	regmap_update_bits(adv->regmap, ADV7511_REG_GC(1),
+				BIT(5), 0);
+
 	regmap_register_patch(adv->regmap_cec, adv7533_cec_fixed_registers,
 			      ARRAY_SIZE(adv7533_cec_fixed_registers));
 }
-- 
1.9.1

[toc] | [next] | [standalone]


#1474978 — Re: [PATCH 4/4 v2] drm/bridge: adv7511: Initialize audio packet on adv7533

FromArchit Taneja <architt@codeaurora.org>
Date2016-09-02 11:50 +0200
SubjectRe: [PATCH 4/4 v2] drm/bridge: adv7511: Initialize audio packet on adv7533
Message-ID<scTgJ-6aO-3@gated-at.bofh.it>
In reply to#1472164
Hi,

On 8/30/2016 5:11 AM, John Stultz wrote:
> From: Andy Green <andy.green@linaro.org>
>
> Set the initial audio packet settings to allow the audio
> driver to work.
>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Archit Taneja <architt@codeaurora.org>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
> Cc: Andy Green <andy@warmcat.com>
> Cc: Dave Long <dave.long@linaro.org>
> Cc: Guodong Xu <guodong.xu@linaro.org>
> Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Jose Abreu <joabreu@synopsys.com>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Andy Green <andy.green@linaro.org>
> [jstultz: Forward ported to mainline, changed to use register
>   names rather then hex values, and removed config values set by
>   audio driver.]
> Signed-off-by: John Stultz <john.stultz@linaro.org>
> ---
>   drivers/gpu/drm/bridge/adv7511/adv7533.c | 22 ++++++++++++++++++++++
>   1 file changed, 22 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7533.c b/drivers/gpu/drm/bridge/adv7511/adv7533.c
> index 6798ecf..cced7c9 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7533.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7533.c
> @@ -104,6 +104,28 @@ void adv7533_dsi_power_on(struct adv7511 *adv)
>   	/* disable test mode */
>   	regmap_write(adv->regmap_cec, 0x55, 0x00);
>
> +	/* hide Audio infoframe updates */
> +	regmap_update_bits(adv->regmap, ADV7511_REG_INFOFRAME_UPDATE,
> +				BIT(5), BIT(5));
> +	/* enable N/CTS, enable Audio sample packets */
> +	regmap_update_bits(adv->regmap, ADV7511_REG_PACKET_ENABLE1,
> +				BIT(5), BIT(5));
> +	/* enable N/CTS */
> +	regmap_update_bits(adv->regmap, ADV7511_REG_PACKET_ENABLE1,
> +				BIT(6), BIT(6));
> +	/* not copyrighted */
> +	regmap_update_bits(adv->regmap, ADV7511_REG_AUDIO_CFG1,
> +				BIT(5), BIT(5));
> +	/* enable audio infoframes */
> +	regmap_update_bits(adv->regmap, ADV7511_REG_PACKET_ENABLE1,
> +				BIT(3), BIT(3));
> +	/* AV mute disable */
> +	regmap_update_bits(adv->regmap, ADV7511_REG_GC(0),
> +				BIT(7) | BIT(6), BIT(7));
> +	/* use Audio infoframe updated info */
> +	regmap_update_bits(adv->regmap, ADV7511_REG_GC(1),
> +				BIT(5), 0);
> +

Wouldn't these writes be needed by ADV751x chips too? These seem to
belong to the main ADV75xx regmap. These should probably be a separate 
func in adv7511_audio.c or adv7511_drv.c, and it should be called in
adv7511_power_on, so that ADV751x chips can utilize this too.

Thanks,
Archit

>   	regmap_register_patch(adv->regmap_cec, adv7533_cec_fixed_registers,
>   			      ARRAY_SIZE(adv7533_cec_fixed_registers));
>   }
>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [next] | [standalone]


#1477867

FromJohn Stultz <john.stultz@linaro.org>
Date2016-09-07 01:00 +0200
Message-ID<sexvr-8ix-1@gated-at.bofh.it>
In reply to#1474978
On Fri, Sep 2, 2016 at 2:49 AM, Archit Taneja <architt@codeaurora.org> wrote:
> Hi,
>
>
> On 8/30/2016 5:11 AM, John Stultz wrote:
>>
>> From: Andy Green <andy.green@linaro.org>
>>
>> Set the initial audio packet settings to allow the audio
>> driver to work.
>>
>> Cc: David Airlie <airlied@linux.ie>
>> Cc: Archit Taneja <architt@codeaurora.org>
>> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
>> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
>> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
>> Cc: Andy Green <andy@warmcat.com>
>> Cc: Dave Long <dave.long@linaro.org>
>> Cc: Guodong Xu <guodong.xu@linaro.org>
>> Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
>> Cc: Mark Brown <broonie@kernel.org>
>> Cc: Lars-Peter Clausen <lars@metafoo.de>
>> Cc: Jose Abreu <joabreu@synopsys.com>
>> Cc: dri-devel@lists.freedesktop.org
>> Signed-off-by: Andy Green <andy.green@linaro.org>
>> [jstultz: Forward ported to mainline, changed to use register
>>   names rather then hex values, and removed config values set by
>>   audio driver.]
>> Signed-off-by: John Stultz <john.stultz@linaro.org>
>> ---
>>   drivers/gpu/drm/bridge/adv7511/adv7533.c | 22 ++++++++++++++++++++++
>>   1 file changed, 22 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7533.c
>> b/drivers/gpu/drm/bridge/adv7511/adv7533.c
>> index 6798ecf..cced7c9 100644
>> --- a/drivers/gpu/drm/bridge/adv7511/adv7533.c
>> +++ b/drivers/gpu/drm/bridge/adv7511/adv7533.c
>> @@ -104,6 +104,28 @@ void adv7533_dsi_power_on(struct adv7511 *adv)
>>         /* disable test mode */
>>         regmap_write(adv->regmap_cec, 0x55, 0x00);
>>
>> +       /* hide Audio infoframe updates */
>> +       regmap_update_bits(adv->regmap, ADV7511_REG_INFOFRAME_UPDATE,
>> +                               BIT(5), BIT(5));
>> +       /* enable N/CTS, enable Audio sample packets */
>> +       regmap_update_bits(adv->regmap, ADV7511_REG_PACKET_ENABLE1,
>> +                               BIT(5), BIT(5));
>> +       /* enable N/CTS */
>> +       regmap_update_bits(adv->regmap, ADV7511_REG_PACKET_ENABLE1,
>> +                               BIT(6), BIT(6));
>> +       /* not copyrighted */
>> +       regmap_update_bits(adv->regmap, ADV7511_REG_AUDIO_CFG1,
>> +                               BIT(5), BIT(5));
>> +       /* enable audio infoframes */
>> +       regmap_update_bits(adv->regmap, ADV7511_REG_PACKET_ENABLE1,
>> +                               BIT(3), BIT(3));
>> +       /* AV mute disable */
>> +       regmap_update_bits(adv->regmap, ADV7511_REG_GC(0),
>> +                               BIT(7) | BIT(6), BIT(7));
>> +       /* use Audio infoframe updated info */
>> +       regmap_update_bits(adv->regmap, ADV7511_REG_GC(1),
>> +                               BIT(5), 0);
>> +
>
>
> Wouldn't these writes be needed by ADV751x chips too? These seem to
> belong to the main ADV75xx regmap. These should probably be a separate func
> in adv7511_audio.c or adv7511_drv.c, and it should be called in
> adv7511_power_on, so that ADV751x chips can utilize this too.

Yea. It seems like folding this into the audio_startup() function is
the best thing here, so I've done so and it seems to be working well.
Will resend here shortly.

thanks
-john

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web