mbox series

[v4,00/22] Support HDMI audio on NVIDIA Tegra20

Message ID 20211204143725.31646-1-digetx@gmail.com (mailing list archive)
Headers show
Series Support HDMI audio on NVIDIA Tegra20 | expand

Message

Dmitry Osipenko Dec. 4, 2021, 2:37 p.m. UTC
This series revives Tegra20 S/PDIF driver which was upstreamed long time
ago, but never was used. It also turns Tegra DRM HDMI driver into HDMI
audio CODEC provider. Finally, HDMI audio is enabled in device-trees.
For now the audio is enable only for Acer A500 tablet and Toshiba AC100
netbook because they're already supported by upstream, later on ASUS TF101
tablet will join them.

I based S/PDIF patches on Arnd's Bergmann patch from a separate series [1]
that removes obsolete slave_id. This eases merging of the patches by
removing the merge conflict. This is a note for Mark Brown.

I also based this series on top of power management series [2]. I.e. [2]
should be applied first, otherwise "Add S/PDIF node to Tegra20 device-tree"
patch should have merge conflict. This is a note for Thierry.

[1] https://patchwork.ozlabs.org/project/linux-tegra/list/?series=273312
[2] https://patchwork.ozlabs.org/project/linux-tegra/list/?series=274534

Changelog:

v4: - Added patches that update multi_v7_defconfig with the enabled S/PDIF
      and APB DMA drivers.

v3: - Renamed S/PDIF device-tree clocks as was suggested by Rob Herring.

    - Added r-bs and acks that were given by Rob Herring to v2.

v2: - Corrected I2S yaml problem that was reported by the DT bot for v1
      by removing the non-existent required clock-names property.

    - Removed assigned-clocks property from S/PDIF yaml since this property
      is now inherited from the clocks property.

    - Reordered the "tegra20: spdif: Set FIFO trigger level" patch, making
      it the first sound/soc patch in the series, like it was suggested by
      Mark Brown in the comment to v1. Also reworded commit message of this
      patch to *not* make it looks like it should be backported to stable
      kernels.

Arnd Bergmann (1):
  ASoC: tegra20-spdif: stop setting slave_id

Dmitry Osipenko (21):
  ASoC: dt-bindings: Add binding for Tegra20 S/PDIF
  ASoC: dt-bindings: tegra20-i2s: Convert to schema
  ASoC: dt-bindings: tegra20-i2s: Document new nvidia,fixed-parent-rate
    property
  dt-bindings: host1x: Document optional HDMI sound-dai-cells
  ASoC: tegra20: spdif: Set FIFO trigger level
  ASoC: tegra20: spdif: Support device-tree
  ASoC: tegra20: spdif: Improve driver's code
  ASoC: tegra20: spdif: Use more resource-managed helpers
  ASoC: tegra20: spdif: Reset hardware
  ASoC: tegra20: spdif: Support system suspend
  ASoC: tegra20: spdif: Filter out unsupported rates
  ASoC: tegra20: i2s: Filter out unsupported rates
  drm/tegra: hdmi: Unwind tegra_hdmi_init() errors
  drm/tegra: hdmi: Register audio CODEC on Tegra20
  ARM: tegra_defconfig: Enable S/PDIF driver
  ARM: config: multi v7: Enable NVIDIA Tegra20 S/PDIF driver
  ARM: config: multi v7: Enable NVIDIA Tegra20 APB DMA driver
  ARM: tegra: Add S/PDIF node to Tegra20 device-tree
  ARM: tegra: Add HDMI audio graph to Tegra20 device-tree
  ARM: tegra: acer-a500: Enable S/PDIF and HDMI audio
  ARM: tegra: paz00: Enable S/PDIF and HDMI audio

 .../display/tegra/nvidia,tegra20-host1x.txt   |   1 +
 .../bindings/sound/nvidia,tegra20-i2s.txt     |  30 ---
 .../bindings/sound/nvidia,tegra20-i2s.yaml    |  77 +++++++
 .../bindings/sound/nvidia,tegra20-spdif.yaml  |  85 ++++++++
 .../boot/dts/tegra20-acer-a500-picasso.dts    |   8 +
 arch/arm/boot/dts/tegra20-paz00.dts           |   8 +
 arch/arm/boot/dts/tegra20.dtsi                |  40 +++-
 arch/arm/configs/multi_v7_defconfig           |   2 +
 arch/arm/configs/tegra_defconfig              |   1 +
 drivers/gpu/drm/tegra/Kconfig                 |   3 +
 drivers/gpu/drm/tegra/hdmi.c                  | 168 +++++++++++++--
 sound/soc/tegra/tegra20_i2s.c                 |  49 +++++
 sound/soc/tegra/tegra20_spdif.c               | 197 ++++++++++++------
 sound/soc/tegra/tegra20_spdif.h               |   1 +
 sound/soc/tegra/tegra_pcm.c                   |   6 +
 sound/soc/tegra/tegra_pcm.h                   |   1 +
 16 files changed, 574 insertions(+), 103 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.txt
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra20-spdif.yaml

Comments

Mark Brown Dec. 15, 2021, 6:57 p.m. UTC | #1
On Sat, Dec 04, 2021 at 05:37:03PM +0300, Dmitry Osipenko wrote:

> I based S/PDIF patches on Arnd's Bergmann patch from a separate series [1]
> that removes obsolete slave_id. This eases merging of the patches by
> removing the merge conflict. This is a note for Mark Brown.

That's not in my tree so I'll need either a pull request with the series
or a resend after the merge window.  It's also not clear what to do
about the DRM bits, I guess it's probably easiest to just apply them
along with the ASoC patches.

Please include human readable descriptions of things like commits and
issues being discussed in e-mail in your mails, this makes them much
easier for humans to read especially when they have no internet access.
I do frequently catch up on my mail on flights or while otherwise
travelling so this is even more pressing for me than just being about
making things a bit easier to read.
Dmitry Osipenko Dec. 15, 2021, 7:19 p.m. UTC | #2
15.12.2021 21:57, Mark Brown пишет:
> On Sat, Dec 04, 2021 at 05:37:03PM +0300, Dmitry Osipenko wrote:
> 
>> I based S/PDIF patches on Arnd's Bergmann patch from a separate series [1]
>> that removes obsolete slave_id. This eases merging of the patches by
>> removing the merge conflict. This is a note for Mark Brown.
> 
> That's not in my tree so I'll need either a pull request with the series
> or a resend after the merge window.

This patch is included as a part of this series, please see the patch #6.

I saw that Vinod Koul already merged it into his DMA tree [1] a day ago,
but there is no stable branch there.

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git/log/?h=next

>  It's also not clear what to do
> about the DRM bits, I guess it's probably easiest to just apply them
> along with the ASoC patches.

I already asked Thierry Reding to take a look at this patchset. He will
let to you know how the DRM bits should be handled. Hopefully this
should happen tomorrow.

We will know how to move forward if Vinod and Thierry will reply ASAP.
Otherwise this series will have to wait for the next cycle.

> Please include human readable descriptions of things like commits and
> issues being discussed in e-mail in your mails, this makes them much
> easier for humans to read especially when they have no internet access.
> I do frequently catch up on my mail on flights or while otherwise
> travelling so this is even more pressing for me than just being about
> making things a bit easier to read.
> 

Noted; I see now that it's indeed not clear from the cover letter that I
included Arnd's patch into this patchset, sorry about that. I assumed
that you will notice this after looking through the patches.
Mark Brown Dec. 15, 2021, 7:58 p.m. UTC | #3
On Wed, Dec 15, 2021 at 10:19:07PM +0300, Dmitry Osipenko wrote:
> 15.12.2021 21:57, Mark Brown пишет:

> > Please include human readable descriptions of things like commits and
> > issues being discussed in e-mail in your mails, this makes them much
> > easier for humans to read especially when they have no internet access.
> > I do frequently catch up on my mail on flights or while otherwise
> > travelling so this is even more pressing for me than just being about
> > making things a bit easier to read.

> Noted; I see now that it's indeed not clear from the cover letter that I
> included Arnd's patch into this patchset, sorry about that. I assumed
> that you will notice this after looking through the patches.

It's a pretty long series and having to open a link to figure out what
patch is being talked about puts an additional barrier to remembering
the specific patch at the time dependencies are being considered (which
might not be at the same time as things are reviewed, especially if
other reviews are likely).
Thierry Reding Dec. 16, 2021, 1:55 p.m. UTC | #4
On Wed, Dec 15, 2021 at 10:19:07PM +0300, Dmitry Osipenko wrote:
> 15.12.2021 21:57, Mark Brown пишет:
> > On Sat, Dec 04, 2021 at 05:37:03PM +0300, Dmitry Osipenko wrote:
> > 
> >> I based S/PDIF patches on Arnd's Bergmann patch from a separate series [1]
> >> that removes obsolete slave_id. This eases merging of the patches by
> >> removing the merge conflict. This is a note for Mark Brown.
> > 
> > That's not in my tree so I'll need either a pull request with the series
> > or a resend after the merge window.
> 
> This patch is included as a part of this series, please see the patch #6.
> 
> I saw that Vinod Koul already merged it into his DMA tree [1] a day ago,
> but there is no stable branch there.
> 
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git/log/?h=next
> 
> >  It's also not clear what to do
> > about the DRM bits, I guess it's probably easiest to just apply them
> > along with the ASoC patches.
> 
> I already asked Thierry Reding to take a look at this patchset. He will
> let to you know how the DRM bits should be handled. Hopefully this
> should happen tomorrow.
> 
> We will know how to move forward if Vinod and Thierry will reply ASAP.
> Otherwise this series will have to wait for the next cycle.

I've applied the DRM patches to the drm/tegra tree and pulled in the ARM
device tree changes into the Tegra tree. I think the rest can go through
ASoC. Well, provided you can sort out the patch 6 issue with Vinod.

Thierry
Dmitry Osipenko Dec. 16, 2021, 2:29 p.m. UTC | #5
15.12.2021 22:19, Dmitry Osipenko пишет:
> 15.12.2021 21:57, Mark Brown пишет:
>> On Sat, Dec 04, 2021 at 05:37:03PM +0300, Dmitry Osipenko wrote:
>>
>>> I based S/PDIF patches on Arnd's Bergmann patch from a separate series [1]
>>> that removes obsolete slave_id. This eases merging of the patches by
>>> removing the merge conflict. This is a note for Mark Brown.
>> That's not in my tree so I'll need either a pull request with the series
>> or a resend after the merge window.
> This patch is included as a part of this series, please see the patch #6.
> 
> I saw that Vinod Koul already merged it into his DMA tree [1] a day ago,
> but there is no stable branch there.
> 
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git/log/?h=next
> 

Vinod, will you be a able to create immutable branch for us with the
"dmaengine: kill off dma_slave_config->slave_id" patches [1]?

[1] https://lore.kernel.org/all/20211122222203.4103644-1-arnd@kernel.org/
Dmitry Osipenko Dec. 16, 2021, 3:09 p.m. UTC | #6
16.12.2021 16:55, Thierry Reding пишет:
> On Wed, Dec 15, 2021 at 10:19:07PM +0300, Dmitry Osipenko wrote:
>> 15.12.2021 21:57, Mark Brown пишет:
>>> On Sat, Dec 04, 2021 at 05:37:03PM +0300, Dmitry Osipenko wrote:
>>>
>>>> I based S/PDIF patches on Arnd's Bergmann patch from a separate series [1]
>>>> that removes obsolete slave_id. This eases merging of the patches by
>>>> removing the merge conflict. This is a note for Mark Brown.
>>>
>>> That's not in my tree so I'll need either a pull request with the series
>>> or a resend after the merge window.
>>
>> This patch is included as a part of this series, please see the patch #6.
>>
>> I saw that Vinod Koul already merged it into his DMA tree [1] a day ago,
>> but there is no stable branch there.
>>
>> [1]
>> https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git/log/?h=next
>>
>>>  It's also not clear what to do
>>> about the DRM bits, I guess it's probably easiest to just apply them
>>> along with the ASoC patches.
>>
>> I already asked Thierry Reding to take a look at this patchset. He will
>> let to you know how the DRM bits should be handled. Hopefully this
>> should happen tomorrow.
>>
>> We will know how to move forward if Vinod and Thierry will reply ASAP.
>> Otherwise this series will have to wait for the next cycle.
> 
> I've applied the DRM patches to the drm/tegra tree and pulled in the ARM
> device tree changes into the Tegra tree. I think the rest can go through
> ASoC. Well, provided you can sort out the patch 6 issue with Vinod.

Thank you!
Vinod Koul Dec. 17, 2021, 6:04 a.m. UTC | #7
On 16-12-21, 17:29, Dmitry Osipenko wrote:
> 15.12.2021 22:19, Dmitry Osipenko пишет:
> > 15.12.2021 21:57, Mark Brown пишет:
> >> On Sat, Dec 04, 2021 at 05:37:03PM +0300, Dmitry Osipenko wrote:
> >>
> >>> I based S/PDIF patches on Arnd's Bergmann patch from a separate series [1]
> >>> that removes obsolete slave_id. This eases merging of the patches by
> >>> removing the merge conflict. This is a note for Mark Brown.
> >> That's not in my tree so I'll need either a pull request with the series
> >> or a resend after the merge window.
> > This patch is included as a part of this series, please see the patch #6.
> > 
> > I saw that Vinod Koul already merged it into his DMA tree [1] a day ago,
> > but there is no stable branch there.
> > 
> > [1]
> > https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git/log/?h=next
> > 
> 
> Vinod, will you be a able to create immutable branch for us with the
> "dmaengine: kill off dma_slave_config->slave_id" patches [1]?
> 
> [1] https://lore.kernel.org/all/20211122222203.4103644-1-arnd@kernel.org/

Here you go:

The following changes since commit fa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf:

  Linux 5.16-rc1 (2021-11-14 13:56:52 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git tags/dmaengine_topic_slave_id_removal_5.17

for you to fetch changes up to 3c219644075795a99271d345efdfa8b256e55161:

  dmaengine: remove slave_id config field (2021-12-17 11:23:56 +0530)

----------------------------------------------------------------
dmaengine_topic_slave_id_removal_5.17

Tag for dmaengine slave_id removal topic branch which should be merged
into v5.17

----------------------------------------------------------------
Arnd Bergmann (11):
      ASoC: tegra20-spdif: stop setting slave_id
      dmaengine: tegra20-apb: stop checking config->slave_id
      ASoC: dai_dma: remove slave_id field
      spi: pic32: stop setting dma_config->slave_id
      mmc: bcm2835: stop setting chan_config->slave_id
      dmaengine: shdma: remove legacy slave_id parsing
      dmaengine: pxa/mmp: stop referencing config->slave_id
      dmaengine: sprd: stop referencing config->slave_id
      dmaengine: qcom-adm: stop abusing slave_id config
      dmaengine: xilinx_dpdma: stop using slave_id field
      dmaengine: remove slave_id config field

 drivers/dma/mmp_pdma.c             |  6 ------
 drivers/dma/pxa_dma.c              |  7 -------
 drivers/dma/qcom/qcom_adm.c        | 56 +++++++++++++++++++++++++++++++++++++++++++++++++-------
 drivers/dma/sh/shdma-base.c        |  8 --------
 drivers/dma/sprd-dma.c             |  3 ---
 drivers/dma/tegra20-apb-dma.c      |  6 ------
 drivers/dma/xilinx/xilinx_dpdma.c  | 17 +++++++++++------
 drivers/gpu/drm/xlnx/zynqmp_disp.c |  9 +++++++--
 drivers/mmc/host/bcm2835.c         |  2 --
 drivers/mtd/nand/raw/qcom_nandc.c  | 14 ++++++++++++--
 drivers/spi/spi-pic32.c            |  2 --
 drivers/tty/serial/msm_serial.c    | 15 +++++++++++++--
 include/linux/dma/qcom_adm.h       | 12 ++++++++++++
 include/linux/dma/xilinx_dpdma.h   | 11 +++++++++++
 include/linux/dmaengine.h          |  4 ----
 include/sound/dmaengine_pcm.h      |  2 --
 sound/core/pcm_dmaengine.c         |  5 ++---
 sound/soc/tegra/tegra20_spdif.c    |  1 -
 18 files changed, 117 insertions(+), 63 deletions(-)
 create mode 100644 include/linux/dma/qcom_adm.h
 create mode 100644 include/linux/dma/xilinx_dpdma.h

Thanks
Dmitry Osipenko Dec. 17, 2021, 12:06 p.m. UTC | #8
17.12.2021 09:04, Vinod Koul пишет:
> On 16-12-21, 17:29, Dmitry Osipenko wrote:
>> 15.12.2021 22:19, Dmitry Osipenko пишет:
>>> 15.12.2021 21:57, Mark Brown пишет:
>>>> On Sat, Dec 04, 2021 at 05:37:03PM +0300, Dmitry Osipenko wrote:
>>>>
>>>>> I based S/PDIF patches on Arnd's Bergmann patch from a separate series [1]
>>>>> that removes obsolete slave_id. This eases merging of the patches by
>>>>> removing the merge conflict. This is a note for Mark Brown.
>>>> That's not in my tree so I'll need either a pull request with the series
>>>> or a resend after the merge window.
>>> This patch is included as a part of this series, please see the patch #6.
>>>
>>> I saw that Vinod Koul already merged it into his DMA tree [1] a day ago,
>>> but there is no stable branch there.
>>>
>>> [1]
>>> https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git/log/?h=next
>>>
>>
>> Vinod, will you be a able to create immutable branch for us with the
>> "dmaengine: kill off dma_slave_config->slave_id" patches [1]?
>>
>> [1] https://lore.kernel.org/all/20211122222203.4103644-1-arnd@kernel.org/
> 
> Here you go:
> 
> The following changes since commit fa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf:
> 
>   Linux 5.16-rc1 (2021-11-14 13:56:52 -0800)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git tags/dmaengine_topic_slave_id_removal_5.17
> 
> for you to fetch changes up to 3c219644075795a99271d345efdfa8b256e55161:
> 
>   dmaengine: remove slave_id config field (2021-12-17 11:23:56 +0530)
> 
> ----------------------------------------------------------------
> dmaengine_topic_slave_id_removal_5.17
> 
> Tag for dmaengine slave_id removal topic branch which should be merged
> into v5.17
> 
> ----------------------------------------------------------------
> Arnd Bergmann (11):
>       ASoC: tegra20-spdif: stop setting slave_id
>       dmaengine: tegra20-apb: stop checking config->slave_id
>       ASoC: dai_dma: remove slave_id field
>       spi: pic32: stop setting dma_config->slave_id
>       mmc: bcm2835: stop setting chan_config->slave_id
>       dmaengine: shdma: remove legacy slave_id parsing
>       dmaengine: pxa/mmp: stop referencing config->slave_id
>       dmaengine: sprd: stop referencing config->slave_id
>       dmaengine: qcom-adm: stop abusing slave_id config
>       dmaengine: xilinx_dpdma: stop using slave_id field
>       dmaengine: remove slave_id config field
> 
>  drivers/dma/mmp_pdma.c             |  6 ------
>  drivers/dma/pxa_dma.c              |  7 -------
>  drivers/dma/qcom/qcom_adm.c        | 56 +++++++++++++++++++++++++++++++++++++++++++++++++-------
>  drivers/dma/sh/shdma-base.c        |  8 --------
>  drivers/dma/sprd-dma.c             |  3 ---
>  drivers/dma/tegra20-apb-dma.c      |  6 ------
>  drivers/dma/xilinx/xilinx_dpdma.c  | 17 +++++++++++------
>  drivers/gpu/drm/xlnx/zynqmp_disp.c |  9 +++++++--
>  drivers/mmc/host/bcm2835.c         |  2 --
>  drivers/mtd/nand/raw/qcom_nandc.c  | 14 ++++++++++++--
>  drivers/spi/spi-pic32.c            |  2 --
>  drivers/tty/serial/msm_serial.c    | 15 +++++++++++++--
>  include/linux/dma/qcom_adm.h       | 12 ++++++++++++
>  include/linux/dma/xilinx_dpdma.h   | 11 +++++++++++
>  include/linux/dmaengine.h          |  4 ----
>  include/sound/dmaengine_pcm.h      |  2 --
>  sound/core/pcm_dmaengine.c         |  5 ++---
>  sound/soc/tegra/tegra20_spdif.c    |  1 -
>  18 files changed, 117 insertions(+), 63 deletions(-)
>  create mode 100644 include/linux/dma/qcom_adm.h
>  create mode 100644 include/linux/dma/xilinx_dpdma.h

Thank you!
Mark Brown Dec. 21, 2021, 2:50 a.m. UTC | #9
On Sat, 4 Dec 2021 17:37:03 +0300, Dmitry Osipenko wrote:
> This series revives Tegra20 S/PDIF driver which was upstreamed long time
> ago, but never was used. It also turns Tegra DRM HDMI driver into HDMI
> audio CODEC provider. Finally, HDMI audio is enabled in device-trees.
> For now the audio is enable only for Acer A500 tablet and Toshiba AC100
> netbook because they're already supported by upstream, later on ASUS TF101
> tablet will join them.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[01/22] ASoC: dt-bindings: Add binding for Tegra20 S/PDIF
        commit: 46f016119e2ac38d9efd32e4957bc888dc71fffe
[02/22] ASoC: dt-bindings: tegra20-i2s: Convert to schema
        commit: 80c3d0a97abfd2a678b6077236a77ccb8c4747fa
[03/22] ASoC: dt-bindings: tegra20-i2s: Document new nvidia,fixed-parent-rate property
        commit: 549818e5c85a6d806cdef146d0203df2689d4e2f
[05/22] ASoC: tegra20: spdif: Set FIFO trigger level
        commit: 16736a0221db6d6f3fe130750c6dc5bbf5417da4
[06/22] ASoC: tegra20-spdif: stop setting slave_id
        (no commit info)
[07/22] ASoC: tegra20: spdif: Support device-tree
        commit: c0000fc618cdbe190274cf37040033dfa23c159d
[08/22] ASoC: tegra20: spdif: Improve driver's code
        commit: 117aeed43974e500dcbd106e51218a83ae2c9977
[09/22] ASoC: tegra20: spdif: Use more resource-managed helpers
        commit: 150f4d573fe19a77864f6dec31aa444332f9fc9e
[10/22] ASoC: tegra20: spdif: Reset hardware
        commit: ec1b4545d75575118e01a5e95699cff5010b4e19
[11/22] ASoC: tegra20: spdif: Support system suspend
        commit: d51693092ecc732fca3f49549cde1c5206331b09
[12/22] ASoC: tegra20: spdif: Filter out unsupported rates
        commit: 9d8f51cd1fa993939db02a014d4f4b6e252c2a18
[13/22] ASoC: tegra20: i2s: Filter out unsupported rates
        commit: bfa4671db1effe315cade5bddd6cf025e1c403d0

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark