[Alsa-devel] aplay crash in alsa-*-0.9.0beta12

2002-03-11 Thread Markus Schoder

Hi!

I experienced crashes with aplay from alsa-*-0.9.0beta12 when playing a
.wav file.  I tracked it down to the snd_pcm_plugin_write_areas
function in pcm/pcm_plugin.c of libasound.

The result variable in the loop can get larger than size.  It is
subtracted from size but since size is unsigned it will wrap
around to an insanely high value and either loop forever or
eventually crash.

The reason for this behaviour seems to be that slave_frames can get
bigger than frames due to some resampling being done in the function
snd_pcm_rate_expand in pcm/pcm_rate.c.

I patched the snd_pcm_plugin_write_areas function by not allowing more
than frames to be subtracted from size.  This fixed the crash but I am
now experiencing some garbage being played at the end of the .wav.

Any ideas?

--
Markus

___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



[Alsa-devel] cmipci random noise + Makefile patch

2002-05-26 Thread Markus Schoder

When playing .wav files with aplay sometimes random noise is appended to the 
actual sample.  It does not happen with e.g. playwave which uses OSS 
emulation.  I think this never worked correctly with the cmipci driver.

Another problem I see is that with the current CVS alsa drivers (2002-05-25) I 
get the following message when doing a depmod -ae

depmod: *** Unresolved symbols in 
/lib/modules/2.4.19-pre8-ac5/kernel/drivers/sound/alsa/snd-seq-midi.o
depmod: snd_midi_event_decode
depmod: snd_midi_event_free
depmod: snd_midi_event_new
depmod: snd_midi_event_encode
depmod: snd_midi_event_reset_decode

The following patch solved it for me


--- alsa/alsa-kernel/core/seq/Makefile.old  Fri May 24 20:56:10 2002
+++ alsa/alsa-kernel/core/seq/Makefile  Sat May 25 21:28:21 2002
@@ -34,7 +34,9 @@
 snd-seq-virmidi-objs := seq_virmidi.o
 
 obj-$(CONFIG_SND_SEQUENCER) += snd-seq.o snd-seq-device.o
-obj-$(CONFIG_SND_SEQUENCER_OSS) += snd-seq-midi-event.o
+ifeq ($(CONFIG_SND_SEQUENCER_OSS),y)
+obj-$(CONFIG_SND_SEQUENCER) += snd-seq-midi-event.o
+endif
 obj-$(CONFIG_SND_SEQ_DUMMY) += snd-seq-dummy.o
 
 # Toplevel Module Dependency


--
Markus


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel