Re: [AD] ALSA and dmix - small fix |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sun, 2004-05-16 at 17:28, Julien Cugnière wrote:
> After tweaking the driver a bit, it turned out that after
> initialization, ALSA was on the state "SND_PCM_STATE_SUSPENDED". Adding
> "snd_pcm_start(pcm_handle)" in the initialization of the driver made
> it work perfectly. I attached the corresponding one-line patch. I'm no
> expert on ALSA, so whoever wrote the driver should check that this won't
> break anything... it however seems harmless enough!
>
> This patch isn't needed when ALSA isn't dmixed, but according to the
> docs, it might be. From what I gather, a dmixed ALSA is much stricter,
> and "incorrect" code that was tolerated before isn't anymore. This is
> why a lot of programs like KDE, xine and xmms needed to be updated
> before they would work with a dmixed ALSA.
>
> As KDE 3.2.2 works on a dmixed ALSA, I don't need arts anymore, and this
> is a very good thing :-).
Wow, that's great! Just tried it, and it works! :D Now I don't need Jack
anymore, just after i added it to the init script to start automatically
:P
Can you try if the attached alternative patch also fixes the problem, it
avoids an XRUN at startup.
[PS: Why didn't you post this before I wrote the Jack driver? :P]
--
Elias Pschernig <elias@xxxxxxxxxx>
Index: src/unix/alsa9.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/unix/alsa9.c,v
retrieving revision 1.6
diff -u -r1.6 alsa9.c
--- src/unix/alsa9.c 1 Mar 2004 13:13:31 -0000 1.6
+++ src/unix/alsa9.c 16 May 2004 16:14:08 -0000
@@ -428,7 +428,7 @@
}
ALSA9_CHECK(snd_pcm_poll_descriptors(pcm_handle, ufds, pdc));
- poll_next = 1;
+ poll_next = 0;
_mix_some_samples((unsigned long) alsa_bufdata, 0, alsa_signed);