* alsa-lib & oss 1.0.3rc1
@ 2004-02-21 22:05 Jaroslav Kysela
2004-02-24 16:59 ` Will
2004-02-26 0:06 ` Michel Dänzer
0 siblings, 2 replies; 18+ messages in thread
From: Jaroslav Kysela @ 2004-02-21 22:05 UTC (permalink / raw)
To: ALSA development
Hello all,
I am trying to fix resampling problems in alsa-lib and OSS
emulation problems in alsa-oss package. I released first preview of my
changes. It would be nice, if you can test my changes and report me bugs
or comments (especially to the new OSS redirector code).
Changes:
- alsa-lib
- recoded pcm_rate plugin to resample whole periods (click and
rounding problem elimination)
- fixed pcm_file plugin
- alsa-oss
- mangle power of two period/buffer settings to more benevolent
ALSA parameters -> dmix plugin should work with more programs
now
- created OSS redirector library (libossredir) which can help
to redirect OSS API based applications to virtualy any dynamic
library (see alsa-oss/oss-redir/README)
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
@ 2004-02-23 21:43 Pawel Rozanski
0 siblings, 0 replies; 18+ messages in thread
From: Pawel Rozanski @ 2004-02-23 21:43 UTC (permalink / raw)
To: ALSA development
Jaroslav Kysela wrote:
>
> changes. It would be nice, if you can test my changes and report me bugs
> or comments (especially to the new OSS redirector code).
>
I couldn't find, so i'll ask. Are there any tests for alsa and friends?
I upgraded to 1.0.3rc1 and it works almost well with my via82xx. Of
course I can't run quake3 with it but this will be bug report (but i
don't have time right now to make a good one).
Tests, not only as "this will compile". But for eg sine generator or
some sort of sounds to test sampling rates, dxs....
I think this would be good help for tests. Now I can say frozen-bubble
works ok, but I can hear clicks in wesnoth (both are SDL based games).
thanks for all your work,
Pawel Rozanski
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-21 22:05 Jaroslav Kysela
@ 2004-02-24 16:59 ` Will
2004-02-25 11:05 ` Jaroslav Kysela
2004-02-26 0:06 ` Michel Dänzer
1 sibling, 1 reply; 18+ messages in thread
From: Will @ 2004-02-24 16:59 UTC (permalink / raw)
To: perex; +Cc: alsa-devel
Jaroslav Kysela <perex@suse.cz> wrote:
>
>changes. It would be nice, if you can test my changes and report me bugs
>or comments (especially to the new OSS redirector code).
>
What do you think of my bug report on ALSA OSS emulation of /dev/sequencer?
I posted it at http://bugtrack.alsa-project.org/alsa-bug/bug_view_advanced_page.php?bug_id=28 but there haven't been any followup posts.
The /dev/sequencer part of the OSS emulation is really very broken.
Do you think it's something you can easily fix?
I find everything except /dev/sequencer is now working well in
the OSS emulation. I'd like to stop using the old OSS sound drivers
but I need a working /dev/sequencer
William
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-24 16:59 ` Will
@ 2004-02-25 11:05 ` Jaroslav Kysela
2004-02-25 13:40 ` Will
0 siblings, 1 reply; 18+ messages in thread
From: Jaroslav Kysela @ 2004-02-25 11:05 UTC (permalink / raw)
To: Will; +Cc: alsa-devel
On Tue, 24 Feb 2004, Will wrote:
> Jaroslav Kysela <perex@suse.cz> wrote:
> >
> >changes. It would be nice, if you can test my changes and report me bugs
> >or comments (especially to the new OSS redirector code).
> >
>
> What do you think of my bug report on ALSA OSS emulation of
> /dev/sequencer? I posted it at
> http://bugtrack.alsa-project.org/alsa-bug/bug_view_advanced_page.php?bug_id=28
> but there haven't been any followup posts. The /dev/sequencer part of
> the OSS emulation is really very broken. Do you think it's something you
> can easily fix?
Well, it's question if it's worth to take care. I think that we have far
more better applications using directly ALSA sequencer API.
But if you send me a small code which shows the bug - like in
alsa-driver/test/seq1.c etc, then I will try to fix it.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-25 11:05 ` Jaroslav Kysela
@ 2004-02-25 13:40 ` Will
0 siblings, 0 replies; 18+ messages in thread
From: Will @ 2004-02-25 13:40 UTC (permalink / raw)
To: perex; +Cc: alsa-devel
Jaroslav Kysela wrote:
>> Will wrote:
>> the OSS emulation is really very broken. Do you think it's something you
>> can easily fix?
>
>Well, it's question if it's worth to take care. I think that we have far
>more better applications using directly ALSA sequencer API.
Yes, you're right. The new ALSA sequencer clients are better.
The only reason I want the OSS /dev/sequencer is to be able to use the
Rosegarden OSS sequencer client because it's less crash-prone
than any other sequencer client which also has notation editing.
>But if you send me a small code which shows the bug - like in
>alsa-driver/test/seq1.c etc, then I will try to fix it.
Thank you. I'll try writing a short OSS /dev/sequencer test at the weekend.
William
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-21 22:05 Jaroslav Kysela
2004-02-24 16:59 ` Will
@ 2004-02-26 0:06 ` Michel Dänzer
2004-02-26 10:30 ` Jaroslav Kysela
1 sibling, 1 reply; 18+ messages in thread
From: Michel Dänzer @ 2004-02-26 0:06 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: ALSA development
On Sat, 2004-02-21 at 23:05, Jaroslav Kysela wrote:
>
> I am trying to fix resampling problems in alsa-lib and OSS
> emulation problems in alsa-oss package. I released first preview of my
> changes. It would be nice, if you can test my changes and report me bugs
> or comments (especially to the new OSS redirector code).
Haven't gotten around to trying that yet, but alsa-oss no longer works
here (1.0.2 works):
> LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so bzflag
zsh: segmentation fault
LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so bzflag
> LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so gdb bzflag
zsh: segmentation fault
LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so gdb bzflag
> LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so catchsegv
bzflag
zsh: segmentation fault
LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so catchsegv
bzflag
How can I debug this?
--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-26 0:06 ` Michel Dänzer
@ 2004-02-26 10:30 ` Jaroslav Kysela
2004-02-26 14:13 ` Michel Dänzer
0 siblings, 1 reply; 18+ messages in thread
From: Jaroslav Kysela @ 2004-02-26 10:30 UTC (permalink / raw)
To: Michel Dänzer; +Cc: ALSA development
On Thu, 26 Feb 2004, Michel Dänzer wrote:
> On Sat, 2004-02-21 at 23:05, Jaroslav Kysela wrote:
> >
> > I am trying to fix resampling problems in alsa-lib and OSS
> > emulation problems in alsa-oss package. I released first preview of my
> > changes. It would be nice, if you can test my changes and report me bugs
> > or comments (especially to the new OSS redirector code).
>
> Haven't gotten around to trying that yet, but alsa-oss no longer works
> here (1.0.2 works):
>
> > LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so bzflag
> zsh: segmentation fault
> LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so bzflag
> > LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so gdb bzflag
> zsh: segmentation fault
> LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so gdb bzflag
> > LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so catchsegv
> bzflag
> zsh: segmentation fault
> LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so catchsegv
> bzflag
>
>
> How can I debug this?
Define this:
export ALSA_OSS_DEBUG=1
and run the application again.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-26 14:13 ` Michel Dänzer
@ 2004-02-26 14:10 ` Jaroslav Kysela
2004-02-26 14:30 ` Michel Dänzer
0 siblings, 1 reply; 18+ messages in thread
From: Jaroslav Kysela @ 2004-02-26 14:10 UTC (permalink / raw)
To: Michel Dänzer; +Cc: ALSA development
On Thu, 26 Feb 2004, Michel Dänzer wrote:
> On Thu, 2004-02-26 at 11:30, Jaroslav Kysela wrote:
> > On Thu, 26 Feb 2004, Michel Dänzer wrote:
> >
> > > > LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so bzflag
> > > zsh: segmentation fault
>
> [...]
>
> > > How can I debug this?
> >
> > Define this:
> >
> > export ALSA_OSS_DEBUG=1
> >
> > and run the application again.
>
> No more information unfortunately:
>
> > ALSA_OSS_DEBUG=1
> LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so bzflag
> zsh: segmentation fault ALSA_OSS_DEBUG=1
> LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so
>
> This is on PPC, could it be an endianness or similar portability
> problem?
I don't know. Can you try with the mpg123 program? It works on x86.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-26 10:30 ` Jaroslav Kysela
@ 2004-02-26 14:13 ` Michel Dänzer
2004-02-26 14:10 ` Jaroslav Kysela
0 siblings, 1 reply; 18+ messages in thread
From: Michel Dänzer @ 2004-02-26 14:13 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: ALSA development
On Thu, 2004-02-26 at 11:30, Jaroslav Kysela wrote:
> On Thu, 26 Feb 2004, Michel Dänzer wrote:
>
> > > LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so bzflag
> > zsh: segmentation fault
[...]
> > How can I debug this?
>
> Define this:
>
> export ALSA_OSS_DEBUG=1
>
> and run the application again.
No more information unfortunately:
> ALSA_OSS_DEBUG=1
LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so bzflag
zsh: segmentation fault ALSA_OSS_DEBUG=1
LD_PRELOAD=~/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so
This is on PPC, could it be an endianness or similar portability
problem?
--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-26 14:10 ` Jaroslav Kysela
@ 2004-02-26 14:30 ` Michel Dänzer
2004-02-26 14:33 ` Jaroslav Kysela
2004-02-26 15:55 ` Sergey Vlasov
0 siblings, 2 replies; 18+ messages in thread
From: Michel Dänzer @ 2004-02-26 14:30 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: ALSA development
On Thu, 2004-02-26 at 15:10, Jaroslav Kysela wrote:
>
> Can you try with the mpg123 program? It works on x86.
It can successfully print the usage info, but also crashes when trying
to actually play a file. Note that even gdb crashes on startup, so the
problem seems completely unrelated to sound?
--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-26 14:30 ` Michel Dänzer
@ 2004-02-26 14:33 ` Jaroslav Kysela
2004-02-26 17:53 ` Michel Dänzer
2004-02-26 15:55 ` Sergey Vlasov
1 sibling, 1 reply; 18+ messages in thread
From: Jaroslav Kysela @ 2004-02-26 14:33 UTC (permalink / raw)
To: Michel Dänzer; +Cc: ALSA development
On Thu, 26 Feb 2004, Michel Dänzer wrote:
> On Thu, 2004-02-26 at 15:10, Jaroslav Kysela wrote:
> >
> > Can you try with the mpg123 program? It works on x86.
>
> It can successfully print the usage info, but also crashes when trying
> to actually play a file. Note that even gdb crashes on startup, so the
> problem seems completely unrelated to sound?
It looks that the wrapper code does not work as expected.
Can you add a printf calls to all public functions in
the alsa-oss/alsa/alsa-oss.c code, so we can determine
where the code hangs?
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-26 14:30 ` Michel Dänzer
2004-02-26 14:33 ` Jaroslav Kysela
@ 2004-02-26 15:55 ` Sergey Vlasov
2004-02-26 17:56 ` Michel Dänzer
1 sibling, 1 reply; 18+ messages in thread
From: Sergey Vlasov @ 2004-02-26 15:55 UTC (permalink / raw)
To: ALSA development
[-- Attachment #1: Type: text/plain, Size: 693 bytes --]
On Thu, Feb 26, 2004 at 03:30:04PM +0100, Michel D?nzer wrote:
> On Thu, 2004-02-26 at 15:10, Jaroslav Kysela wrote:
> >
> > Can you try with the mpg123 program? It works on x86.
>
> It can successfully print the usage info, but also crashes when trying
> to actually play a file. Note that even gdb crashes on startup, so the
> problem seems completely unrelated to sound?
You can try this:
$ gdb mpg123
(gdb) set args xxx.mp3
(gdb) set env LD_PRELOAD /home/user/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so
(gdb) run
This way LD_PRELOAD will be set only for the debugged process, and not for
the debugger itself - hopefully the debugger will not crash and will
provide some useful info.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-26 14:33 ` Jaroslav Kysela
@ 2004-02-26 17:53 ` Michel Dänzer
2004-02-26 18:38 ` Jaroslav Kysela
0 siblings, 1 reply; 18+ messages in thread
From: Michel Dänzer @ 2004-02-26 17:53 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: ALSA development
On Thu, 2004-02-26 at 15:33, Jaroslav Kysela wrote:
>
> It looks that the wrapper code does not work as expected.
> Can you add a printf calls to all public functions in
> the alsa-oss/alsa/alsa-oss.c code, so we can determine
> where the code hangs?
The problem occurs when the ALSA_OSS_WRAPPER environment variable isn't
set. initialize() returns early, so the public functions segfault when
they try to dereference the uninitialized fds.
Is there a reason why ALSA_OSS_WRAPPER must be set? Even if so, I think
it should cope more gracefully otherwise. :)
--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-26 15:55 ` Sergey Vlasov
@ 2004-02-26 17:56 ` Michel Dänzer
0 siblings, 0 replies; 18+ messages in thread
From: Michel Dänzer @ 2004-02-26 17:56 UTC (permalink / raw)
To: Sergey Vlasov; +Cc: ALSA development
On Thu, 2004-02-26 at 16:55, Sergey Vlasov wrote:
>
> $ gdb mpg123
> (gdb) set args xxx.mp3
Or gdb --args mpg123 xxx.mp3 ;)
> (gdb) set env LD_PRELOAD /home/user/src/alsa-cvs/alsa-oss/alsa/.libs/libaoss.so
> (gdb) run
>
> This way LD_PRELOAD will be set only for the debugged process, and not for
> the debugger itself - hopefully the debugger will not crash and will
> provide some useful info.
Indeed, thanks. I've actually used something like this before, but I was
in such a hurry that I didn't think of it.
--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-26 17:53 ` Michel Dänzer
@ 2004-02-26 18:38 ` Jaroslav Kysela
2004-02-27 12:38 ` Michel Dänzer
0 siblings, 1 reply; 18+ messages in thread
From: Jaroslav Kysela @ 2004-02-26 18:38 UTC (permalink / raw)
To: Michel Dänzer; +Cc: ALSA development
On Thu, 26 Feb 2004, Michel Dänzer wrote:
> On Thu, 2004-02-26 at 15:33, Jaroslav Kysela wrote:
> >
> > It looks that the wrapper code does not work as expected.
> > Can you add a printf calls to all public functions in
> > the alsa-oss/alsa/alsa-oss.c code, so we can determine
> > where the code hangs?
>
> The problem occurs when the ALSA_OSS_WRAPPER environment variable isn't
> set. initialize() returns early, so the public functions segfault when
> they try to dereference the uninitialized fds.
>
> Is there a reason why ALSA_OSS_WRAPPER must be set? Even if so, I think
> it should cope more gracefully otherwise. :)
No reason. I ommited to remove this hack when I separated the wrapper
code from the API emulation code. You can remove the lines without any
side effect. I also found next problems in the emulation code, so
I will release rc3 of alsa-oss package.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-26 18:38 ` Jaroslav Kysela
@ 2004-02-27 12:38 ` Michel Dänzer
2004-02-27 13:49 ` Adam Tla/lka
0 siblings, 1 reply; 18+ messages in thread
From: Michel Dänzer @ 2004-02-27 12:38 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: ALSA development
[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]
On Thu, 2004-02-26 at 19:38, Jaroslav Kysela wrote:
> On Thu, 26 Feb 2004, Michel Dänzer wrote:
>
> > The problem occurs when the ALSA_OSS_WRAPPER environment variable isn't
> > set. initialize() returns early, so the public functions segfault when
> > they try to dereference the uninitialized fds.
> >
> > Is there a reason why ALSA_OSS_WRAPPER must be set? Even if so, I think
> > it should cope more gracefully otherwise. :)
>
> No reason. I ommited to remove this hack when I separated the wrapper
> code from the API emulation code. You can remove the lines without any
> side effect.
Okay, thanks.
Unfortunately, bzflag now fails doing
ioctl(5, SNDCTL_DSP_SETFRAGMENT, 0x7ffff308[4000c])
even with the attached patch, which used to be enough to get it working.
Adam's ('small and cosmetic'??? :) patch doesn't help either.
Luckily, bzflag is switching to SDL...
--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer
[-- Attachment #2: local.diff --]
[-- Type: text/x-patch, Size: 688 bytes --]
? build-arch-stamp
? debian
? local.diff
Index: alsa/pcm.c
===================================================================
RCS file: /cvsroot/alsa/alsa-oss/alsa/pcm.c,v
retrieving revision 1.9
diff -p -u -r1.9 pcm.c
--- alsa/pcm.c 26 Feb 2004 15:31:46 -0000 1.9
+++ alsa/pcm.c 27 Feb 2004 12:13:33 -0000
@@ -261,7 +261,9 @@ static int oss_dsp_hw_params(oss_dsp_t *
if (err < 0)
return err;
if (dsp->maxfrags > 0) {
- unsigned int periods_max = dsp->maxfrags;
+ unsigned int periods_max = periods_min > dsp->maxfrags
+ ? periods_min
+ : dsp->maxfrags;
err = snd_pcm_hw_params_set_periods_max(pcm, hw,
&periods_max, 0);
if (err < 0)
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-27 12:38 ` Michel Dänzer
@ 2004-02-27 13:49 ` Adam Tla/lka
2004-02-27 14:18 ` Adam Tla/lka
0 siblings, 1 reply; 18+ messages in thread
From: Adam Tla/lka @ 2004-02-27 13:49 UTC (permalink / raw)
To: alsa-devel
On Fri, Feb 27, 2004 at 01:38:16PM +0100, Michel Dänzer wrote:
> ioctl(5, SNDCTL_DSP_SETFRAGMENT, 0x7ffff308[4000c])
>
> even with the attached patch, which used to be enough to get it working.
> Adam's ('small and cosmetic'??? :) patch doesn't help either.
with this patch I could use Quake3, java -jar JavaSoundDemo.jar,
RealPlayer, FlashPlayer under mozilla and java sounds in browser
simultaniously, and xmms too (non mmap mode), and of course ALSA native
apps which are using default redefined mixing plugin.
Bad news - some apps probably clear environment or discards LD_PRELOAD
so they try get to the hardware anyway even using open call.
I observed this with mpg321 and mplayer -ao oss option.
So is why I still propose mixing in kernel - besides filtering every
open, close, write, read and other important calls with LD_PRELOAD
approach means slowdown of apps and potential security risk.
Someone could change preloaded lib to some sniffing/filtering worm.
So generally using LD_PRELOAD should be discarded.
Some of apps are closed source so we just couldn't rewrite them
with AOSS stub code or port to ALSA api.
So kernel is the only sensible solution IMHO ;-).
Back to bzflag. I will be investigating that. I think that something
is still broken in parameters refining. So theoretically you could
set sound parameters in any order and time, but it isn't quite true.
In some cases refining process returns error while in case of another
order of setting sound parameters all is ok.
I mean that it should be tested on more OSS apps because different
order of emulated OSS ioctls may product different behaviour.
PS.
mpg321 is not working anyway because I have Intel codec fixed
to 48kHz and it wants DMA mode and 44100Hz (rate plugin in OSS emulation
doesn't supports this).
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
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: alsa-lib & oss 1.0.3rc1
2004-02-27 13:49 ` Adam Tla/lka
@ 2004-02-27 14:18 ` Adam Tla/lka
0 siblings, 0 replies; 18+ messages in thread
From: Adam Tla/lka @ 2004-02-27 14:18 UTC (permalink / raw)
To: alsa-devel
On Fri, Feb 27, 2004 at 02:49:42PM +0100, Adam Tla/lka wrote:
> Back to bzflag. I will be investigating that.
If you debug aoss ioctl call you find that fragshift is set to 12
and maxfrags to 4. I must read the doc and find what is proper but
maybe there is some parameter mistake.
If you swap the parameters then sound is working.
Change in /usr/src/alsa-20040226/alsa-oss/alsa/pcm.c:
case SNDCTL_DSP_SETFRAGMENT:
{
DEBUG("SNDCTL_DSP_SETFRAGMENT, %p[%x])\n", arg, *(int *)arg);
dsp->fragshift = ((*(int *)arg) >> 16) & 0xffff;
DEBUG("IN: fragshift=%d,", dsp->fragshift);
if (dsp->fragshift < 2)
dsp->fragshift = 2;
dsp->maxfrags = *(int *)arg & 0xffff;
DEBUG(" maxfrags=%d\n", dsp->maxfrags);
if (dsp->maxfrags < dsp->fragshift)
dsp->maxfrags = dsp->fragshift << 1;
DEBUG("OUT: fragshift=%d, maxfrags=%d\n",
dsp->fragshift,
dsp->maxfrags);
err = oss_dsp_params(dsp);
break;
}
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
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2004-02-27 14:18 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-23 21:43 alsa-lib & oss 1.0.3rc1 Pawel Rozanski
-- strict thread matches above, loose matches on Subject: below --
2004-02-21 22:05 Jaroslav Kysela
2004-02-24 16:59 ` Will
2004-02-25 11:05 ` Jaroslav Kysela
2004-02-25 13:40 ` Will
2004-02-26 0:06 ` Michel Dänzer
2004-02-26 10:30 ` Jaroslav Kysela
2004-02-26 14:13 ` Michel Dänzer
2004-02-26 14:10 ` Jaroslav Kysela
2004-02-26 14:30 ` Michel Dänzer
2004-02-26 14:33 ` Jaroslav Kysela
2004-02-26 17:53 ` Michel Dänzer
2004-02-26 18:38 ` Jaroslav Kysela
2004-02-27 12:38 ` Michel Dänzer
2004-02-27 13:49 ` Adam Tla/lka
2004-02-27 14:18 ` Adam Tla/lka
2004-02-26 15:55 ` Sergey Vlasov
2004-02-26 17:56 ` Michel Dänzer
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.