Discussion:
ALSA sound support
Jay Dolan
2006-01-08 23:22:09 UTC
Permalink
Date: Sun, 8 Jan 2006 15:20:08 -0800 (PST)
From: Jay Dolan
Subject: ALSA sound support
To: quake2 at icculus.org
Hi,
I hack on Quake2Forge from time to time. I noticed
that their partial ALSA driver implementation was
based on yours, and so I figured you may also
benefit
http://jdolan.dyndns.org/jaydolan/tmp/snd_alsa.c
It's basically a rewrite. This is also available in
quake2forge svn. I should mention that I do see
xruns
if I choose to add a print warning around line 221.
However, playback is quite smooth.
Regards,
Pardon the forward. I sent this before I'd confirmed
to the list.



Jay Dolan
Software Engineer, Systems Analyst
Windmill Cycles, Inc.
508.999.4000



__________________________________________
Yahoo! DSL ? Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
Jamie Wilkinson
2006-01-09 06:56:22 UTC
Permalink
Date: Sun, 8 Jan 2006 15:20:08 -0800 (PST)
From: Jay Dolan
Subject: ALSA sound support
To: quake2 at icculus.org
Hi,
I hack on Quake2Forge from time to time. I noticed
that their partial ALSA driver implementation was
based on yours, and so I figured you may also
benefit
Based on!? I'm pretty sure icculus quake2 took it from q2f! :)
http://jdolan.dyndns.org/jaydolan/tmp/snd_alsa.c
It's basically a rewrite. This is also available in
quake2forge svn. I should mention that I do see
xruns
if I choose to add a print warning around line 221.
However, playback is quite smooth.
Awesome :)
Jay Dolan
2006-01-09 14:37:16 UTC
Permalink
Post by Jamie Wilkinson
Based on!? I'm pretty sure icculus quake2 took it
from q2f! :)
Oh, I thought it was the other way around after
reading q2f's svn log - my bad. Either way, both
projects can have working alsa support now :)


Jay Dolan
Software Engineer, Systems Analyst
Windmill Cycles, Inc.
508.999.4000



__________________________________________
Yahoo! DSL ? Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
O.Sezer
2006-01-09 14:49:32 UTC
Permalink
Jay Dolan wrote:
[...]
Post by Jay Dolan
reading q2f's svn log - my bad. Either way, both
Out of curiosity, where is the qf/q2f svn (and/or cvs)
repository? Links on the www.quakeforge.net page are
broken and I thought that that project was dead.

Ozkan
Jamie Wilkinson
2006-01-10 00:14:37 UTC
Permalink
Post by Jay Dolan
Post by Jamie Wilkinson
Based on!? I'm pretty sure icculus quake2 took it
from q2f! :)
Oh, I thought it was the other way around after
reading q2f's svn log - my bad. Either way, both
projects can have working alsa support now :)
Now you've got me worried I've taken credit for someone else's work :) ...
It was a long time ago...
Brendan Burns
2006-01-10 02:31:16 UTC
Permalink
Hey folks,
The modified snd_alsa.c is now in icculus CVS. It seems to work. I
modified set_period_size to set_period_size_near, since set_period_size
failed on my machine. I also seem to have some chattering/delays on my
machine when a lot of different sounds are going off, but I think that
they're driver issues rather than problems in q2. If someone else who's
tracking CVS could check out and test the ALSA sound, that'd be great!

(and once again for the record, the original q2 snd_alsa.c was derived
from the quakeforge sources)

--brendan
Post by Jamie Wilkinson
Post by Jay Dolan
Post by Jamie Wilkinson
Based on!? I'm pretty sure icculus quake2 took it
from q2f! :)
Oh, I thought it was the other way around after
reading q2f's svn log - my bad. Either way, both
projects can have working alsa support now :)
Now you've got me worried I've taken credit for someone else's work :) ...
It was a long time ago...
Jay Dolan
2006-01-09 14:52:49 UTC
Permalink
Post by O.Sezer
Out of curiosity, where is the qf/q2f svn (and/or
cvs)
repository? Links on the www.quakeforge.net page
are
broken and I thought that that project was dead.
Yea, I think it is, too - I just don't know when to
quit ;)

svn://taniwha.org/quake2/trunk


Jay Dolan
Software Engineer, Systems Analyst
Windmill Cycles, Inc.
508.999.4000



__________________________________________
Yahoo! DSL ? Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
Brendan Burns
2006-01-09 15:30:03 UTC
Permalink
Thanks for the fix! I'll get it into CVS.

And yes, the icculus alsa code is pretty much directly lifted from quake
forge.
--brendan
Post by Jay Dolan
Post by O.Sezer
Out of curiosity, where is the qf/q2f svn (and/or
cvs)
repository? Links on the www.quakeforge.net page
are
broken and I thought that that project was dead.
Yea, I think it is, too - I just don't know when to
quit ;)
svn://taniwha.org/quake2/trunk
Jay Dolan
Software Engineer, Systems Analyst
Windmill Cycles, Inc.
508.999.4000
__________________________________________
Yahoo! DSL ? Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
Jamie Wilkinson
2006-01-10 00:19:04 UTC
Permalink
Post by Jay Dolan
Post by O.Sezer
Out of curiosity, where is the qf/q2f svn (and/or
cvs)
repository? Links on the www.quakeforge.net page
are
broken and I thought that that project was dead.
q2f pretty much; I lost time to work on it, and there were far more
contributors to icculus q2 that it seemed a waste of effort to duplicate it.

I dunno about the rest of the project; my company hosts the site and mailing lists but no-one's ever contacted me about getting access to them :)
Post by Jay Dolan
Yea, I think it is, too - I just don't know when to
quit ;)
svn://taniwha.org/quake2/trunk
Awesome, nonetheless. :)
Jay Dolan
2006-01-09 16:31:28 UTC
Permalink
Post by Brendan Burns
Thanks for the fix! I'll get it into CVS.
And yes, the icculus alsa code is pretty much
directly lifted from quake
forge.
--brendan
No problem. I committed several other changes prior
to the alsa driver fix yesterday. Fixes to mod
loading, sexed sound loading, timedemo, and netgraph.
Feel free to look at diffs for revisions: 11238,
11239, 11240, and 11241.

11238, I don't believe Icculus suffers from the mod
loading defficiency that was present in Q2F. However,
exporting QUAKE2_HOME to the environment, as seen in
the latter half of the diff, can make it easier for
new mods to perform file io in their respective homes.

11239, The sexed sound loading fix in snd_dma.c cures
a hiccup in gameplay experienced the first time a
per-model sound is resourced - particularly noticeable
on machines with slower hard drives (e.g. notebooks).
The changes to snd_alsa.c at this revision were not
yet complete.

11240, The fix to timedemo is probably valid because
enabling timedemo on a server crashes it within
seconds :) Timedemo is disabled in deathmatch, and
writeonly in dedicated mode.

11241, The netgraph changes are really just visual
enhancements requested on q2f bugzilla. Ditched the
gray background, shrank it to 24px high, and put it
behind the player stats. Also, draw the console after
netgraph since netgraph was breaking the console
transparency.

Hth,

Jay

Jay Dolan
Software Engineer, Systems Analyst
Windmill Cycles, Inc.
508.999.4000



__________________________________________
Yahoo! DSL ? Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
Jamie Wilkinson
2006-01-10 00:16:41 UTC
Permalink
Post by Jay Dolan
11238, I don't believe Icculus suffers from the mod
loading defficiency that was present in Q2F. However,
exporting QUAKE2_HOME to the environment, as seen in
the latter half of the diff, can make it easier for
new mods to perform file io in their respective homes.
This is due to the change in build architecture on q2f, IIRC (for better or
worse). icculus q2 stuck with id's build system.
Jay Dolan
2006-01-09 16:36:44 UTC
Permalink
Post by Jay Dolan
seconds :) Timedemo is disabled in deathmatch, and
writeonly in dedicated mode.
Er, make that readonly ;)

Jay Dolan
Software Engineer, Systems Analyst
Windmill Cycles, Inc.
508.999.4000



__________________________________________
Yahoo! DSL ? Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
Jay Dolan
2006-01-10 02:40:40 UTC
Permalink
Post by Brendan Burns
Hey folks,
The modified snd_alsa.c is now in icculus CVS. It
seems to work. I
modified set_period_size to set_period_size_near,
since set_period_size
failed on my machine. I also seem to have some
chattering/delays on my
machine when a lot of different sounds are going
off, but I think that
they're driver issues rather than problems in q2.
If someone else who's
tracking CVS could check out and test the ALSA
sound, that'd be great!
(and once again for the record, the original q2
snd_alsa.c was derived
from the quakeforge sources)
Chattering? Hm. I did notice some latency on my
machine (maybe 100ms), which could probably be tweaked
with different period and buffer settings in ALSA.
I'll forward any further improvements to this list.

Jay Dolan
Software Engineer, Systems Analyst
Windmill Cycles, Inc.
508.999.4000

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Jay Dolan
2006-01-14 00:58:11 UTC
Permalink
Hi,

There's a new snd_alsa.c in q2f svn (revision 11246),
or available here:
http://jdolan.dyndns.org/jaydolan/tmp/snd_alsa.c

Sound latency has been greatly reduced, and set_*_near
calls are now used to set hardware parameters for
cards that do not support the requested values.

Feel free to incorporate these fixes to Icculus Quake2.

Jay Dolan
Software Engineer, Systems Analyst
Windmill Cycles, Inc.
508.999.4000

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Jay Dolan
2006-01-31 20:11:43 UTC
Permalink
Hi,

Just browsing icculus cvs, I noticed I was credited as
"Jon Dolan." If someone would correct that, thanks.
Not a big deal..

Jay Dolan
Software Engineer, Systems Analyst
Windmill Cycles, Inc.
508.999.4000

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Brendan Burns
2006-02-01 14:36:53 UTC
Permalink
Sorry, sorry, sorry.
this has been fixed in CVS.
thanks
--brendan
Post by Jay Dolan
Hi,
Just browsing icculus cvs, I noticed I was credited as
"Jon Dolan." If someone would correct that, thanks.
Not a big deal..
Jay Dolan
Software Engineer, Systems Analyst
Windmill Cycles, Inc.
508.999.4000
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Loading...