fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Possible freeze in delete_fluid_alsa_audio_driver()


From: David Henningsson
Subject: Re: [fluid-dev] Possible freeze in delete_fluid_alsa_audio_driver()
Date: Thu, 04 Nov 2010 05:05:14 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

On 2010-11-03 15:15, Sven Meier wrote:
Hi Pedro,

thanks for your tips on pulseaudio.

Regarding the freeze, I was able to narrow down the problem.

If the following prerequesites are met:
- Jack is running,
- Fluidsynth is explicitely started with -a alsa
Then the call to snd_pcm_writei() in fluid_alsa.c (line #511) fails to
return on the 178th invocation - strange!
The reported freeze on delete_fluid_alsa_audio_driver() is just an
aftereffect :(.

Seems this isn't a Fluidsynth problem after all.

There was a report recently on the alsa-devel and pulseaudio-discuss mailinglists about snd_pcm_writei not returning after a pause (when used with the pulse plugin). Perhaps this is the same bug or a related one.

Can anyone give me an advice where to address this problem?

A simplified way of doing the same as Pedro suggests is to set the option audio.alsa.device to plughw:CARDNAME, where CARDNAME is the name of your card as listed in /proc/asound/cards. That bypasses pulseaudio, grabs exclusive access of the hardware, which gives better performance (i e lower latencies) as well.


Thanks

Sven


On 11/03/2010 06:32 AM, Pedro Lopez-Cabanillas wrote:
On Tuesday 02 November 2010, Sven Meier wrote:
Hi all,

I'm experiencing a strange freeze in delete_fluid_alsa_audio_driver():

0x9da58ae5 fluid_thread_join + 0x1d
0x9da4d388 delete_fluid_alsa_audio_driver + 0x47
0x9da81c74 delete_fluid_audio_driver + 0x59

The attempt to join the (synthesizer?) thread never returns (line #332):

dev->cont = 0;
if (dev->thread)
fluid_thread_join (dev->thread); /* never returns */

To trigger this issue the following prerequisites have to be met:
- Jack is running
- a fluidsynth instance is created with "audio.driver" explicitely set
to "alsa".
- finally the fluidsynth instance is deleted.

I've just double checked by starting fluidsynth from the command line
and this seems to expose the same issue:

$ fluidsynth -a alsa
FluidSynth version 1.1.3
....
fluidsynth: debug: Using 'alsa' audio driver
fluidsynth: debug: Using 'alsa_seq' midi driver
Type 'help' for help topics.
....
> quit
cheers!
<nothing happens after cheers>

BTW I'm using the latest fluidsynth from SVN.

Any ideas?
I can confirm the freeze when PulseAudio is also running. Jack typically
doesn't use PulseAudio. When I run fluidsynth using an ALSA hw device the
freeze doesn't happen. For instance:

$ fluidsynth -a alsa -o audio.alsa.device=hw:0,0

Note that many cheap audio interfaces don't allow two programs opening
the
same hw device at the same time.

When you don't tell an explicit device, ALSA uses "default" which is
routed to
the PulseAudio plugin if you have it installed. You can verify this in
your
"/etc/asound-pulse.conf" or "/etc/asound.conf". To defeat this setting
for
your own account, you can create a file at your $HOME named
".asoundrc" with a
content like this one:

pcm.!default {
type hw
card 0
}

ctl.!default {
type hw
card 0
}

Anyway, the freeze requires more investigation before deciding if it
is a bug
in ALSA, PulseAudio, or FluidSynth.

Regards,
Pedro

_______________________________________________
fluid-dev mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/fluid-dev


_______________________________________________
fluid-dev mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/fluid-dev





reply via email to

[Prev in Thread] Current Thread [Next in Thread]