DSPRelated.com
Forums

DSK5510 codec reads only one channel while receiving data from the DSP

Started by Aditi Akula September 14, 2010
Hi,

I am working an a DSK5510 board and I have this problem with the codec.

The codec (AIC23) sends 2 words of data per sample (one 16-bit left channel
followed by 16-bit right channel in DSP mode).
So, I have configured my McBSP2 to handle 1 frame of 32-bit data (entries to
the RCR1 and XCR1 register on McBSP2 are 0x00a0).

This is what I do on the receive side of the McBSP2 to read 32-bit word from
the codec (16-bit left, 16-bit right, no delay)

rx_buf[inp_index] = (*(ioport short int *)DRR22_ADDR); /* read word */
++inp_index;
rx_buf[inp_index] = (*(ioport short int *)(DRR12_ADDR));

This works fine.

When I do the same on the McBSP transmit side

(*(ioport short int*)DXR22_ADDR) = tx_buf[out_index];
++out_index;
(*(ioport short int*)DXR12_ADDR) = tx_buf[out_index];

It does not work, the codec reads only the first word.

Is there any thing that I am missing?
Can somebody help me with this?

Thank you,
Regards,
Aditi.
Aditi,

The AIC23 most likely generates and expects one Frame Sync pulse per
16-bit channel. When you change to 32-bit data, there's probably
only one Frame Sync pulse. You have to set the McBSP to a mode that
is compatible with the external hardware, because it is synchronous
data, not asynchronous.

There are three signals involved: clock, data, and frame sync. You
cannot arbitrarily change the relationship between these signals, at
least not with hard-wired chips on the far side of the connection.

Brian Willoughby
Sound Consulting
On Sep 10, 2010, at 13:09, Aditi Akula wrote:
> I am working an a DSK5510 board and I have this problem with the
> codec.
>
> The codec (AIC23) sends 2 words of data per sample (one 16-bit left
> channel followed by 16-bit right channel in DSP mode).
> So, I have configured my McBSP2 to handle 1 frame of 32-bit data
> (entries to the RCR1 and XCR1 register on McBSP2 are 0x00a0).
>
> This is what I do on the receive side of the McBSP2 to read 32-bit
> word from the codec (16-bit left, 16-bit right, no delay)
>
> rx_buf[inp_index] = (*(ioport short int *)DRR22_ADDR); /* read
> word */
> ++inp_index;
> rx_buf[inp_index] = (*(ioport short int *)(DRR12_ADDR));
>
> This works fine.
>
> When I do the same on the McBSP transmit side
>
> (*(ioport short int*)DXR22_ADDR) = tx_buf[out_index];
> ++out_index;
> (*(ioport short int*)DXR12_ADDR) = tx_buf[out_index];
>
> It does not work, the codec reads only the first word.
>
> Is there any thing that I am missing?