Hi all,
I'm having trouble configuring the McASP-format.
I wish to use 24-bits, MSB-first, left-aligned format in 32-bits slots on both the receive and transmit ports. On the DSP-side I want the samples represented as signed integers (for later conversion and processing in floating point).
When directly forwarding received data to the transmit port everything appears fine but when converting to floating point (double precision) and back the sound gets distorted.
Please review my McASP-configuration (below).
Best Regards,
Tobias
MCASP0_RMASK = 0x00FFFFFF; // Pad the 8 MSBs.
MCASP0_RFMT = 0
| (0 << 16) // 0-bit delay.
| (1 << 15) // MSB first.
| (2 << 13) // Pad with..
| (23 << 8) // ..bit 23 (MSB, sign extend).
| (0xF << 4) // Slot size is 32 bits.
| (0 << 3) // Reads on dMAX port.
| (2 << 0); // Rotate right by 8 bits.
MCASP0_XMASK = 0x00FFFFFF; // Use lower 24 bits.
MCASP0_XFMT = 0
| (0 << 16) // 0-bit delay.
| (1 << 15) // MSB first.
| (0 << 13) // Pad with 0.
| (0xF << 4) // Slot size is 32 bits.
| (0 << 3) // Writes on dMAX port.
| (6 << 0); // Rotate right by 24 bits.