ARM MP3/AAC Player left / right

OP #1172693
Rate this post
useful
not useful
Hi all,

I have build the ARM MP3/AAC Player based on the Olimex SAM7-H256 board.
The player randomly swaps left and right channel at startup or even if a
new track is started. I checked with an logic analyzer and an MP3 track
that only contains the left channel. The DAC is working ok, but the ARM
sometimes sends the data when LRCIN is low, that means right channel.
Has anyone faced the same problem or has it something to do with my
hardware ?

Any idea is welcome.

Peter
OP #1172694
Rate this post
useful
not useful
.......
dac_write_reg(AIC_REG_DIG_FORMAT, (1 << 6) | 2); // master, I2S left
aligned
// dac_write_reg(AIC_REG_DIG_ACT, 1 << 0); // activate digital interface

void dac_enable_dma()
{
  // enable DMA
  *AT91C_SSC_PTCR = AT91C_PDC_TXTEN;
  dac_write_reg(AIC_REG_DIG_ACT, 1 << 0); // activate digital interface
}

void dac_disable_dma()
{
  // disable DMA
  dac_write_reg(AIC_REG_DIG_ACT, 0); // deactivate digital interface
  *AT91C_SSC_PTCR = AT91C_PDC_TXTDIS;
}

have fun

Peter

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now