mbox series

[U-Boot,00/11] sound: Add sound support for Nyan

Message ID 20181227202446.229042-1-sjg@chromium.org
Headers show
Series sound: Add sound support for Nyan | expand

Message

Simon Glass Dec. 27, 2018, 8:24 p.m. UTC
This series adds sound support for Nyan. It allows simple beeps to be
generated in U-Boot. This requires the addition of an I2S driver, an
audio hub driver and a sound driver to pull things together. An existing
audio codec (MAX98090) is used.


Simon Glass (11):
  misc: Allow child devices
  sound: samsung: Fix 'regiter' typo
  sound: i2s: Tidy up a few comments
  sound: Allow audio codecs to be used by other SoCs
  tegra: Correct tegra124 clock name
  tegra: Add a delay in clock_start_periph_pll()
  tegra: sound: Add an audio hub driver
  tegra: sound: Add an I2S driver
  sound: tegra: Add a sound driver
  tegra: nyan-big: Enable sound
  tegra: nyan: Add a README

 arch/arm/include/asm/arch-tegra/tegra_ahub.h | 475 +++++++++++++++++++
 arch/arm/include/asm/arch-tegra/tegra_i2s.h  | 206 ++++++++
 arch/arm/mach-tegra/clock.c                  |   1 +
 arch/arm/mach-tegra/tegra124/clock.c         |   2 +-
 board/nvidia/nyan-big/README                 |  18 +
 board/nvidia/nyan-big/nyan-big.c             |   2 +-
 configs/nyan-big_defconfig                   |   8 +-
 drivers/misc/misc-uclass.c                   |   1 +
 drivers/sound/Kconfig                        |  17 +-
 drivers/sound/Makefile                       |   1 +
 drivers/sound/max98088.c                     |   7 -
 drivers/sound/max98090.c                     |   7 -
 drivers/sound/max98095.c                     |   7 -
 drivers/sound/maxim_codec.c                  |   3 -
 drivers/sound/samsung-i2s.c                  |  16 +-
 drivers/sound/samsung_sound.c                |   4 +
 drivers/sound/tegra_ahub.c                   | 256 ++++++++++
 drivers/sound/tegra_i2s.c                    | 124 +++++
 drivers/sound/tegra_i2s_priv.h               |  29 ++
 drivers/sound/tegra_sound.c                  | 100 ++++
 include/i2s.h                                |  11 +-
 21 files changed, 1246 insertions(+), 49 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-tegra/tegra_ahub.h
 create mode 100644 arch/arm/include/asm/arch-tegra/tegra_i2s.h
 create mode 100644 board/nvidia/nyan-big/README
 create mode 100644 drivers/sound/tegra_ahub.c
 create mode 100644 drivers/sound/tegra_i2s.c
 create mode 100644 drivers/sound/tegra_i2s_priv.h
 create mode 100644 drivers/sound/tegra_sound.c

Comments

Simon Glass Jan. 20, 2019, 8:32 p.m. UTC | #1
Hi Tom Warren,

On Fri, 28 Dec 2018 at 09:24, Simon Glass <sjg@chromium.org> wrote:
>
> This series adds sound support for Nyan. It allows simple beeps to be
> generated in U-Boot. This requires the addition of an I2S driver, an
> audio hub driver and a sound driver to pull things together. An existing
> audio codec (MAX98090) is used.
>
>
> Simon Glass (11):
>   misc: Allow child devices
>   sound: samsung: Fix 'regiter' typo
>   sound: i2s: Tidy up a few comments
>   sound: Allow audio codecs to be used by other SoCs
>   tegra: Correct tegra124 clock name
>   tegra: Add a delay in clock_start_periph_pll()
>   tegra: sound: Add an audio hub driver
>   tegra: sound: Add an I2S driver
>   sound: tegra: Add a sound driver
>   tegra: nyan-big: Enable sound
>   tegra: nyan: Add a README
>
>  arch/arm/include/asm/arch-tegra/tegra_ahub.h | 475 +++++++++++++++++++
>  arch/arm/include/asm/arch-tegra/tegra_i2s.h  | 206 ++++++++
>  arch/arm/mach-tegra/clock.c                  |   1 +
>  arch/arm/mach-tegra/tegra124/clock.c         |   2 +-
>  board/nvidia/nyan-big/README                 |  18 +
>  board/nvidia/nyan-big/nyan-big.c             |   2 +-
>  configs/nyan-big_defconfig                   |   8 +-
>  drivers/misc/misc-uclass.c                   |   1 +
>  drivers/sound/Kconfig                        |  17 +-
>  drivers/sound/Makefile                       |   1 +
>  drivers/sound/max98088.c                     |   7 -
>  drivers/sound/max98090.c                     |   7 -
>  drivers/sound/max98095.c                     |   7 -
>  drivers/sound/maxim_codec.c                  |   3 -
>  drivers/sound/samsung-i2s.c                  |  16 +-
>  drivers/sound/samsung_sound.c                |   4 +
>  drivers/sound/tegra_ahub.c                   | 256 ++++++++++
>  drivers/sound/tegra_i2s.c                    | 124 +++++
>  drivers/sound/tegra_i2s_priv.h               |  29 ++
>  drivers/sound/tegra_sound.c                  | 100 ++++
>  include/i2s.h                                |  11 +-
>  21 files changed, 1246 insertions(+), 49 deletions(-)
>  create mode 100644 arch/arm/include/asm/arch-tegra/tegra_ahub.h
>  create mode 100644 arch/arm/include/asm/arch-tegra/tegra_i2s.h
>  create mode 100644 board/nvidia/nyan-big/README
>  create mode 100644 drivers/sound/tegra_ahub.c
>  create mode 100644 drivers/sound/tegra_i2s.c
>  create mode 100644 drivers/sound/tegra_i2s_priv.h
>  create mode 100644 drivers/sound/tegra_sound.c
>
> --
> 2.20.1.415.g653613c723-goog
>

Are there any comments on this series please? I would like to get it
applied before the merge window closes if possible as I have another
series that builds on it.

Regards,
Simon
Simon Glass Jan. 21, 2019, 11:43 p.m. UTC | #2
Hi Tom,

On Mon, 21 Jan 2019 at 10:46, Tom Warren <TWarren@nvidia.com> wrote:
>
> Let's have Jon Hunter take a look, I'll take it in to tegra/master if he acks it.

OK thank you. For now I've picked up the non-Tegra patches from that
series so I can get this out.

Regards,
SImon

>
> -----Original Message-----
> From: Simon Glass <sjg@chromium.org>
> Sent: Sunday, January 20, 2019 1:32 PM
> To: U-Boot Mailing List <u-boot@lists.denx.de>
> Cc: Mario Six <mario.six@gdsys.cc>; Tom Warren <TWarren@nvidia.com>; Stephen Warren <swarren@wwwdotorg.org>; Albert Aribaud <albert.u.boot@aribaud.net>; Allen Martin <AMartin@nvidia.com>; Minkyu Kang <mk7.kang@samsung.com>; Stephen Warren <swarren@nvidia.com>
> Subject: Re: [PATCH 00/11] sound: Add sound support for Nyan
>
> Hi Tom Warren,
>
> On Fri, 28 Dec 2018 at 09:24, Simon Glass <sjg@chromium.org> wrote:
> >
> > This series adds sound support for Nyan. It allows simple beeps to be
> > generated in U-Boot. This requires the addition of an I2S driver, an
> > audio hub driver and a sound driver to pull things together. An
> > existing audio codec (MAX98090) is used.
> >
> >
> > Simon Glass (11):
> >   misc: Allow child devices
> >   sound: samsung: Fix 'regiter' typo
> >   sound: i2s: Tidy up a few comments
> >   sound: Allow audio codecs to be used by other SoCs
> >   tegra: Correct tegra124 clock name
> >   tegra: Add a delay in clock_start_periph_pll()
> >   tegra: sound: Add an audio hub driver
> >   tegra: sound: Add an I2S driver
> >   sound: tegra: Add a sound driver
> >   tegra: nyan-big: Enable sound
> >   tegra: nyan: Add a README
> >
> >  arch/arm/include/asm/arch-tegra/tegra_ahub.h | 475
> > +++++++++++++++++++  arch/arm/include/asm/arch-tegra/tegra_i2s.h  | 206 ++++++++
> >  arch/arm/mach-tegra/clock.c                  |   1 +
> >  arch/arm/mach-tegra/tegra124/clock.c         |   2 +-
> >  board/nvidia/nyan-big/README                 |  18 +
> >  board/nvidia/nyan-big/nyan-big.c             |   2 +-
> >  configs/nyan-big_defconfig                   |   8 +-
> >  drivers/misc/misc-uclass.c                   |   1 +
> >  drivers/sound/Kconfig                        |  17 +-
> >  drivers/sound/Makefile                       |   1 +
> >  drivers/sound/max98088.c                     |   7 -
> >  drivers/sound/max98090.c                     |   7 -
> >  drivers/sound/max98095.c                     |   7 -
> >  drivers/sound/maxim_codec.c                  |   3 -
> >  drivers/sound/samsung-i2s.c                  |  16 +-
> >  drivers/sound/samsung_sound.c                |   4 +
> >  drivers/sound/tegra_ahub.c                   | 256 ++++++++++
> >  drivers/sound/tegra_i2s.c                    | 124 +++++
> >  drivers/sound/tegra_i2s_priv.h               |  29 ++
> >  drivers/sound/tegra_sound.c                  | 100 ++++
> >  include/i2s.h                                |  11 +-
> >  21 files changed, 1246 insertions(+), 49 deletions(-)  create mode
> > 100644 arch/arm/include/asm/arch-tegra/tegra_ahub.h
> >  create mode 100644 arch/arm/include/asm/arch-tegra/tegra_i2s.h
> >  create mode 100644 board/nvidia/nyan-big/README  create mode 100644
> > drivers/sound/tegra_ahub.c  create mode 100644
> > drivers/sound/tegra_i2s.c  create mode 100644
> > drivers/sound/tegra_i2s_priv.h  create mode 100644
> > drivers/sound/tegra_sound.c
> >
> > --
> > 2.20.1.415.g653613c723-goog
> >
>
> Are there any comments on this series please? I would like to get it applied before the merge window closes if possible as I have another series that builds on it.
>
> Regards,
> Simon
>
> -----------------------------------------------------------------------------------
> This email message is for the sole use of the intended recipient(s) and may contain
> confidential information.  Any unauthorized review, use, disclosure or distribution
> is prohibited.  If you are not the intended recipient, please contact the sender by
> reply email and destroy all copies of the original message.
> -----------------------------------------------------------------------------------
Simon Glass Feb. 8, 2019, 4:14 a.m. UTC | #3
Hi Tom,

On Mon, 21 Jan 2019 at 16:43, Simon Glass <sjg@chromium.org> wrote:
>
> Hi Tom,
>
> On Mon, 21 Jan 2019 at 10:46, Tom Warren <TWarren@nvidia.com> wrote:
> >
> > Let's have Jon Hunter take a look, I'll take it in to tegra/master if he acks it.
>
> OK thank you. For now I've picked up the non-Tegra patches from that
> series so I can get this out.

Any news on this? is it still pending?

Regards,
Simon
Jon Hunter Feb. 8, 2019, 9:50 a.m. UTC | #4
On 08/02/2019 04:14, Simon Glass wrote:
> Hi Tom,
> 
> On Mon, 21 Jan 2019 at 16:43, Simon Glass <sjg@chromium.org> wrote:
>>
>> Hi Tom,
>>
>> On Mon, 21 Jan 2019 at 10:46, Tom Warren <TWarren@nvidia.com> wrote:
>>>
>>> Let's have Jon Hunter take a look, I'll take it in to tegra/master if he acks it.
>>
>> OK thank you. For now I've picked up the non-Tegra patches from that
>> series so I can get this out.
> 
> Any news on this? is it still pending?

I have reviewed patches 7-11 on patchwork (sorry I don't have the
originals and so cannot reply inline as normal). Overall looks fine to
me but a couple minor comments ...

Patch 7 there is a typo in the Kconfig ...

+config I2S_TEGRA
+	bool "Enable I2C support for Nvidia Tegra SoCs"

s/I2C/I2S

Patch 8, in the function 'i2s_tx_init' it should not be necessary to
program the slot_ctrl register for I2S mode.

Patch 8, where is 'audio_pll_clk' used? The rate looks a bit odd. For
example, on the Jetson TK1 (which has the rt5677 codec), the codec
operates with an MCLK of 256*fs, so at 48kHz that would be 12.288MHz.

Cheers
Jon
Simon Glass March 31, 2019, 2:01 a.m. UTC | #5
Hi Jon,

On Fri, 8 Feb 2019 at 02:50, Jon Hunter <jonathanh@nvidia.com> wrote:
>
>
> On 08/02/2019 04:14, Simon Glass wrote:
> > Hi Tom,
> >
> > On Mon, 21 Jan 2019 at 16:43, Simon Glass <sjg@chromium.org> wrote:
> >>
> >> Hi Tom,
> >>
> >> On Mon, 21 Jan 2019 at 10:46, Tom Warren <TWarren@nvidia.com> wrote:
> >>>
> >>> Let's have Jon Hunter take a look, I'll take it in to tegra/master if he acks it.
> >>
> >> OK thank you. For now I've picked up the non-Tegra patches from that
> >> series so I can get this out.
> >
> > Any news on this? is it still pending?
>
> I have reviewed patches 7-11 on patchwork (sorry I don't have the
> originals and so cannot reply inline as normal). Overall looks fine to
> me but a couple minor comments ...
>
> Patch 7 there is a typo in the Kconfig ...
>
> +config I2S_TEGRA
> +       bool "Enable I2C support for Nvidia Tegra SoCs"
>
> s/I2C/I2S
>
> Patch 8, in the function 'i2s_tx_init' it should not be necessary to
> program the slot_ctrl register for I2S mode.

OK I will fix those too in v2.

>
> Patch 8, where is 'audio_pll_clk' used? The rate looks a bit odd. For
> example, on the Jetson TK1 (which has the rt5677 codec), the codec
> operates with an MCLK of 256*fs, so at 48kHz that would be 12.288MHz.

Actually the clock is calculated, so this field is just set for
completeness. It isn't used in the tegra path.

Regards,
SImon