FreeBSD+Audiophile 2496 -> No sound in SDL: "Couldn't set audio blocking mode"

Hi list,

I’ve got the same configuration and problem as this
guy here:
http://www.4front-tech.com/forum/viewtopic.php?t=698

Does someone know a solution here? I am not running
artsd (btw: artsd runs nicely)

I’ve already tried different SDL_DSP_AUDIODRIVER
settings.
But using ‘dma’ produces somewhat like
’DMA memory map failed’.

TIA and Regards,
Uri___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

Uri Pui wrote:

Hi list,

I’ve got the same configuration and problem as this
guy here:
http://www.4front-tech.com/forum/viewtopic.php?t=698

Does someone know a solution here? I am not running
artsd (btw: artsd runs nicely)

I’ve already tried different SDL_DSP_AUDIODRIVER
settings.
But using ‘dma’ produces somewhat like
’DMA memory map failed’.

What version of SDL are you using ?

Stephane

Stephane Marchesin <stephane.marchesin at wanadoo.fr>
wrote:

What version of SDL are you using ?

I am using SDL 1.2.9 from the sources.
The CVS version doesn’t compile on my machine as it
says that it cannot find
’install-sh’ when executing ‘./configure’. And
executing ‘make’ without
’./configure’ before produces many, many errors.

Regards,
Uri___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

Uri Pui wrote:

Stephane Marchesin <@Stephane_Marchesin>
wrote:

What version of SDL are you using ?

I am using SDL 1.2.9 from the sources.
The CVS version doesn’t compile on my machine as it
says that it cannot find
’install-sh’ when executing ‘./configure’. And
executing ‘make’ without
’./configure’ before produces many, many errors.

Try reverting to SDL 1.2.7. The SDL_DSP_NOSELECT will work again, try it.

More precisely, this commit breaks OSS for a number of people (including
myself) :
http://www.libsdl.org/cgi/cvsweb.cgi/SDL12/src/audio/dsp/SDL_dspaudio.c.diff?r1=1.13&r2=1.14

Stephane

Try reverting to SDL 1.2.7. The SDL_DSP_NOSELECT will work again, try it.

More precisely, this commit breaks OSS for a number of people (including
myself) :
http://www.libsdl.org/cgi/cvsweb.cgi/SDL12/src/audio/dsp/SDL_dspaudio.c.diff?r1=1.13&r2=1.14

Hannu, who provided the patch, that he would handle any bug reports relating
to this commit. I forwarded the issue to him at hannu at opensound.com

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Sam Lantinga wrote:

Try reverting to SDL 1.2.7. The SDL_DSP_NOSELECT will work again, try it.

More precisely, this commit breaks OSS for a number of people (including
myself) :
http://www.libsdl.org/cgi/cvsweb.cgi/SDL12/src/audio/dsp/SDL_dspaudio.c.diff?r1=1.13&r2=1.14

Hannu, who provided the patch, that he would handle any bug reports relating
to this commit. I forwarded the issue to him at hannu at opensound.com

Well, he didn’t answer last time. To be honest, I’m not sure whether an
OSS guy will help people getting it to work with the alsa driver in OSS
emulation mode…

Stephane

Well, he didn’t answer last time. To be honest, I’m not sure whether an
OSS guy will help people getting it to work with the alsa driver in OSS
emulation mode…

This might be a silly question, but is there any reason to use OSS
emulation in ALSA when you can just use ALSA directly?

–ryan.

Ryan C. Gordon wrote:

Well, he didn’t answer last time. To be honest, I’m not sure whether
an OSS guy will help people getting it to work with the alsa driver
in OSS emulation mode…

This might be a silly question, but is there any reason to use OSS
emulation in ALSA when you can just use ALSA directly?

Because ALSA itself doesn’t work either. I’m not sure if it’s an Alsa or
an SDL bug, however.

Stephane

Because ALSA itself doesn’t work either. I’m not sure if it’s an Alsa or
an SDL bug, however.

What exactly is wrong with the ALSA output? I use it myself…

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Because ALSA itself doesn’t work either. I’m not sure if it’s an
Alsa or

an SDL bug, however.

What exactly is wrong with the ALSA output? I use it myself…

“Me too.”

(Actuall, I don’t have any properly working OSS emulation installed,
so it’s my only option right now.)

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --'On Friday 27 January 2006 19:39, Sam Lantinga wrote:

Sam Lantinga wrote:

Because ALSA itself doesn’t work either. I’m not sure if it’s an Alsa or
an SDL bug, however.

What exactly is wrong with the ALSA output? I use it myself…

I think my alsa driver is buggy. It has always been like that, and I
think that’s the case for many AC’97 owners.

Stephane

Hello !

I think my alsa driver is buggy. It has always been like that, and I
think that’s the case for many AC’97 owners.

Jup. I used AC97 before getting my new Soundblaster,
and it worked with the OSS Emulation from ALSA,
but not ALSA directly. Not working means here producing
strange output.

CU

Uri Pui wrote:

Stephane Marchesin <@Stephane_Marchesin>
wrote:

What version of SDL are you using ?

I am using SDL 1.2.9 from the sources.
The CVS version doesn’t compile on my machine as it
says that it cannot find
’install-sh’ when executing ‘./configure’. And
executing ‘make’ without
’./configure’ before produces many, many errors.

Does the attached patch work for you ? It fixes SDL audio with the OSS
Alsa emulation for me, at least (other ac97 owners will probably be
interested in it, too).

Stephane

-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL-oss-alsa-fix.patch
Type: text/x-patch
Size: 1841 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060128/4c109576/attachment.bin

Does the attached patch work for you ? It fixes SDL audio with the OSS
Alsa emulation for me, at least (other ac97 owners will probably be
interested in it, too).

What’s the bug that this is fixing? Is it that the write is non-blocking
and dropping data? Is it that the write is allowing too much data into the
pipeline?

See ya,
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Sam Lantinga wrote:

Does the attached patch work for you ? It fixes SDL audio with the OSS
Alsa emulation for me, at least (other ac97 owners will probably be
interested in it, too).

What’s the bug that this is fixing? Is it that the write is non-blocking
and dropping data? Is it that the write is allowing too much data into the
pipeline?

Yes, I think his problem is that since he’s in non blocking mode, too
much data can get in at once. My problem is that the Alsa/OSS blocking
mode doesn’t work right (and how it works is unclear even in the ac97
spec given there are a lot of hardware configuration modes). In both
cases, adding sync code is the right thing to do.

Stephane

Yes, I think his problem is that since he’s in non blocking mode, too
much data can get in at once. My problem is that the Alsa/OSS blocking
mode doesn’t work right (and how it works is unclear even in the ac97
spec given there are a lot of hardware configuration modes). In both
cases, adding sync code is the right thing to do.

What’s the audible result? If it’s just lots of latency, this could be
either the driver not properly blocking or too large of an ALSA mixing
buffer. If it’s dropped audio or low level static, it could be that the
kernel driver is not correctly resetting the blocking write flag.

The fixed delay you’re adding will not work correctly on older kernels
where the minimum delay is 10ms.

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Sam Lantinga wrote:

Yes, I think his problem is that since he’s in non blocking mode, too
much data can get in at once. My problem is that the Alsa/OSS blocking
mode doesn’t work right (and how it works is unclear even in the ac97
spec given there are a lot of hardware configuration modes). In both
cases, adding sync code is the right thing to do.

What’s the audible result? If it’s just lots of latency, this could be
either the driver not properly blocking or too large of an ALSA mixing
buffer. If it’s dropped audio or low level static, it could be that the
kernel driver is not correctly resetting the blocking write flag.

It’s quite strange. The sound is constantly cracking (maybe 4 times a
second) and goes forward/backwards by small (<0.2s I’d say) steps. Maybe
I should record it because it’s not easy to describe.
The issue with my driver is really a hardware issue : ac97 seems to be a
stupid spec.

The fixed delay you’re adding will not work correctly on older kernels
where the minimum delay is 10ms.

We could raise the delay, but 10 ms already matches the standard 100HZ
for 2.2 and 2.4 kernels. Btw, I’m using a 2.6 kernel with HZ changed to
100 and it works fine.

Stephane