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

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.