RTEMS device driver and interrupt

Joel Sherrill joel at OARcorp.com
Fri Apr 12 13:03:52 UTC 2002



Angelo Fraietta wrote:
> 
> If you are using actual sound, the normal approach is to use DMA due
> to the large number of bytes to transmit. The CPU stops while the DMA
> is happening and you don't get the overhead involved with using an ISR
> (except when the transfer has completed)

Let me rephrase the questions...

  + if you are decoding Ogg files to a raw bit stream, how much
    code space does the decoding take?  data space? work RAM? CPU time?
  + what size buffers are you using to DMA?  Alternate version of
    question.. when you get an interrupt saying "give me more data"
    how much data do you give it?  How often does this happen?

I am generally trying to figure out how small an embedded system 
can be from a HW perspective and still do this.  

--joel


> Joel Sherrill wrote:
> 
> > Pattara Kiatisevi wrote:
> >
> >> Hi,
> >> I have a conceptual problem while writing a device driver for
> >> sound.
> >> The idea is that the write() function to this device should block
> >> until
> >> all the music sent has been played. I plan to:
> >> -have the audio core sent the interrupt when it finishes playing
> >> the music
> >> to processor.
> >> -in the device driver code:
> >>         -write() function blocks at rtems_semaphore_obtain(x)
> >> after
> >> sending all data to hardware
> >>         -an interrupt service routine will call
> >> rtems_semaphore_release(x)
> >> which will wake up the write() to finish
> >> Is this scheme ok? Or RTEMS guys are usually doing something
> >> else..
> >>
> > It should be OK.  Some people also use event send/receive for
> > interaction between ISRs and tasks.  The choice depends on what you
> > are controlling and what works more naturally.
> > Out of curiousity, how much code, data, and bss is your application
> > taking?  I am curious how light/heavy your application is.
> > How much memory is required for effective buffering?  Where are your
> > sound source files stored?
> > So many questions.. ;)
> >
> >> Thanks much,
> >> Pattara
> >> --
> >> Please avoid sending me Word or PowerPoint attachments.
> >> See http://www.fsf.org/philosophy/no-word-attachments.html
> >> ----------------------------------------------------------------------
> >> Ott Pattara Kiatisevi                              T L W G
> >> M.Sc. INFOTECH Student, Stuttgart, Germany
> >> http://linux.thai.net/
> >> ----------------------------------------------------------------------
> >>
> 
> --
> Angelo Fraietta
> 
> PO Box 859
> Hamilton NSW 2303
> 
> Home Page
> 
> http://www.users.bigpond.com/angelo_f/
> 
> There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
> There are those who seek knowledge to be known by others - that is VANITY
> There are those who seek knowledge in order to serve - that is LOVE
>     Bernard of Clairvaux (1090 - 1153)

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list