HiassofT wrote: ↑Wed Jan 17, 2018 6:13 pm
@targa bitclock and frame master properties can be set in the dai link, eg like this:
Thanks for the example, I was missing the part
&r_codec_dai respective
&codec_in which obviously means "take what comes in", right ?
HiassofT wrote: ↑Wed Jan 17, 2018 6:13 pm
If needed you can configure inverted frame or bitclocks signals there, too, just add "frame-inversion;" and/or "bitclock-inversion;".
Thanks a lot, that worked immediately. Sorry - I couldn't myself work out this path.
HiassofT wrote: ↑Wed Jan 17, 2018 6:13 pm
The TDM setup in the DT above configures a slot width of 128 clocks, so a full stereo frame will have 256 clocks - I guess this is what you need.
the above resembles pretty much what my experiments showed best results (I heard somewhat distorted, but recognizable the sound sample I intended to hear. Chaning to 125 instead of 128 would improve, so I wonder whether my incoming bitclock is maybe bad, or rather interfered, since I can see clock glitches on the analyzer as well).
HiassofT wrote: ↑Wed Jan 17, 2018 6:13 pm
The RPi can only drive up to 32 of each TDM slot, the remaining 96-112 bits will be padded up.
Thanks for confirmation, this was my understanding from the documentation and from what I saw on the analyzer, just I wasn't sure. Imagine I had a bad bit clock, in terms of "the clock is stepping too fast every now and then", how would the Pi react From my analyer output it looks like it's padding the empty bits and then starts a new channel data EVEN IF THE NEW FRAME CLOCK WASNT THERE YET. Is that something you can imagine ? That would actually explain why the sound sound better if I only configure 122....125 bits, then the chances are higher that the frame ist still in sync.
HiassofT wrote: ↑Wed Jan 17, 2018 6:13 pm
I'm not sure what exactly you mean with S16_BE, as that's a user space data format, I2S, DSP and left/right justified modes will always clock out the MSB of each data sample first.
now we come to an interesting piece of information. I knew in advance my incoming signal will be MSB, and from reading I understood that MSB means BE, since I want to output the sound towards a USB Sound device which accepts S16_LE, I was under the impression that I need also to actually convert BE in LE ? What I understand from you know is that I don't have to care about that ?
Can I do arecord -D hw:Dual | aplay -D hw:USB-device with no plug-conversion, et al ? Alsa is just taking the two stereo channels and putting them into target as it needs them ?