[alsa-devel] ASoC: BCM2835-I2S: TDM slots / slot mask ignored

Steven Eckhoff steven.eckhoff.opensource at gmail.com
Wed Apr 25 16:00:34 CEST 2018


Hi,

I am testing a codec driver interfaced to the Raspberry Pi in TDM mode
and on the logic analyzer I see that the I2S controller is shifting out
data in slots 2 - 7 when playing 2 channel audio. The codec is master 
and only works at 256 x fs, so after the frame sync slots 0 and 1 
transfer as they should but after that data continues to be shifted out.
It is my understanding that the remaining bits should be zero padded.

On a similar note I see that the I2S bcm2835-i2s driver only supports 2
slots, but it seems it can also do 8. For example if I take an 8 channel
audio source file(NOTE: I had to hack the file to look like 2 channels
so hw_params didn't return an error) and play it I hear the first two 
channels fine and in the part that I am writing the dirver for I can 
easily route the other slots to additional DACs and get those to play
as well.

So I guess I am wondering about two things:

1. In the first case why does my 2 channel audio get shifted out on all
8 slots? It seems if configured for 2 it should only shift data in the
first two and wait for the next fsync before starting to shift again.

2. Why does the driver obly support 2 channels when it seems the
hardware is capable of more?

I figure there is something about this controller that made this tricky
or impossible, but I am still curious about it.

Regards,

Steven


More information about the Alsa-devel mailing list