Currently I'm trying to send a tone from the DSP to the audio codec so
that I can hear it with my headset.
I use the McBSP2 interface (SLAVE), and the TPS65950 codec(MASTER).
the communication is I2S.
16 bit per word. (Though McBSP registers are 32-bit long), Dual-phase
(( two channels)FRAME_LEN =1, obviously)
What I do it's this:
- Using appropiate drivers the codec gets initialized, namely those
drivers provided with the 2.6 kernel. Thus, in ARM's side I configure
and load the codec, which once initialized and configured, it is
supposed to be ready.
- I'm doing a little test. First in DSP's side I write 240 times 16-
bit data to McBSP2 DXR register. As I've enabled the XRDY interrupt,
it is supposed that when the Trasnmit buffer (XB) exceeds the
THRESHOLD +1 free locations (for me set to 240), it must trigger an
interrupt and thus, it may be captured having configured properly the
INT vector and ISR routine. Once triggered it can continue triggering
because at isr what I do it is to write 240 times two data types:
INT_MAX and INT_MIN, thus, it might be perfomed a square signal of 400
Hz, this is, a tone which can be heard trough the headset.
Sounds a little weird but that's the idea, although what I really want
it is to try that codec works.
- I'm not using the DMA transfer mode at the moment, it's a simple
test. Is it possible to send data at McBSP2 DXR register and expect
that it reaches properly the TPS65950 codec at the rising edge of FSX
signal for one channel and at the falling edge the other channel? I
also poll the XRDY bit before writing to the DXR register.
Any help will be appreciated.
Ignacio