[alsa-devel] [RFC PATCH 1/2] ASoC: simple-card: add support for bclk_ratio

Russell King - ARM Linux admin linux at armlinux.org.uk
Tue Feb 26 16:45:19 CET 2019


On Tue, Feb 26, 2019 at 09:53:22AM -0500, Sven Van Asbroeck wrote:
> I notice that hdmi-codec.c supports up to 8 channels in hdmi multi-channel
> playback mode. If we had a _theoretical_ hdmi xmitter with 8chan support,
> would the bclk_ratio not be 8 x slot_size - or 8 x 32 if using an fsl_ssi
> in master mode?
> 
> This will of course never happen with the tda998x, because
>         .max_i2s_channels = 2,
> but we are thinking about a generic solution here.

The way TDA998x supports multichannel audio with I2S is as follows:

"The TDA9983B supports the NXP I2S-bus format. There are four I2S-bus
stereo input channels (AP1 to AP4), which enable 8 uncompressed audio
channels to be carried."

There is only one WS input and one SCK (bclk) input, which are common
to each of the I2S buses.

The TDA19988 reduces this down to two I2S buses, which means it
supports only up to 4 uncompressed channels.  hdmi-codec doesn't
take account of these restrictions, and just assumes the maximal
number of channels are always available.

So, given this parallel bus architecture, it means that whether we
have 2, 4, 6, or 8 channels is irrelevant to the number of bitclocks
per sample - the number of bitclocks would be the same.

I can't see how you'd extend a single I2S setup to support multi-
channel audio without either adding more I2S data lines or adding
additional WS signals (so making it e.g., a binary number).

Adding more WS signals makes the bus deviate from the I2S standard,
thereby making it impossible to connect a set of standard DACs to
such a source, whereas adding more I2S data lines, you just connect
each DAC to each I2S data line and common up the bit clock and WS
signals across all.

In other words, the TDA998x approach is really the only sane way
forward.

Now, as far as transmitter support, I believe TI Davinci SoCs use
this - my Onkyo TX-NR609 AV receiver uses a DA830 SoC as a DSP to
do the surround decode, which feeds multi-channel audio out to a
set of DACs over a parallel I2S bus.  The "mcasp" audio driver
has multiple serialisers to cope with this - see
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up


More information about the Alsa-devel mailing list