dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Archit Taneja <architt@codeaurora.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	"Andy Green" <andy.green@linaro.org>,
	"David Airlie" <airlied@linux.ie>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	"Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Boris Brezillon" <boris.brezillon@free-electrons.com>,
	"Andy Green" <andy@warmcat.com>,
	"Dave Long" <dave.long@linaro.org>,
	"Guodong Xu" <guodong.xu@linaro.org>,
	"Zhangfei Gao" <zhangfei.gao@linaro.org>,
	"Mark Brown" <broonie@kernel.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Jose Abreu" <joabreu@synopsys.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 4/4 v2] drm/bridge: adv7511: Initialize audio packet on adv7533
Date: Tue, 6 Sep 2016 15:58:25 -0700	[thread overview]
Message-ID: <CALAqxLUeG5ptX_FdVeVps75Z=6J2N63Fu9ycxtpzmaxR1712Mw@mail.gmail.com> (raw)
In-Reply-To: <57C94B1D.8040509@codeaurora.org>

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

  reply	other threads:[~2016-09-06 22:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29 23:41 [PATCH 0/4 v2] Audio support for adv7511 hdmi bridge John Stultz
2016-08-29 23:41 ` [PATCH 1/4 v2] drm/bridge: adv7511: Move the common data structures to header file John Stultz
2016-08-30  8:56   ` Laurent Pinchart
2016-09-06 22:49     ` John Stultz
2016-08-29 23:41 ` [PATCH 2/4 v2] drm/bridge: adv7511: Add Audio support John Stultz
2016-08-30  9:21   ` Laurent Pinchart
2016-08-29 23:41 ` [PATCH 3/4 v2] drm/bridge: adv7511: Enable the audio data and clock pads on adv7533 John Stultz
2016-08-29 23:41 ` [PATCH 4/4 v2] drm/bridge: adv7511: Initialize audio packet " John Stultz
2016-09-02  9:49   ` Archit Taneja
2016-09-06 22:58     ` John Stultz [this message]
2016-08-30  9:23 ` [PATCH 0/4 v2] Audio support for adv7511 hdmi bridge Laurent Pinchart
2016-09-06 22:17   ` John Stultz
2016-10-18 14:42     ` Laurent Pinchart
2016-10-19  0:26       ` Kuninori Morimoto
2016-11-01 21:41         ` John Stultz
2016-11-02  1:43           ` Kuninori Morimoto

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='CALAqxLUeG5ptX_FdVeVps75Z=6J2N63Fu9ycxtpzmaxR1712Mw@mail.gmail.com' \
    --to=john.stultz@linaro.org \
    --cc=airlied@linux.ie \
    --cc=andy.green@linaro.org \
    --cc=andy@warmcat.com \
    --cc=architt@codeaurora.org \
    --cc=boris.brezillon@free-electrons.com \
    --cc=broonie@kernel.org \
    --cc=dave.long@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=guodong.xu@linaro.org \
    --cc=joabreu@synopsys.com \
    --cc=lars@metafoo.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=ville.syrjala@linux.intel.com \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=zhangfei.gao@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).