[AD] Still on the Soundscape problem

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hi again to all.

I've put inportb() and outportb() back in the code, trying to find a better solution other than just using inp() and
outp(). I've tried to hack the detect_soundscape() function first, to ensure it initializes everything without
problems; so I added delays just before every call to inportb() and outportb(), but the problem is still there. I've
checked out that with or without delays it fails at the second inportb() call, i.e. on line 525... This seems to ensure
the need of a delay, as the first inportb() call on line 522 does not cause the function to fail. I tried rest() as
delay, with various values ranging 10-2000 (? as far as I know ports may need milliseconds to give an acknoledge, and
a value of 2000 was a hopeless attempt to make it to work), as well as simple for() loops, from 10 up to 35000
cycles... None of these methods worked; the detect_soundscape() function has always failed at its second inportb()
call on line 525.
May it be that we need a particular delay value, not more or less? I *really* doubt it. Now it would be great to
examine the assembly output difference of inp()-inportb() and outp()-outportb()... 

To Andy: the time critical delays you talked about are not responsible of the sound card detection... With my
system the card fails even to detect! So the problem is not there.
As for the change of 16 to 15 on line 580, I made it after having it working, but producing distorted sound. I then
looked at the interrupt handler, and the first thing I tried was to change this to 15, and all sounded good after the
modification. I changed it, as at a first look it seemed to me that doing a check for >16 within that context was
making it to wait an odd number of IRQs to swap the buffers, while with 15 it became even... I don't know the inners of
your work, but that was the first stupid thing I had in mind, and it was just a try... but it worked. So I assumed I was
right, but the final word is up to you of course!

Any more hints about the whole problem?

BTW, can gcc directly compile into assembly, and output .s files intead of .o? I think it should... I'll have to check
out the man pages

--
Angelo Mottola
a.mottola@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/