From: Steve Schmidtke <steve_schmidtke@ho...> - 2003-10-05 20:22:22
<P>>Since hostaudio can be also a module, it's useful to specify the host dsp and </P>
<P>>mixer position even on module loading. So I've added two params with </P></DIV>
<DIV></DIV>>descriptions for this. The patch is straightforward and non-intrusive, so
<DIV></DIV>>please apply it.
<P>This could be abused to allow reading and writing arbitrary files on the host by loading the module with parameters within the UML.</P>
<P>>By the way: while testing it(I repeated this with an unpatched UML kernel) </P>
<DIV></DIV>>with mpg123, I discovered that it crackles horribly and plays very
<DIV></DIV>>slowly(i.e. a second of music lasts even two or more ones). Will this ever be
<P>>solved? Is this problem specific to me or general?</P>
<P>I think it's due to the dsp device being opened in blocking mode and the UML pauses while the audio data gets written out. There is no support for async IO in the driver, so turning on O_NONBLOCK on the host file open, might speed up the app, but likely result in choppy output, and/or confuse the app with EAGAIN errors.</P>
<P>The answer to this is to rewrite the driver as a virtual sound card with async IO. I may do this at some point, if no one is willing to take on the challenge.</P>
<P>Steve Schmidtke</P></div><br clear=all><hr>STOP MORE SPAM with <a href="http://g.msn.com/8HMBENCA/2728??PS=">the new MSN 8 </a> and get 2 months FREE* </html>
Alle 22:20, domenica 5 ottobre 2003, Steve Schmidtke ha scritto:
[Don't bother me for the Uml. the message I'm answering to was in HTML and my
mailer didn't strip tags. It's not my fault]
> <html><div style='background-color:'><DIV>
> <P>>Since hostaudio can be also a module, it's useful to specify the
> host dsp and </P> <P>>mixer position even on module loading. So I've
> added two params with </P></DIV> <DIV></DIV>>descriptions for this. The
> patch is straightforward and non-intrusive, so <DIV></DIV>>please apply
> <P>This could be abused to allow reading and writing arbitrary files on the
> host by loading the module with parameters within the UML.
But if the host hasn't DevFS, the paths are wrong, so the hostaudio won't work
as a module. A solution is needed(not compiling it as a module is fine, but
it's a workaround).
So, I could move the uml_setup strings out of hostaudio_kern.c, so that the
boot time params are always read(and conditionalize them to the fact that
CONFIG_HOSTAUDIO or whatever is set to at least M, if possible). Then both if
hostaudio is a module and if if is statically linked, it will read the
For hostfs, which could have the same problem if modularized, the problem
doesn't happen because it can't be a module. Or maybe, on module loading the
uml_setup parameters should be considered anyway(this is a general solution,
and maybe hard, but is not a bad idea).
However, if the driver works for arbitrary file, wouldn't it be easy to use it
for Unix socket forwarding(in the V1-needs list, on the site)?
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
Get latest updates about Open Source Projects, Conferences and News.