[SDL] SDL ALSA on arm (with uclibc)

Aviv Laufer aviv at notalvision.com
Wed Aug 1 07:41:08 PDT 2007


 More info
frames = SDL_NAME(snd_pcm_hw_params_set_period_size_near)(pcm_handle,
hwparams, frames, NULL);
should be changed into status =
SDL_NAME(snd_pcm_hw_params_set_period_size_near)(pcm_handle, hwparams,
frames, NULL);
Now there is a seg fault at SDL_OpenAudio 
/* See if we need to do any conversion */
	if ( obtained != NULL ) {
		SDL_memcpy(obtained, &audio->spec, sizeof(audio->spec));
}
Aviv
-----Original Message-----
From: sdl-bounces at lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of Aviv Laufer
Sent: Wednesday, 01 August, 2007 15:38
To: 'A list for developers using the SDL library. (includes SDL-announce)'
Subject: Re: [SDL] SDL ALSA on arm (with uclibc)

More info
Alsa is 1.0.14a
In SDL_alsa_audio.c
static unsigned int (*SDL_NAME(snd_pcm_hw_params_set_rate_near))(snd_pcm_t
*pcm, snd_pcm_hw_params_t *params, unsigned int val, int *dir); static
snd_pcm_uframes_t
(*SDL_NAME(snd_pcm_hw_params_set_period_size_near))(snd_pcm_t *pcm,
snd_pcm_hw_params_t *params, snd_pcm_uframes_t val, int *dir); static
unsigned int (*SDL_NAME(snd_pcm_hw_params_set_periods_near))(snd_pcm_t *pcm,
snd_pcm_hw_params_t *params, unsigned int val, int *dir); The val param
should be by reference &val.
After I fixed it there are no more crashes. However I still can not play any
music, there are problems in both hw and sw parameter setup.
I'll try to look into it however I very new to alsa programming.
Aviv

-----Original Message-----
From: sdl-bounces at lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of Sam Lantinga
Sent: Tuesday, 31 July, 2007 19:15
To: A list for developers using the SDL library. (includes SDL-announce)
Subject: Re: [SDL] SDL ALSA on arm (with uclibc)

> Hi,
> I have build SDL with uclibc and alsa enables on an arm device (pxa270).
> SDL video is working great . However when I try to run the loopwav 
> sample I get a seg fault (attached strace log).

Any chance of a stack trace?  Or failing that, you can sprinkle print
statements in SDL audio code until you figure out where it's crashing...

See ya!
	-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment
_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




More information about the SDL mailing list