Mp3 Player

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is it possible to decode mp3 on atmega128 with 16M crystal? Or can it be done in Xmega128a3U with 32M crystal,in real time(without a decoding IC)?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You're probably pushing your luck. I've seen implementations on 32 bit arms.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The process as such is a bit complicated for an 8 bit micro I guess. Why not use a decoding IC if you don't want to go for a big micro

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess that depends on the implementation.
Quite possible as there are fixed-point mp3 decoders, like this one:
https://datatype.helixcommunity....
I doubt m128 will cope with 128kbps 48kHz stereo in Real-Time.
But, you need to

    -download mp3 data (from SD I guess), -decode, and then
    -push the stream out through i2s to external amplifier (does m128 support i2s?).
in real time.
Get faster chip.

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is it possible to do mpe decording with Xmega128a3U with 32M crystal?(because i am doing a univercity project: Mp3 player from a single chip)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use an ARM. You can easily get M3 and M4 at over 100MHz and also benefit from 32bit and pipelining. For AVR use one of the DSP based decoder chips from VLSI.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Some AVR32 UC3 have access to proprietary audio codecs licensed by Atmel.
Atmel Audio Datasheets

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

single chip != without a decoding IC

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Milprasad wrote:
Is it possible to decode mp3 on atmega128 with 16M crystal?
Does it have to use MP3?
An open codec, like Opus, should be able to perform narrow-band (speech) decode and maybe wide-band decode on an AVR with enough SRAM; decode of music would need some estimation to see if it's feasible.
Music encoding is likely iffy on an AVR.

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brutte wrote:
-push the stream out through i2s to external amplifier ...
fyi, Maxim Integrated makes an audio amp with PDM input.
MAX98356, PDM Input Class D Audio Power Amplifier

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is there any good mp3 decoding tutorial to implement the algorithm in arm? Can anybody share your mp3 decoding knowledge?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How to find the start of the mp3 main data and the end of it?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just typed "mp3 file format" into Google. The second link was:

http://mpgedit.org/mpgedit/mpeg_...

As it says:

Quote:
As there is no file header, you can cut any part of MPEG file and play it correctly

However there is a string chance that there's an ID3 tag on the front. So Google that ("ID3 format"):

http://id3.org/id3v2.4.0-structure

So you'll find that a typical MP3 maybe begins something like this:

Offset      0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F

00000000   49 44 33 03 00 00 00 03  43 77 54 49 54 32 00 00   ID3     CwTIT2  
00000010   00 2B 00 00 01 FF FE 46  00 6F 00 72 00 65 00 76    +   ÿþF o r e v
00000020   00 65 00 72 00 20 00 6C  00 69 00 76 00 65 00 20    e r   l i v e  
00000030   00 61 00 6E 00 64 00 20  00 64 00 69 00 65 00 54    a n d   d i e T
00000040   50 45 31 00 00 00 09 00  00 01 FF FE 4F 00 4D 00   PE1       ÿþO M 
00000050   44 00 54 41 4C 42 00 00  00 19 00 00 01 FF FE 42   D TALB       ÿþB
00000060   00 65 00 73 00 74 00 20  00 6F 00 66 00 20 00 4F    e s t   o f   O
00000070   00 4D 00 44 00 54 59 45  52 00 00 00 05 00 00 01    M D TYER       
00000080   FF FE 30 00 54 52 43 4B  00 00 00 0B 00 00 01 FF   ÿþ0 TRCK       ÿ
00000090   FE 31 00 34 00 2F 00 30  00 54 50 4F 53 00 00 00   þ1 4 / 0 TPOS   
000000A0   09 00 00 01 FF FE 30 00  2F 00 30 00 54 43 4F 4E       ÿþ0 / 0 TCON
000000B0   00 00 00 19 00 00 01 FF  FE 45 00 6C 00 65 00 63          ÿþE l e c
000000C0   00 74 00 72 00 6F 00 6E  00 69 00 63 00 61 00 41    t r o n i c a A
000000D0   50 49 43 00 00 E1 28 00  00 00 69 6D 61 67 65 2F   PIC  á(   image/
000000E0   6A 70 65 67 00 03 00 FF  D8 FF E0 00 10 4A 46 49   jpeg   ÿØÿà  JFI
===============================================================================