2009/6/9 Daniel Ribeiro <drwyrm@xxxxxxxxx>:> Em Seg, 2009-06-08 às 19:06 +0100, Mark Brown escreveu:>> Think about TDM mode for a minute here - there a separate configuration>> for the sample size on the wire opens the way to using a lower sample>> size in a given timeslot than the timeslot supports, reducing the need>> for the CPU to rewrite data. Or to put it another way, I can't see TDM>> mode working unless the sample size is constrained to always be exactly>> that desired so it seems sensible to have a standard way of doing that.>> Hum... Now I understood this. If i want to use network mode with 2> different codecs, and they differ on the expected frame_size i have to> use the smaller frame_size for both codecs.>> And indeed, in this case the best place to setup the frame size would be> on set_tdm_slot().>>> I'd rather come up with a cleaner way of configuring the magician case>> that's explicit about what it's trying to achieve. It doesn't need to>> be in user space, though.>> I dont know how to do this other than just changing the frame size... :)> OK, not having enough time to read all this thread, let's make surefirst we are on the same floor: frame_width = number of bit clocks per framesample_width = number of bits per sample And the assumption that frame_width = sample_width * channel ( = LRCLK for I2S ) is no longer (and ever) correct. E.g. the frame width could be 64fs, meaning a whole frame is consistingof 64 bitclks - that's saying, sample width from 1 - 64 are possible,For typical 16-bit sample width I2S format, the envelope for each sampleis 32 bitclks, and offseting by 1 bitclk starts the 16-bit sample. And the TDM mode is actually special for PXA-SSP to emulate the I2Sprotocol, it's no way generic TDM in a common sense. So talking aboutset_tdm_slots(), I'd really like to hide into the format setting codeof I2S/Left_J to avoid further confusion. And I still didn't quite capture the issue of magician. Phillip, doyou have any HW reference to the audio codec and the connection onmagician?_______________________________________________Alsa-devel mailing listAlsa-devel@xxxxxxxxxxxxxxxxxxxx://mailman.alsa-project.org/mailman/listinfo/alsa-devel