[alsa-cvslog] CVS: alsa-driver/pci/ac97 ac97_proc.patch,NONE,1.1 .cvsignore,1.2,1.3 ac97_proc.c,1.1,NONE

2004-04-20 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-driver/pci/ac97
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26173

Modified Files:
.cvsignore 
Added Files:
ac97_proc.patch 
Removed Files:
ac97_proc.c 
Log Message:
make ac97_proc.patch for disabling register write code for 2.2 kernels.
(2.2 kernels don't have sscanf).



--- NEW FILE: ac97_proc.patch ---
--- ac97_proc.c 2004-04-16 20:16:21.0 +0200
+++ ac97_proc.c 2004-04-20 12:09:36.014644842 +0200
@@ -1,3 +1,4 @@
+#define __NO_VERSION__
 /*
  *  Copyright (c) by Jaroslav Kysela [EMAIL PROTECTED]
  *  Universal interface for Audio Codec '97
@@ -27,8 +28,8 @@
 #include sound/core.h
 #include sound/ac97_codec.h
 #include sound/asoundef.h
-#include ac97_local.h
-#include ac97_id.h
+#include ../../alsa-kernel/pci/ac97/ac97_local.h
+#include ../../alsa-kernel/pci/ac97/ac97_id.h
 
 /*
  * proc interface
@@ -321,6 +322,7 @@
}
 }
 
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 4, 0)
 #ifdef CONFIG_SND_DEBUG
 /* direct register write for debugging */
 static void snd_ac97_proc_regs_write(snd_info_entry_t *entry, snd_info_buffer_t 
*buffer)
@@ -337,6 +339,7 @@
}
 }
 #endif
+#endif
 
 static void snd_ac97_proc_regs_read_main(ac97_t *ac97, snd_info_buffer_t * buffer, 
int subidx)
 {
@@ -393,11 +396,13 @@
sprintf(name, %s#%d-%d+regs, prefix, ac97-addr, ac97-num);
if ((entry = snd_info_create_card_entry(ac97-bus-card, name, 
ac97-bus-proc)) != NULL) {
snd_info_set_text_ops(entry, ac97, 1024, snd_ac97_proc_regs_read);
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 4, 0)
 #ifdef CONFIG_SND_DEBUG
entry-mode |= S_IWUSR;
entry-c.text.write_size = 1024;
entry-c.text.write = snd_ac97_proc_regs_write;
 #endif
+#endif
if (snd_info_register(entry)  0) {
snd_info_free_entry(entry);
entry = NULL;

Index: .cvsignore
===
RCS file: /cvsroot/alsa/alsa-driver/pci/ac97/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore  10 Nov 2003 17:32:40 -  1.2
+++ .cvsignore  20 Apr 2004 10:32:41 -  1.3
@@ -1,4 +1,5 @@
 .depend
+ac97_proc.c
 .*.cmd
 *.ko
 *.mod.c

--- ac97_proc.c DELETED ---



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-lib/src/instr iwffff.c,1.22,1.23

2004-04-20 Thread Jaroslav Kysela
Update of /cvsroot/alsa/alsa-lib/src/instr
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29021/src/instr

Modified Files:
iw.c 
Log Message:
Fixed bugs detected by Intel compiler

Index: iw.c
===
RCS file: /cvsroot/alsa/alsa-lib/src/instr/iw.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- iw.c15 Nov 2002 14:40:26 -  1.22
+++ iw.c20 Apr 2004 13:42:48 -  1.23
@@ -638,10 +638,10 @@
gwave-format |= IW_WAVE_ROM;
gwave-address.memory = snd_LE_to_host_32(*(((unsigned 
int *)wave) + 8/4));
} else {
-   gwave-share_id[1] = iwf-share_id1;
-   gwave-share_id[2] = iwf-share_id2;
-   gwave-share_id[3] = iwf-share_id3;
-   gwave-share_id[4] = snd_LE_to_host_32(*(((unsigned 
int *)wave) + 8/4));
+   gwave-share_id[0] = iwf-share_id1;
+   gwave-share_id[1] = iwf-share_id2;
+   gwave-share_id[2] = iwf-share_id3;
+   gwave-share_id[3] = snd_LE_to_host_32(*(((unsigned 
int *)wave) + 8/4));
result = load_iw_wave(iwf, gwave-share_id[2], 
gwave-size, gwave-address.ptr);
if (result  0) {
free_wave(gwave);
@@ -874,10 +874,10 @@
xwave = (iw_xwave_t *)ptr;
ptr += sizeof(*xwave);
xwave-stype = IW_STRU_WAVE;
+   xwave-share_id[0] = __cpu_to_le32(wave-share_id[0]);
xwave-share_id[1] = __cpu_to_le32(wave-share_id[1]);
xwave-share_id[2] = __cpu_to_le32(wave-share_id[2]);
xwave-share_id[3] = __cpu_to_le32(wave-share_id[3]);
-   xwave-share_id[4] = __cpu_to_le32(wave-share_id[4]);
xwave-format = __cpu_to_le32(wave-format);
xwave-size = __cpu_to_le32(wave-size);
xwave-start = __cpu_to_le32(wave-start);



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-lib/src/pcm pcm.c,1.284,1.285

2004-04-20 Thread Jaroslav Kysela
Update of /cvsroot/alsa/alsa-lib/src/pcm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29021/src/pcm

Modified Files:
pcm.c 
Log Message:
Fixed bugs detected by Intel compiler

Index: pcm.c
===
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm.c,v
retrieving revision 1.284
retrieving revision 1.285
diff -u -r1.284 -r1.285
--- pcm.c   15 Apr 2004 12:52:51 -  1.284
+++ pcm.c   20 Apr 2004 13:42:49 -  1.285
@@ -743,20 +743,20 @@
if (!pcm-setup)
return -EBADFD;
memset(params, 0, snd_pcm_hw_params_sizeof());
-   snd_mask_copy(params-masks[SND_PCM_HW_PARAM_ACCESS], (snd_mask_t 
*)pcm-access);
-   snd_mask_copy(params-masks[SND_PCM_HW_PARAM_FORMAT], (snd_mask_t 
*)pcm-format);
-   snd_mask_copy(params-masks[SND_PCM_HW_PARAM_SUBFORMAT], (snd_mask_t 
*)pcm-subformat);
+   snd_mask_copy(params-masks[SND_PCM_HW_PARAM_ACCESS - 
SNDRV_PCM_HW_PARAM_FIRST_MASK], (snd_mask_t *)pcm-access);
+   snd_mask_copy(params-masks[SND_PCM_HW_PARAM_FORMAT - 
SNDRV_PCM_HW_PARAM_FIRST_MASK], (snd_mask_t *)pcm-format);
+   snd_mask_copy(params-masks[SND_PCM_HW_PARAM_SUBFORMAT - 
SNDRV_PCM_HW_PARAM_FIRST_MASK], (snd_mask_t *)pcm-subformat);
frame_bits = snd_pcm_format_physical_width(pcm-format) * pcm-channels;
-   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_FRAME_BITS], 
frame_bits);
-   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_CHANNELS], 
pcm-channels);
-   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_RATE], pcm-rate);
-   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_PERIOD_TIME], 
pcm-period_time);
-   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_PERIOD_SIZE], 
pcm-period_size);
-   snd_interval_copy(params-intervals[SND_PCM_HW_PARAM_PERIODS], pcm-periods);
-   snd_interval_copy(params-intervals[SND_PCM_HW_PARAM_BUFFER_TIME], 
pcm-buffer_time);
-   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_BUFFER_SIZE], 
pcm-buffer_size);
-   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_BUFFER_BYTES], 
(pcm-buffer_size * frame_bits) / 8);
-   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_TICK_TIME], 
pcm-tick_time);
+   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_FRAME_BITS - 
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], frame_bits);
+   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_CHANNELS - 
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm-channels);
+   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_RATE - 
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm-rate);
+   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_PERIOD_TIME - 
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm-period_time);
+   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_PERIOD_SIZE - 
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm-period_size);
+   snd_interval_copy(params-intervals[SND_PCM_HW_PARAM_PERIODS - 
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm-periods);
+   snd_interval_copy(params-intervals[SND_PCM_HW_PARAM_BUFFER_TIME - 
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm-buffer_time);
+   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_BUFFER_SIZE - 
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm-buffer_size);
+   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_BUFFER_BYTES - 
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], (pcm-buffer_size * frame_bits) / 8);
+   snd_interval_set_value(params-intervals[SND_PCM_HW_PARAM_TICK_TIME - 
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm-tick_time);
params-info = pcm-info;
params-msbits = pcm-msbits;
params-rate_num = pcm-rate_num;
@@ -1814,7 +1814,7 @@
  */
 snd_pcm_t *snd_async_handler_get_pcm(snd_async_handler_t *handler)
 {
-   assert(handler-type = SND_ASYNC_HANDLER_PCM);
+   assert(handler-type == SND_ASYNC_HANDLER_PCM);
return handler-u.pcm;
 }
 



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog