From: "Adam Tlałka" <atlka@pg.gda.pl>
To: Paul Davis <paul@linuxaudiosystems.com>,
alsa-devel@lists.sourceforge.net
Subject: Re: Re: [Alsa-user] AD1985 full-duplex(?)
Date: Tue, 28 Sep 2004 15:22:35 +0200 [thread overview]
Message-ID: <4159659B.2020702@pg.gda.pl> (raw)
In-Reply-To: <200409281113.i8SBDo5U021462@localhost.localdomain>
>>>you're simply wrong about this. if an interrupt is blocked for longer
>>>than the buffer size, GETOPTR can't help you.
>>
>>It depends of kernel driver behaviour. If it could not detect this
>>situaction then of course no. But this is easy to detect just by
>>monitoring actual system time and amount of data send to/received from
>>device. We know what should be the proper value.
>>Anyway if this situaction occurs how ALSA driver detects it?
>>hw_ptr is not moved and appl_ptr too so how ALSA is doing that?
>
> thats my whole point. the facilities offered by OSS to track this
> stuff all presuppose that this kind of disaster can't happen, but it
> *does* happen. ALSA obviously cannot do any better in that situation,
> but it has an infrastructure in place that doesn't make the assumption
> that things just work. It would be easy to get ALSA to indicate an
> xrun in the above situation; it would be quite hard to get OSS to do
> so.
So ALSA is not any better in that situaction ;-(. Talking about OSS
if we modify the driver so it detects hardware xruns it can report them
in a same manner as software ones. For example GETOPTR bytes value
should return count of bytes which would be processed by a device
if there was no xrun. hw_ptr will be unchanged. So we can correct our
sample position because we know the delay and the hw_ptr.
I think that the problem is not in the API but in the kernel driver.
It should detect this situaction - both ALSA and OSS driver.
> anyway, we're way off topic here. the essential issue is that you want
> an API that allows for large buffers but also lets you overwrite stuff
> you have written in the past, in order to offer the illusion of low
> latency without impacting CPU load too much. by contrast, the
> pro-audio/music world wants small buffer sizes to reduce latency
> because we do everything in real time. the consumer audio world wants
> virtual devices with various specific capabilities that hide the
> complexity of the underlying hardware. the kernel developers don't
> want emulators, sample rate converters and so on in the kernel.
Yes and almost all of this problems could be solved by mixing
this kernel/userspace approach. A kernel module emulating /dev access
and ioctl's communicating with RT daemon which is doing real job
and contacting with physical device.
/dev access is needed for compability and access granting (chmod and
ACL's) and also simple cat file.wav > /dev/dsp possibilities,
OSS apps also need that
more sophisticated apps can talk directly to the daemon and through it
to the hw device
>
> in the windows world, the two outlined goals are viewed as orthogonal,
> and nobody uses the same audio driver API to achieve them. that maybe
> changing with WDM, but at least until recently, the pro-audio world
> focused on ASIO which no games use; games used directX, which almost
> no audio apps did.
Linux is not only for pro-audio world I think. And placeing something in
kernel (ALSA drivers I mean) should not break existing normal apps.
> and anyway, i am not really sure what you want. ALSA lets you do what
> you want but at the cost of having to make a few more function calls
> to cover the handling of virtual devices. you don't like the cost,
current ALSA could not meet my requirements because of
swapping/scheduling effects which makes distorted sound in normal non RT
apps. Doing just a few more calls doesn't help in this case ;-[.
> you'd rather move the cost so that its in the
> kernel or a library rather than be in your code. that's the best i can
> understand so far.
Yes - that's the point. Common operations like format changeing,
resampling, remixing and additional effects should be done
in one place not in every app by itself.
I want to have possibility of doing cat file.wav > /dev/dsp
and play it with 5.1 or 2 speakers or with headphones with special
stereo effects applied just by one click or keypress on special mixer
app on the fly without restarting anything and fiddling with config
files and program execution arguments.
Current ALSA design is not user friendly and rather not meets these end
user requirements. May be it should be only for audio profs?
Regards
--
Adam Tla/lka mailto:atlka@pg.gda.pl ^v^ ^v^ ^v^
System & Network Administration Group ~~~~~~
Computer Center, Gdansk University of Technology, Poland
PGP public key: finger atlka@sunrise.pg.gda.pl
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
next parent reply other threads:[~2004-09-28 13:22 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200409281113.i8SBDo5U021462@localhost.localdomain>
2004-09-28 13:22 ` Adam Tlałka [this message]
2004-09-28 14:48 ` Re: [Alsa-user] AD1985 full-duplex(?) Jaroslav Kysela
2004-09-28 14:57 ` Paul Davis
2004-09-28 15:21 ` Takashi Iwai
2004-09-29 6:15 ` Adam Tlałka
2004-08-31 8:52 Peter Zubaj
2004-08-31 9:39 ` Jaroslav Kysela
2004-09-06 20:45 ` Adam Tla/lka
2004-09-07 9:05 ` Jaroslav Kysela
2004-09-07 10:34 ` Adam Tla/lka
2004-09-07 13:23 ` Paul Davis
2004-09-07 13:40 ` Jaroslav Kysela
2004-09-08 17:15 ` Adam Tla/lka
[not found] ` <20040909122253.GE4584@sunrise.pg.gda.pl>
[not found] ` <Pine.LNX.4.58.0409091728420.4150@server.perex-int.cz>
2004-09-10 6:46 ` Adam Tla/lka
2004-09-09 5:52 ` Adam Tla/lka
2004-09-09 12:59 ` Paul Davis
2004-09-09 13:28 ` Adam Tla/lka
2004-09-09 15:14 ` Jaroslav Kysela
2004-09-10 7:16 ` Adam Tla/lka
2004-09-10 11:44 ` Paul Davis
2004-09-10 19:04 ` Adam Tla/lka
2004-09-13 13:05 ` Paul Davis
2004-09-13 17:24 ` Adam Tla/lka
2004-09-26 22:21 ` Adam Tlałka
2004-09-27 3:00 ` Paul Davis
2004-09-27 6:38 ` Adam Tlałka
2004-09-27 12:43 ` Jaroslav Kysela
2004-09-28 5:11 ` Adam Tlałka
2004-09-28 14:47 ` Paul Davis
2004-09-29 5:51 ` Adam Tlałka
2004-09-27 20:14 ` Paul Davis
2004-09-28 6:10 ` Adam Tlałka
[not found] <Pine.HPX.4.33n.0408181538550.24798-100000@studcom.urz.uni-halle.de>
[not found] ` <1092842830.13603.3.camel@localhost.localdomain>
[not found] ` <20040818181350.2b38e875@mango.fruits.de>
2004-08-18 17:37 ` Jaroslav Kysela
2004-08-18 18:15 ` Florian Schmidt
2004-08-19 8:58 ` Jaroslav Kysela
2004-08-19 9:46 ` Takashi Iwai
2004-08-19 10:28 ` Jaroslav Kysela
2004-08-23 11:36 ` Adam Tlałka
2004-08-23 11:54 ` Jaroslav Kysela
2004-08-23 12:34 ` Adam Tlałka
2004-08-23 14:39 ` Jaroslav Kysela
2004-08-24 6:01 ` Adam Tla/lka
2004-08-23 15:30 ` Takashi Iwai
2004-08-28 19:10 ` Adam Tlałka
2004-08-29 9:54 ` Jaroslav Kysela
2004-08-29 18:35 ` Adam Tlałka
2004-08-31 8:09 ` Jaroslav Kysela
2004-08-19 9:48 ` Florian Schmidt
2004-08-20 10:58 ` Jaroslav Kysela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4159659B.2020702@pg.gda.pl \
--to=atlka@pg.gda.pl \
--cc=alsa-devel@lists.sourceforge.net \
--cc=paul@linuxaudiosystems.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.