Bug 74762

Summary: kdemultimedia 3.2.0 doesn't compile with alsa 1.0
Product: kscd Reporter: Egmont Koblinger <egmont>
Component: generalAssignee: Multimedia Developers <kde-multimedia>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch against 3.2.1

Description Egmont Koblinger 2004-02-09 21:24:06 UTC
Version:           3.2.0 (using KDE KDE 3.2.0)
Installed from:    Compiled From Sources
Compiler:          gcc 3.3.2 
OS:          Linux

The configure script of kdemultimedia 3.2.0 looks for alsa 0.5 and 0.9,
but not for 1.0. If I patch the configure script to detect alsa 1.0 as well
(it worked for kde 3.1.5), then compiling fails with this:

audio_alsa.c: In function `set_hwparams':
audio_alsa.c:70: warning: passing arg 3 of `snd_pcm_hw_params_set_rate_near' makes pointer from integer without a cast
audio_alsa.c:80: warning: passing arg 3 of `snd_pcm_hw_params_set_buffer_time_near' makes pointer from integer without a cast
audio_alsa.c:85: error: too few arguments to function `snd_pcm_hw_params_get_buffer_size'
audio_alsa.c:90: warning: passing arg 3 of `snd_pcm_hw_params_set_period_time_near' makes pointer from integer without a cast
audio_alsa.c:95: warning: passing arg 2 of `snd_pcm_hw_params_get_period_size' from incompatible pointer type
audio_alsa.c:95: error: too few arguments to function `snd_pcm_hw_params_get_period_size'
Comment 1 Philip Nelson 2004-03-16 02:04:40 UTC
Created attachment 5231 [details]
Patch against 3.2.1 

This is the first time ever I have submitted a patch for any open source
project, so please deal kindly with me !!!  I've not even done any C for about
6 years, and then only a two week course which I've not used since !!!
This bug report is for an identical problem in 3.2.0.  
The ALSA PCM API has changed from ALSA 0.9.x to 1.0.x (I have alsalib 1.0.3b).
The latest kernel (2.6.4) uses ALSA 1.0, and so this module fails to compile.
I discovered the header file alsa/version.h, which has SND_LIB_MAJOR defined.
So I use #if, #else, #endif processing to do different things for the two
API formats.
If there is anything I've not done properly, or you want to get me to rework
anything then you can email me on teamdba@scotdb.com
Comment 2 Aaron J. Seigo 2004-03-29 02:15:37 UTC
gah.. this is kscd, not kscreensaver. =P
Comment 3 Alex Kern 2004-03-29 21:47:40 UTC
is already in CVS, please test if you use new ALSA
Comment 4 Alex Kern 2004-07-30 17:59:32 UTC
*** Bug has been marked as fixed ***.