[En-Nut-Discussion] CVS Commits
Ralph Mason
ralph.mason at telogis.com
Thu Dec 18 20:39:10 CET 2003
Harald Kipp wrote:
>> The amount of data required is totally deterministic and regular. So
>> you could have a timer interrupt that refills it at regular
>> intervals (when it's about half empty). Then the main thread can
>> just keep a buffer fill for the timer to send out to the decoder.
>> Seems like it decouples it well.
>
> I disagree seldom with your views, but I do here. :-)
> You are not considering variable bitrate streams, which
> are quite common for high quality.
We all disagree sometimes, like I said it was some years ago that I did
one, and variable bitrate wasn't something I had to consider. But even
with variable bitrate there must be an upper limit at which the stream
becomes deterministic. Your code needs to be able to handle this
theoretical max rate, so the timer needs to go off at some interval more
frequently than the amount of time taken to use consume data at this max
rate. ( I am assuming here that the chip has some full / not full line
comming out of it )
>
>> I did a mp3 player with a mega103 and a STA019 a few years back. My
>> conclusion was that if I was to do it again (with an AVR) I would
>> just use a cheap sram and a CPLD to feed the decoder, so I could
>> write to it parallel and have a big deep fifo. $3 worth of hardware
>> makes the whole job simple. Of course I was running slower and the
>> max SPI speed was less in terms of clock cycles than it is with the 128.
>
>
> Why use extra hardware, if you can do it in software?
> But taking into account, that the CPLD can replace the
> address latch and possibly other hardware too, you are
> right.
Hardware is easier to debug than software. If the software can only
just keep up the data flow what happens when you need to add that extra
little feature? If you are making millions of then then thats one
thing, if it's just a few hundred or so the hardware is much cheaper.
In reality if I were to be trying to make MP3 players I wouldn't choose
an AVR at all so it's all hypothetical.
Ralph
More information about the En-Nut-Discussion
mailing list