* write/read system calls and ioctl
@ 2007-12-19 17:56 Michael Voigt
2007-12-21 12:45 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Michael Voigt @ 2007-12-19 17:56 UTC (permalink / raw)
To: alsa-devel
Dear ALSA developers,
At the beginning, I would like to give a short introdution of myself, then my
question follows.
My project:
===============
Currently, I am interning at the TU Dresden operating
systems group's [1] and it is my task to port ALSA to DROPS [2, 3], a
L4-microkernel-based real-time system. The long-term goal of this
project should be to establish a truely real-time capable FOSS platform
for audio recording and processing.
The current state of the project: By using DDELinux [4] and writing a small
kernel-user inferface emulation layer, we now have an unchanged version of
ALSA and an unchanged version of salsa-lib [5] running on our system. The
next steps will be to test how stable this port is and fix bugs. Then, during
my diploma thesis, it is my task to port Jack (or an equivalent) to our
system and to evaluate how to make the whole thing to work in real-time.
But now my question:
===============
In the file pcm_native in alsa-core read (snd_pcm_read) and write
(snd_pcm_write) functions are attached to the snd_pcm_f_ops. But as far
as I can see, these write- und read- system calls aren't used either in
salsa-lib or in alsa-lib.
I can see that in former versions of alsa-lib (for instance alsalib-0.0.3) the
write system call was used to implement snd_pcm_write (LIB); but now we have
snd_pcm_writei (LIB) and snd_pcm_writen (LIB) which use ioctl. I guess this
was done to realize both interleaved and noninterleaved audio playback (The
old snd_pcm_write (LIB) was based on bytes not on frames and did not have a
notion of interleaved/noninterleaved playback?). If I have a look at
snd_pcm_write (KERNEL, pcm_native.c), I can see it also ends up in
snd_pcm_lib_write(...). So does ioctl with SNDRV_PCM_IOCTL_WRITEI_FRAMES as
argument, but snd_pcm_write (KERNEL) does not copy the frames to kernel
memory.
My question: what is snd_pcm_write in pcm_native.c good for? Is it only there
to keep ALSA compatible to older versions of alsa-lib?
Kindest regards,
Michael Voigt
================
[1] http://www.inf.tu-dresden.de/index.php?node_id=1141&ln=en
[2] http://www.osnews.com/story.php/15814/Introduction-to-TUD-OS/
[3]
http://www.realtimelinuxfoundation.org/variants/variants.html#VARIANTS_DROPS
[4] http://demo.tudos.org/dsweeper_tutorial.html
[5] http://ftp.isr.ist.utl.pt/pub/MIRRORS/ftp.suse.com/people/tiwai/salsa-lib/
================
--
Today is Pungenday, the 61st day of The Aftermath in the YOLD 3173
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: write/read system calls and ioctl
2007-12-19 17:56 write/read system calls and ioctl Michael Voigt
@ 2007-12-21 12:45 ` Takashi Iwai
2007-12-22 12:12 ` Michael Voigt
0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2007-12-21 12:45 UTC (permalink / raw)
To: Michael Voigt; +Cc: alsa-devel
At Wed, 19 Dec 2007 18:56:17 +0100,
Michael Voigt wrote:
>
> My question: what is snd_pcm_write in pcm_native.c good for? Is it only there
> to keep ALSA compatible to older versions of alsa-lib?
Yes, exactly. Some apps (e.g. older version of sox) used directly
read/write, and this is also for them.
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: write/read system calls and ioctl
2007-12-21 12:45 ` Takashi Iwai
@ 2007-12-22 12:12 ` Michael Voigt
0 siblings, 0 replies; 4+ messages in thread
From: Michael Voigt @ 2007-12-22 12:12 UTC (permalink / raw)
To: alsa-devel
Thanks a lot, Takashi!
Am Freitag 21 Dezember 2007 13:45:20 schrieb Takashi Iwai:
> At Wed, 19 Dec 2007 18:56:17 +0100,
>
> Michael Voigt wrote:
> > My question: what is snd_pcm_write in pcm_native.c good for? Is it only
> > there to keep ALSA compatible to older versions of alsa-lib?
>
> Yes, exactly. Some apps (e.g. older version of sox) used directly
> read/write, and this is also for them.
>
>
> Takashi
--
Today is Sweetmorn, the 64th day of The Aftermath in the YOLD 3173
^ permalink raw reply [flat|nested] 4+ messages in thread
* write/read system calls and ioctl
@ 2007-12-20 19:37 Michael Voigt
0 siblings, 0 replies; 4+ messages in thread
From: Michael Voigt @ 2007-12-20 19:37 UTC (permalink / raw)
To: alsa-devel
Dear ALSA developers,
At the beginning, I would like to give a short introdution of myself, then my
question follows.
My project:
===============
Currently, I am interning at the TU Dresden operating
systems group's [1] and it is my task to port ALSA to DROPS [2, 3], a
L4-microkernel-based real-time system. The long-term goal of this
project should be to establish a truely real-time capable FOSS platform
for audio recording and processing.
The current state of the project: By using DDELinux [4] and writing a small
kernel-user inferface emulation layer, we now have an unchanged version of
ALSA and an unchanged version of salsa-lib [5] running on our system. The
next steps will be to test how stable this port is and fix bugs. Then, during
my diploma thesis, it is my task to port Jack (or an equivalent) to our
system and to evaluate how to make the whole thing to work in real-time.
But now my question:
===============
In the file pcm_native in alsa-core read (snd_pcm_read) and write
(snd_pcm_write) functions are attached to the snd_pcm_f_ops. But as far
as I can see, these write- und read- system calls aren't used either in
salsa-lib or in alsa-lib.
I can see that in former versions of alsa-lib (for instance alsalib-0.0.3) the
write system call was used to implement snd_pcm_write (LIB); but now we have
snd_pcm_writei (LIB) and snd_pcm_writen (LIB) which use ioctl. I guess this
was done to realize both interleaved and noninterleaved audio playback (The
old snd_pcm_write (LIB) was based on bytes not on frames and did not have a
notion of interleaved/noninterleaved playback?). If I have a look at
snd_pcm_write (KERNEL, pcm_native.c), I can see it also ends up in
snd_pcm_lib_write(...). So does ioctl with SNDRV_PCM_IOCTL_WRITEI_FRAMES as
argument, but snd_pcm_write (KERNEL) does not copy the frames to kernel
memory.
My question: what is snd_pcm_write in pcm_native.c good for? Is it only there
to keep ALSA compatible to older versions of alsa-lib?
Kindest regards,
Michael Voigt
================
[1] http://www.inf.tu-dresden.de/index.php?node_id=1141&ln=en
[2] http://www.osnews.com/story.php/15814/Introduction-to-TUD-OS/
[3]
http://www.realtimelinuxfoundation.org/variants/variants.html#VARIANTS_DROPS
[4] http://demo.tudos.org/dsweeper_tutorial.html
[5] http://ftp.isr.ist.utl.pt/pub/MIRRORS/ftp.suse.com/people/tiwai/salsa-lib/
================
--
Today is Pungenday, the 61st day of The Aftermath in the YOLD 3173
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-12-22 12:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-19 17:56 write/read system calls and ioctl Michael Voigt
2007-12-21 12:45 ` Takashi Iwai
2007-12-22 12:12 ` Michael Voigt
-- strict thread matches above, loose matches on Subject: below --
2007-12-20 19:37 Michael Voigt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox