Re: [RFC][PATCH 0/7] Add HDMI audio support for HiKey

From: Andy Green
Date: Fri Jul 15 2016 - 23:25:32 EST


On Fri, 2016-07-15 at 19:13 -0700, John Stultz wrote:
> This patch set is required for HDMI audio support on HiKey.
>
> This patchset hasn't yet seen the light of lkml, so I suspect
> there will be a few revisions, but I wanted to send it out for
> an initial review.
>
> The work is mostly that of Andy Green's, but I've taking a swing
> at forward porting and cleaning it up where I saw fit. So credit
> to Andy and blame to me. Apologies in advance, as I'm not super
> familiar with either DMA or ASoC driver.
>
> The one bit missing to have audio fully working is changes to the
> adv7511 driver, but most of those changes are still out of tree, so
> I'll submit those changes once they land.
>
> Feedback would be very much appreicated!

Thanks John, it's good to know that work didn't go to waste.

The linaro.org email in the patches is dead, since I resigned from
Linaro a few months ago. ÂIf the goal of adding it to the kernel is to
make it possible to contact the author, it should change to
<andy@xxxxxxxxxxx>.
There are (were) a couple of limitations with it that should be
commented somewhere:

Â1) The cyclic DMA, at least going into the I2S FIFO, had what appeared
to be hw bugs when I left it, I had asked hisilicon about it but got no
useful reply. ÂThe DMA worked well generally, but there were audible
clicks and pops at intervals even though the DMA really is cyclic. ÂI
dunno whether they got around to looking at it or not: if not, there
should probably be a comment in the driver about it. ÂThere were notes
in the I2S FIFO docs (it seemed the likely culprit) about needing to
take care about FIFO trigger levels but didn't seem to change anything.

Â2) The driver only exposes 48kHz / 2ch.

Otherwise it worked well.

Thanks again for upstreaming it.

-Andy

> thanks
> -john
>
> Cc: Zhangfei Gao <zhangfei.gao@xxxxxxxxxx>
> Cc: Jingoo Han <jg1.han@xxxxxxxxxxx>
> Cc: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>
> Cc: Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx>
> Cc: Vinod Koul <vinod.koul@xxxxxxxxx>
> Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
> Cc: Liam Girdwood <lgirdwood@xxxxxxxxx>
> Cc: Mark Brown <broonie@xxxxxxxxxx>
> Cc: Jaroslav Kysela <perex@xxxxxxxx>
> Cc: Takashi Iwai <tiwai@xxxxxxxx>
> Cc: Wei Xu <xuwei5@xxxxxxxxxxxxx>
> Cc: Rob Herring <robh+dt@xxxxxxxxxx>
> Cc: Andy Green <andy@xxxxxxxxxxx>
> Cc: Dave Long <dave.long@xxxxxxxxxx>
> Cc: Guodong Xu <guodong.xu@xxxxxxxxxx>
>
> Andy Green (5):
> Â k3dma: Fix hisi burst clipping
> Â k3dma: Fix dma err offsets
> Â k3dma: Fix "nobody cared" message seen on any error
> Â k3dma: Add cyclic mode for audio
> Â ASoC: hisilicon:ÂÂAdd hi6210 i2s audio driver for hdmi audio
>
> John Stultz (2):
> Â Kconfig: Allow k3dma driver to be selected for more then HISI3xx
> ÂÂÂÂplatforms
> Â dts: hi6220: Add k3-dma and i2s/hdmi audio support
>
> Âarch/arm64/boot/dts/hisilicon/hi6220.dtsi |ÂÂ36 ++
> Âdrivers/dma/KconfigÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ1 -
> Âdrivers/dma/k3dma.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ| 149 ++++++-
> Âsound/soc/KconfigÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ1 +
> Âsound/soc/MakefileÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ1 +
> Âsound/soc/hisilicon/KconfigÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ5 +
> Âsound/soc/hisilicon/MakefileÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ2 +
> Âsound/soc/hisilicon/hi6210-hdmi-card.cÂÂÂÂ| 131 ++++++
> Âsound/soc/hisilicon/hi6210-i2s.cÂÂÂÂÂÂÂÂÂÂ| 641
> ++++++++++++++++++++++++++++++
> Âsound/soc/hisilicon/hi6210-i2s.hÂÂÂÂÂÂÂÂÂÂ| 276 +++++++++++++
> Â10 files changed, 1222 insertions(+), 21 deletions(-)
> Âcreate mode 100644 sound/soc/hisilicon/Kconfig
> Âcreate mode 100644 sound/soc/hisilicon/Makefile
> Âcreate mode 100644 sound/soc/hisilicon/hi6210-hdmi-card.c
> Âcreate mode 100644 sound/soc/hisilicon/hi6210-i2s.c
> Âcreate mode 100644 sound/soc/hisilicon/hi6210-i2s.h
>