RTEMS sound device driver
Pattara Kiatisevi
pkiatisevi at student.ei.uni-stuttgart.de
Thu Feb 7 18:02:49 UTC 2002
Hi,
I am going to write a device driver for a sound device to be run with RTEMS and
LEON chip. As I have very little experience with RTEMS, I have some questions:
Client program that will use this device driver:
================================================
-in Linux I do:
audio_fd = open("/dev/dsp",O_WRONLY , 0)
-in RTEMS:
Will the above open() work? or do I have to:
rtems_io_open( xxx )? And how can I know what "xxx" should be?
-in Linux I do:
int format = AFMT_S16_LE;
ioctl(audio_fd, SNDCTL_DSP_SETFMT, &format);
-in RTEMS?
What should I do?
-in Linux I do:
sizewritten = write(audio_fd, audio_buffer, inputsize);
-in RTEMS:
I should use rtems_io_write() right? And how about the parameters?
Device driver:
==============
-The place that I have to put the device driver code is under
<rtems>/c/src/lib/libbsp/sparc/leon/ right? As I couldn't find any implementation of audio driver before, does it have any template so that I could know which functions should exist in order to support the above client calls?
I'm porting Ogg Vorbis Player (which runs on Linux/UNIX) to RTEMS. At first I
think that it could be sth. like "source-code compatible" but in the real
it is not right?
Thank you for all answers,
Pattara
More information about the users
mailing list