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


Groups > linux.kernel > #1472166 > unrolled thread

[PATCH 0/4 v2] Audio support for adv7511 hdmi bridge

Started byJohn Stultz <john.stultz@linaro.org>
First post2016-08-30 01:50 +0200
Last post2016-09-07 00:20 +0200
Articles 6 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/4 v2] Audio support for adv7511 hdmi bridge John Stultz <john.stultz@linaro.org> - 2016-08-30 01:50 +0200
    [PATCH 1/4 v2] drm/bridge: adv7511: Move the common data structures to header file John Stultz <john.stultz@linaro.org> - 2016-08-30 01:50 +0200
      Re: [PATCH 1/4 v2] drm/bridge: adv7511: Move the common data structures to header file Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2016-08-30 11:00 +0200
        Re: [PATCH 1/4 v2] drm/bridge: adv7511: Move the common data  structures to header file John Stultz <john.stultz@linaro.org> - 2016-09-07 00:50 +0200
    Re: [PATCH 0/4 v2] Audio support for adv7511 hdmi bridge Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2016-08-30 11:30 +0200
      Re: [PATCH 0/4 v2] Audio support for adv7511 hdmi bridge John Stultz <john.stultz@linaro.org> - 2016-09-07 00:20 +0200

#1472166 — [PATCH 0/4 v2] Audio support for adv7511 hdmi bridge

FromJohn Stultz <john.stultz@linaro.org>
Date2016-08-30 01:50 +0200
Subject[PATCH 0/4 v2] Audio support for adv7511 hdmi bridge
Message-ID<sbEtr-5qr-5@gated-at.bofh.it>
This is another swing at getting the adv7511 hdmi bridge
audio support reviewed.

I've taken the core audio work done by Lars-Peter Clausen, and
adapted by Srinivas Kandagatla and Archit Taneja, and tried to
rework it to use the hdmi-codec sound driver.

This patchset, along with the i2s driver and dts changes allows
HDMI audio to work on the HiKey board.

I'd really appreciate any thoughts or feedback.

New in v2:
* Integrated Srinivas' review feedback

thanks
-john

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

Andy Green (1):
  drm/bridge: adv7511: Initialize audio packet on adv7533

Archit Taneja (1):
  drm/bridge: adv7511: Move the common data structures to header file

John Stultz (1):
  drm/bridge: adv7511: Add Audio support.

Srinivas Kandagatla (1):
  drm/bridge: adv7511: Enable the audio data and clock pads on adv7533

 drivers/gpu/drm/bridge/adv7511/Kconfig         |   1 +
 drivers/gpu/drm/bridge/adv7511/Makefile        |   2 +-
 drivers/gpu/drm/bridge/adv7511/adv7511.h       |  13 ++
 drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 199 +++++++++++++++++++++++++
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c   |   9 +-
 drivers/gpu/drm/bridge/adv7511/adv7533.c       |  23 +++
 6 files changed, 244 insertions(+), 3 deletions(-)
 create mode 100644 drivers/gpu/drm/bridge/adv7511/adv7511_audio.c

-- 
1.9.1

[toc] | [next] | [standalone]


#1472167 — [PATCH 1/4 v2] drm/bridge: adv7511: Move the common data structures to header file

FromJohn Stultz <john.stultz@linaro.org>
Date2016-08-30 01:50 +0200
Subject[PATCH 1/4 v2] drm/bridge: adv7511: Move the common data structures to header file
Message-ID<sbEtr-5qr-15@gated-at.bofh.it>
In reply to#1472166
From: Archit Taneja <architt@codeaurora.org>

This patch moves the adv7511 data structure to header file so that the
audio driver file could use it.

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: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 drivers/gpu/drm/bridge/adv7511/adv7511.h     | 8 ++++++++
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511.h b/drivers/gpu/drm/bridge/adv7511/adv7511.h
index 161c923..c7002a0 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511.h
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511.h
@@ -16,6 +16,14 @@
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_mipi_dsi.h>
 
+#include <drm/drm_crtc_helper.h>
+
+struct regmap;
+struct adv7511;
+
+int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int packet);
+int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int packet);
+
 #define ADV7511_REG_CHIP_REVISION		0x00
 #define ADV7511_REG_N0				0x01
 #define ADV7511_REG_N1				0x02
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index ec8fb2e..f8eb7f8 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -160,7 +160,7 @@ static void adv7511_set_colormap(struct adv7511 *adv7511, bool enable,
 			   ADV7511_CSC_UPDATE_MODE, 0);
 }
 
-static int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int packet)
+int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int packet)
 {
 	if (packet & 0xff)
 		regmap_update_bits(adv7511->regmap, ADV7511_REG_PACKET_ENABLE0,
@@ -175,7 +175,7 @@ static int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int packet)
 	return 0;
 }
 
-static int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int packet)
+int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int packet)
 {
 	if (packet & 0xff)
 		regmap_update_bits(adv7511->regmap, ADV7511_REG_PACKET_ENABLE0,
-- 
1.9.1

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


#1472337 — Re: [PATCH 1/4 v2] drm/bridge: adv7511: Move the common data structures to header file

FromLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Date2016-08-30 11:00 +0200
SubjectRe: [PATCH 1/4 v2] drm/bridge: adv7511: Move the common data structures to header file
Message-ID<sbN3I-2x1-25@gated-at.bofh.it>
In reply to#1472167
Hi John,

Thank you for the patch.

On Monday 29 Aug 2016 16:41:33 John Stultz wrote:
> From: Archit Taneja <architt@codeaurora.org>
> 
> This patch moves the adv7511 data structure to header file so that the
> audio driver file could use it.

Actually it doesn't, the data structure is already in the header file.

> 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: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Signed-off-by: John Stultz <john.stultz@linaro.org>
> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511.h     | 8 ++++++++
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 ++--
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511.h
> b/drivers/gpu/drm/bridge/adv7511/adv7511.h index 161c923..c7002a0 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511.h
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511.h
> @@ -16,6 +16,14 @@
>  #include <drm/drm_crtc_helper.h>
>  #include <drm/drm_mipi_dsi.h>
> 
> +#include <drm/drm_crtc_helper.h>

Isn't it enough to include that header once ? :-)

> +
> +struct regmap;

This isn't needed, the header includes linux/regmap.h.

> +struct adv7511;
> +
> +int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int packet);
> +int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int packet);

You can move those two functions at the end, with all the other function 
declarations, and get rid of the forward declaration of struct adv7511.

>  #define ADV7511_REG_CHIP_REVISION		0x00
>  #define ADV7511_REG_N0				0x01
>  #define ADV7511_REG_N1				0x02
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index ec8fb2e..f8eb7f8
> 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -160,7 +160,7 @@ static void adv7511_set_colormap(struct adv7511
> *adv7511, bool enable, ADV7511_CSC_UPDATE_MODE, 0);
>  }
> 
> -static int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int
> packet)
> +int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int packet)
>  {
>  	if (packet & 0xff)
>  		regmap_update_bits(adv7511->regmap, 
ADV7511_REG_PACKET_ENABLE0,
> @@ -175,7 +175,7 @@ static int adv7511_packet_enable(struct adv7511
> *adv7511, unsigned int packet) return 0;
>  }
> 
> -static int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int
> packet)
> +int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int packet)
>  {
>  	if (packet & 0xff)
>  		regmap_update_bits(adv7511->regmap, 
ADV7511_REG_PACKET_ENABLE0,

-- 
Regards,

Laurent Pinchart

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


#1477860 — Re: [PATCH 1/4 v2] drm/bridge: adv7511: Move the common data structures to header file

FromJohn Stultz <john.stultz@linaro.org>
Date2016-09-07 00:50 +0200
SubjectRe: [PATCH 1/4 v2] drm/bridge: adv7511: Move the common data structures to header file
Message-ID<sexlL-8f7-1@gated-at.bofh.it>
In reply to#1472337
On Tue, Aug 30, 2016 at 1:56 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi John,
>
> Thank you for the patch.
>
> On Monday 29 Aug 2016 16:41:33 John Stultz wrote:
>> From: Archit Taneja <architt@codeaurora.org>
>>
>> This patch moves the adv7511 data structure to header file so that the
>> audio driver file could use it.
>
> Actually it doesn't, the data structure is already in the header file.

Heh.  Yea, it looks like most of that patch has fallen out, and
looking closer at it, the remainders aren't necessary, so I'm dropping
the whole thing.

thanks
-john

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


#1472353

FromLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Date2016-08-30 11:30 +0200
Message-ID<sbNwK-2W9-7@gated-at.bofh.it>
In reply to#1472166
Hi John,

Thank you for the patches.

On Monday 29 Aug 2016 16:41:32 John Stultz wrote:
> This is another swing at getting the adv7511 hdmi bridge
> audio support reviewed.
> 
> I've taken the core audio work done by Lars-Peter Clausen, and
> adapted by Srinivas Kandagatla and Archit Taneja, and tried to
> rework it to use the hdmi-codec sound driver.
> 
> This patchset, along with the i2s driver and dts changes allows
> HDMI audio to work on the HiKey board.

Where are the dts changes ?

> I'd really appreciate any thoughts or feedback.
> 
> New in v2:
> * Integrated Srinivas' review feedback
> 
> thanks
> -john
> 
> 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
> 
> Andy Green (1):
>   drm/bridge: adv7511: Initialize audio packet on adv7533
> 
> Archit Taneja (1):
>   drm/bridge: adv7511: Move the common data structures to header file
> 
> John Stultz (1):
>   drm/bridge: adv7511: Add Audio support.
> 
> Srinivas Kandagatla (1):
>   drm/bridge: adv7511: Enable the audio data and clock pads on adv7533
> 
>  drivers/gpu/drm/bridge/adv7511/Kconfig         |   1 +
>  drivers/gpu/drm/bridge/adv7511/Makefile        |   2 +-
>  drivers/gpu/drm/bridge/adv7511/adv7511.h       |  13 ++
>  drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 199 ++++++++++++++++++++++
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c   |   9 +-
>  drivers/gpu/drm/bridge/adv7511/adv7533.c       |  23 +++
>  6 files changed, 244 insertions(+), 3 deletions(-)
>  create mode 100644 drivers/gpu/drm/bridge/adv7511/adv7511_audio.c

-- 
Regards,

Laurent Pinchart

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


#1477845

FromJohn Stultz <john.stultz@linaro.org>
Date2016-09-07 00:20 +0200
Message-ID<sewSJ-83y-7@gated-at.bofh.it>
In reply to#1472353
On Tue, Aug 30, 2016 at 2:23 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi John,
>
> Thank you for the patches.

Thanks so much for the review! I'm reworking the patchset now and will
be sending out an updated set soon!


>> This patchset, along with the i2s driver and dts changes allows
>> HDMI audio to work on the HiKey board.
>
> Where are the dts changes ?

Here's what I'm using to get it working:
https://git.linaro.org/people/john.stultz/android-dev.git/commitdiff/1024cb485b6f00a7e355ce60425f04a584481148

But again, that's dependent on the k3dma driver (queued), the hi6210
i2s driver (still being reworked), and adv7511 audio (this patchset).

thanks
-john

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web