[alsa-cvslog] CVS: alsa-kernel/core init.c,1.40,1.41

2003-10-24 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv13419/core

Modified Files:
init.c 
Log Message:
- fixed oops at resume.
- block also the non-blocking devices until the resume is finished.



Index: init.c
===
RCS file: /cvsroot/alsa/alsa-kernel/core/init.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- init.c  23 Oct 2003 14:34:52 -  1.40
+++ init.c  24 Oct 2003 13:43:59 -  1.41
@@ -679,6 +679,7 @@
 int snd_power_wait(snd_card_t *card, unsigned int power_state, struct file *file)
 {
wait_queue_t wait;
+   int result = 0;
 
/* fastpath */
if (snd_power_get_state(card) == power_state)
@@ -686,18 +687,24 @@
init_waitqueue_entry(&wait, current);
add_wait_queue(&card->power_sleep, &wait);
while (1) {
-   if (card->shutdown)
-   return -ENODEV;
-   if (snd_power_get_state(card) == power_state) {
-   remove_wait_queue(&card->power_sleep, &wait);
-   return 0;
+   if (card->shutdown) {
+   result = -ENODEV;
+   break;
}
-   if (file && (file->f_flags & O_NONBLOCK))
-   return -EAGAIN;
+   if (snd_power_get_state(card) == power_state)
+   break;
+#if 0 /* block all devices */
+   if (file && (file->f_flags & O_NONBLOCK)) {
+   result = -EAGAIN;
+   break;
+   }
+#endif
set_current_state(TASK_UNINTERRUPTIBLE);
snd_power_unlock(card);
schedule_timeout(30 * HZ);
snd_power_lock(card);
}
+   remove_wait_queue(&card->power_sleep, &wait);
+   return result;
 }
 #endif /* CONFIG_PM */



---
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-kernel/pci als4000.c,1.22,1.23 ens1370.c,1.52,1.53

2003-10-24 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-kernel/pci
In directory sc8-pr-cvs1:/tmp/cvs-serv13252/pci

Modified Files:
als4000.c ens1370.c 
Log Message:
added auto-detection of joystick port.


Index: als4000.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/als4000.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- als4000.c   14 Oct 2003 13:59:20 -  1.22
+++ als4000.c   24 Oct 2003 13:42:41 -  1.23
@@ -652,9 +652,18 @@
 
/* disable all legacy ISA stuff except for joystick */
 #ifdef SUPPORT_JOYSTICK
-   if (joystick_port[dev] > 0 &&
-   (acard->res_joystick = request_region(joystick_port[dev], 8, "ALS4000 
gameport")) != NULL)
+   if (joystick_port[dev] == 1) {
+   /* auto-detect */
+   long p;
+   for (p = 0x200; p <= 0x218; p += 8)
+   if ((acard->res_joystick = request_region(p, 8, "ALS4000 
gameport")) != NULL)
+   break;
+   } else if (joystick_port[dev] > 0)
+   acard->res_joystick = request_region(joystick_port[dev], 8, "ALS4000 
gameport");
+   if (acard->res_joystick)
joystick = joystick_port[dev];
+   else
+   joystick = 0;
 #endif
snd_als4000_set_addr(gcr, 0, 0, 0, joystick);


Index: ens1370.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/ens1370.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- ens1370.c   23 Oct 2003 14:34:52 -  1.52
+++ ens1370.c   24 Oct 2003 13:42:41 -  1.53
@@ -1685,11 +1685,24 @@
 #ifdef SUPPORT_JOYSTICK
 static int snd_ensoniq_joystick(ensoniq_t *ensoniq, long port)
 {
-   ensoniq->gameport.io = port;
-   if (!request_region(ensoniq->gameport.io, 8, "ens137x: gameport")) {
-   snd_printk("gameport io port 0x%03x in use", ensoniq->gameport.io);
-   return -EBUSY;
+#ifdef CHIP1371
+   if (port == 1) { /* auto-detect */
+   for (port = 0x200; port <= 0x218; port += 8)
+   if (request_region(port, 8, "ens137x: gameport"))
+   break;
+   if (port > 0x218) {
+   snd_printk("no gameport available\n");
+   return -EBUSY;
+   }
+   } else
+#endif
+   {
+   if (!request_region(port, 8, "ens137x: gameport")) {
+   snd_printk("gameport io port 0x%03x in use", 
ensoniq->gameport.io);
+   return -EBUSY;
+   }
}
+   ensoniq->gameport.io = port;
ensoniq->ctrl |= ES_JYSTK_EN;
 #ifdef CHIP1371
ensoniq->ctrl &= ~ES_1371_JOY_ASELM;
@@ -2251,6 +2264,7 @@
 #ifdef SUPPORT_JOYSTICK
 #ifdef CHIP1371
switch (joystick_port[dev]) {
+   case 1: /* auto-detect */
case 0x200:
case 0x208:
case 0x210:



---
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-driver/pci/nm256 Makefile,1.2,1.3

2003-10-24 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-driver/pci/nm256
In directory sc8-pr-cvs1:/tmp/cvs-serv13853/pci/nm256

Modified Files:
Makefile 
Log Message:
added the missing clean-up of patched c file.


Index: Makefile
===
RCS file: /cvsroot/alsa/alsa-driver/pci/nm256/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile17 Dec 2002 19:59:01 -  1.2
+++ Makefile24 Oct 2003 13:45:28 -  1.3
@@ -3,7 +3,11 @@
 include $(TOPDIR)/toplevel.config
 include $(TOPDIR)/Makefile.conf
 
+EXTRA_CLEAN = nm256.c
+
 TOPDIR = $(MAINSRCDIR)
 include $(TOPDIR)/alsa-kernel/pci/nm256/Makefile
 
 include $(TOPDIR)/Rules.make
+
+nm256.c: nm256.patch $(TOPDIR)/alsa-kernel/pci/nm256/nm256.c



---
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-kernel/pci es1968.c,1.55,1.56

2003-10-24 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-kernel/pci
In directory sc8-pr-cvs1:/tmp/cvs-serv13516/pci

Modified Files:
es1968.c 
Log Message:
fixed the compilation with the recent ac97 and info changes.



Index: es1968.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/es1968.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- es1968.c14 Oct 2003 13:59:20 -  1.55
+++ es1968.c24 Oct 2003 13:44:20 -  1.56
@@ -2037,15 +2037,20 @@
 static int __devinit
 snd_es1968_mixer(es1968_t *chip)
 {
+   ac97_bus_t bus, *pbus;
ac97_t ac97;
snd_ctl_elem_id_t id;
int err;
 
+   memset(&bus, 0, sizeof(bus));
+   bus.write = snd_es1968_ac97_write;
+   bus.read = snd_es1968_ac97_read;
+   if ((err = snd_ac97_bus(chip->card, &bus, &pbus)) < 0)
+   return err;
+
memset(&ac97, 0, sizeof(ac97));
-   ac97.write = snd_es1968_ac97_write;
-   ac97.read = snd_es1968_ac97_read;
ac97.private_data = chip;
-   if ((err = snd_ac97_mixer(chip->card, &ac97, &chip->ac97)) < 0)
+   if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97)) < 0)
return err;
 
/* attach master switch / volumes for h/w volume control */



---
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-driver/usb/us428 usX2Yhwdep.c,1.2,1.3 usbus428.c,1.5,1.6 usbus428audio.c,1.5,1.6

2003-10-24 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-driver/usb/us428
In directory sc8-pr-cvs1:/tmp/cvs-serv16346/us428

Modified Files:
usX2Yhwdep.c usbus428.c usbus428audio.c 
Log Message:
Karsten Wiese <[EMAIL PROTECTED]>:

This is a Bugfix (sporadic hangups solved), cosmetical treatment and 
feature-enhancement (Setting of PCM-Out Volume according to 
Mastervolume-Slider at device start).


Index: usX2Yhwdep.c
===
RCS file: /cvsroot/alsa/alsa-driver/usb/us428/usX2Yhwdep.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- usX2Yhwdep.c24 Sep 2003 16:45:10 -  1.2
+++ usX2Yhwdep.c24 Oct 2003 13:58:47 -  1.3
@@ -93,7 +93,7 @@
return -EBUSY;
 
/* if userspace tries to mmap beyond end of our buffer, fail */ 
-if (size > ((PAGE_SIZE - 1 + sizeof(us428ctls_sharedmem_t)) / PAGE_SIZE) * 
PAGE_SIZE){
+if (size > ((PAGE_SIZE - 1 + sizeof(us428ctls_sharedmem_t)) / PAGE_SIZE) * 
PAGE_SIZE) {
snd_printd( "%i > %i\n", size,sizeof(us428ctls_sharedmem_t)); 
 return -EINVAL;
}
@@ -103,6 +103,7 @@
if(!(us428->us428ctls_sharedmem = 
snd_malloc_pages(sizeof(us428ctls_sharedmem_t), GFP_KERNEL)))
return -ENOMEM;
memset(us428->us428ctls_sharedmem, -1, sizeof(us428ctls_sharedmem_t));
+   us428->us428ctls_sharedmem->CtlSnapShotLast = -2;
}
area->vm_ops = &us428ctls_vm_ops;
 #ifdef VM_RESERVED
@@ -174,11 +175,11 @@
i;
us428->Seq04 = 0;
 
-   if (NULL == (us428->AS04.buffer = kmalloc(URB_DataLen_AsyncSeq*URBS_AsyncSeq, 
GFP_KERNEL))){
+   if (NULL == (us428->AS04.buffer = kmalloc(URB_DataLen_AsyncSeq*URBS_AsyncSeq, 
GFP_KERNEL))) {
err = -ENOMEM;
}else
-   for (i = 0; i < URBS_AsyncSeq; ++i){
-   if (NULL == (us428->AS04.urb[i] = usb_alloc_urb(0, 
GFP_KERNEL))){
+   for (i = 0; i < URBS_AsyncSeq; ++i) {
+   if (NULL == (us428->AS04.urb[i] = usb_alloc_urb(0, 
GFP_KERNEL))) {
err = -ENOMEM;
break;
}
@@ -219,7 +220,7 @@
int err;
 
do {
-   if ((err = snd_us428_create_usbmidi(card)) < 0){
+   if ((err = snd_us428_create_usbmidi(card)) < 0) {
snd_printk("snd_us428_create_alsa_devices: 
snd_us428_create_usbmidi error %i \n", err);
break;
}
@@ -238,7 +239,7 @@
if (! (us428->In04urb = usb_alloc_urb(0, GFP_KERNEL)))
return -ENOMEM;
 
-   if (! (us428->In04Buf = kmalloc(21, GFP_KERNEL))){
+   if (! (us428->In04Buf = kmalloc(21, GFP_KERNEL))) {
usb_free_urb(us428->In04urb);
return -ENOMEM;
}
@@ -276,15 +277,15 @@
}
if (!err  &&  1 == dsp->index)
do {
-   if ((err = 
snd_us428_AsyncSeq04_init((us428dev_t*)hw->private_data))){
+   if ((err = 
snd_us428_AsyncSeq04_init((us428dev_t*)hw->private_data))) {
snd_printk("snd_us428_AsyncSeq04_init error \n");
break;
}
-   if ((err = 
snd_us428_In04_init((us428dev_t*)hw->private_data))){
+   if ((err = 
snd_us428_In04_init((us428dev_t*)hw->private_data))) {
snd_printk("snd_us428_In04_init error \n");
break;
}
-   if ((err = snd_us428_create_alsa_devices(hw->card))){
+   if ((err = snd_us428_create_alsa_devices(hw->card))) {
snd_printk("snd_us428_create_alsa_devices error %i 
\n", err);
snd_card_free(hw->card);
break;

Index: usbus428.c
===
RCS file: /cvsroot/alsa/alsa-driver/usb/us428/usbus428.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- usbus428.c  6 Oct 2003 13:15:17 -   1.5
+++ usbus428.c  24 Oct 2003 13:58:47 -  1.6
@@ -75,7 +75,7 @@
 
 
 MODULE_AUTHOR("Karsten Wiese <[EMAIL PROTECTED]>");
-MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.1");
+MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.2");
 MODULE_LICENSE("GPL");
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{TASCAM(0x1604), "NAME_ALLCAPS"(0x8001) }}");
@@ -131,22 +131,29 @@

us428->In04IntCalls++;
 
-   if (urb->status){
+   if (urb->status) {
snd_printk( "Interrupt Pipe 4 came back with status=%i\n", 
urb->status);
return;
}
 
-{
-   int diff = -1, i;
//  printk("%i:0x%02X ",

[alsa-cvslog] CVS: alsa-kernel/pci/ymfpci ymfpci_main.c,1.44,1.45

2003-10-24 Thread Jaroslav Kysela
Update of /cvsroot/alsa/alsa-kernel/pci/ymfpci
In directory sc8-pr-cvs1:/tmp/cvs-serv3064/alsa-kernel/pci/ymfpci

Modified Files:
ymfpci_main.c 
Log Message:
- AC97 code
  - introduced ac97_bus_t structure
  - moved attached codecs to /proc/asound/card?/codec97#? directory
  - merged snd_ac97_modem() to snd_ac97_mixer()
- proc cleanups - removed already initialized variables
- enhanced snd_info_set_text_ops() syntax


Index: ymfpci_main.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/ymfpci/ymfpci_main.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- ymfpci_main.c   17 Oct 2003 10:29:12 -  1.44
+++ ymfpci_main.c   23 Oct 2003 14:34:53 -  1.45
@@ -1708,6 +1708,12 @@
  *  Mixer routines
  */
 
+static void snd_ymfpci_mixer_free_ac97_bus(ac97_bus_t *bus)
+{
+   ymfpci_t *chip = snd_magic_cast(ymfpci_t, bus->private_data, return);
+   chip->ac97_bus = NULL;
+}
+
 static void snd_ymfpci_mixer_free_ac97(ac97_t *ac97)
 {
ymfpci_t *chip = snd_magic_cast(ymfpci_t, ac97->private_data, return);
@@ -1716,17 +1722,24 @@
 
 int __devinit snd_ymfpci_mixer(ymfpci_t *chip, int rear_switch)
 {
+   ac97_bus_t bus;
ac97_t ac97;
snd_kcontrol_t *kctl;
unsigned int idx;
int err;
 
+   memset(&bus, 0, sizeof(bus));
+   bus.write = snd_ymfpci_codec_write;
+   bus.read = snd_ymfpci_codec_read;
+   bus.private_data = chip;
+   bus.private_free = snd_ymfpci_mixer_free_ac97_bus;
+   if ((err = snd_ac97_bus(chip->card, &bus, &chip->ac97_bus)) < 0)
+   return err;
+
memset(&ac97, 0, sizeof(ac97));
-   ac97.write = snd_ymfpci_codec_write;
-   ac97.read = snd_ymfpci_codec_read;
ac97.private_data = chip;
ac97.private_free = snd_ymfpci_mixer_free_ac97;
-   if ((err = snd_ac97_mixer(chip->card, &ac97, &chip->ac97)) < 0)
+   if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
return err;
 
for (idx = 0; idx < YMFPCI_CONTROLS; idx++) {
@@ -1855,7 +1868,7 @@
snd_info_entry_t *entry;

if (! snd_card_proc_new(card, "ymfpci", &entry))
-   snd_info_set_text_ops(entry, chip, snd_ymfpci_proc_read);
+   snd_info_set_text_ops(entry, chip, 1024, snd_ymfpci_proc_read);
return 0;
 }
 



---
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-lib/src/pcm pcm_dmix.c,1.43,1.44 pcm_dshare.c,1.9,1.10 pcm_dsnoop.c,1.9,1.10 pcm_hooks.c,1.30,1.31 pcm_multi.c,1.84,1.85 pcm_share.c,1.76,1.77

2003-10-24 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-lib/src/pcm
In directory sc8-pr-cvs1:/tmp/cvs-serv5317

Modified Files:
pcm_dmix.c pcm_dshare.c pcm_dsnoop.c pcm_hooks.c pcm_multi.c 
pcm_share.c 
Log Message:
added more documents and examples about plugins.


Index: pcm_dmix.c
===
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_dmix.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- pcm_dmix.c  17 Sep 2003 17:09:45 -  1.43
+++ pcm_dmix.c  23 Oct 2003 14:42:47 -  1.44
@@ -958,6 +958,74 @@
 }
 \endcode
 
+ipc_key specfies the unique IPC key in integer.
+This number must be unique for each different dmix definition,
+since the shared memory is created with this key number.
+When ipc_key_add_uid is set true, the uid value is
+added to the value set in ipc_key.  This will
+avoid the confliction of the same IPC key with different users
+concurrently.
+
+Note that the dmix plugin itself supports only a single configuration.
+That is, it supports only the fixed rate (default 48000), format
+(\c S16), channels (2), and period_time (125000).
+For using other configuration, you have to set the value explicitly
+in the slave PCM definition.  The rate, format and channels can be
+covered by an additional \ref pcm_plugins_dmix "plug plugin",
+but there is only one base configuration, anyway.
+
+An example configuration for setting 44100 Hz, \c S32_LE format
+as the slave PCM of "hw:0" is like below:
+\code
+pcm.dmix_44 {
+   type dmix
+   ipc_key 321456  # any unique value
+   ipc_key_add_uid true
+   slave {
+   pcm "hw:0"
+   format S32_LE
+   rate 44100
+   }
+}
+\endcode
+You can hear 48000 Hz samples still using this dmix pcm via plug plugin
+like:
+\code
+% aplay -Dplug:dmix_44 foo_48k.wav
+\endcode
+
+For using the dmix plugin for OSS emulation device, you have to set
+the period and the buffer sizes in power of two.  For example,
+\code
+pcm.dmixoss {
+   type dmix
+   ipc_key 321456  # any unique value
+   ipc_key_add_uid true
+   slave {
+   pcm "hw:0"
+   period_time 0
+   period_size 1024  # must be power of 2
+   buffer_size 8192  # ditto
+   }
+}
+\endcode
+period_time 0 must be set, too, for resetting the
+default value.  In the case of soundcards with multi-channel IO,
+adding the bindings would help
+\code
+pcm.dmixoss {
+   ...
+   bindings {
+   0 0   # map from 0 to 0
+   1 1   # map from 1 to 1
+   }
+}
+\endcode
+so that only the first two channels are used by dmix.
+Also, note that ICE1712 have the limited buffer size, 5513 frames
+(corresponding to 640 kB).  In this case, reduce the buffer_size
+to 4096.
+
 \subsection pcm_plugins_dmix_funcref Function reference
 
 

Index: pcm_dshare.c
===
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_dshare.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- pcm_dshare.c2 Sep 2003 10:32:33 -   1.9
+++ pcm_dshare.c23 Oct 2003 14:42:47 -  1.10
@@ -681,6 +681,11 @@
 \section pcm_plugins_dshare Plugin: dshare
 
 This plugin provides sharing channels.
+Unlike \ref pcm_plugins_share "share plugin", this plugin doesn't need
+the explicit server program but accesses the shared buffer concurrently
+from each client as well as \ref pcm_plugins_dmix "dmix" and
+\ref pcm_plugins_dsnoop "dsnoop" plugins do.
+The parameters below are almost identical with these plugins.
 
 \code
 pcm.name {

Index: pcm_dsnoop.c
===
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_dsnoop.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- pcm_dsnoop.c2 Sep 2003 10:32:33 -   1.9
+++ pcm_dsnoop.c23 Oct 2003 14:42:47 -  1.10
@@ -632,6 +632,10 @@
 \section pcm_plugins_snoop Plugin: dsnoop
 
 This plugin splits one capture stream to more.
+It works the reverse way of \ref pcm_plugins_dmix "dmix plugin",
+reading the shared capture buffer from many clients concurrently.
+The meaning of parameters below are almost identical with
+dmix plugin.
 
 \code
 pcm.name {

Index: pcm_hooks.c
===
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_hooks.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- pcm_hooks.c 25 Jul 2003 17:02:03 -  1.30
+++ pcm_hooks.c 23 Oct 2003 14:42:47 -  1.31
@@ -370,6 +370,11 @@
 
 \section pcm_plugins_hooks Plugin: hooks
 
+This plugin is used to call some 'hook' function when this plugin is opened,
+modified or closed.
+Typically, it is used to change control values for a certain state
+specially for the PCM (see the example below).
+
 \code
 # Hook arguments definition
 hook_args.NAME 

[alsa-cvslog] CVS: alsa-kernel/pci via82xx.c,1.63,1.64

2003-10-24 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-kernel/pci
In directory sc8-pr-cvs1:/tmp/cvs-serv30904

Modified Files:
via82xx.c 
Log Message:
Zinx Verituse <[EMAIL PROTECTED]>:

fixed the calculation of the port for "Catpure Source" control switch.


Index: via82xx.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/via82xx.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- via82xx.c   23 Oct 2003 14:34:52 -  1.63
+++ via82xx.c   23 Oct 2003 16:46:14 -  1.64
@@ -1402,7 +1402,7 @@
 static int snd_via8233_capture_source_get(snd_kcontrol_t *kcontrol, 
snd_ctl_elem_value_t *ucontrol)
 {
via82xx_t *chip = snd_kcontrol_chip(kcontrol);
-   unsigned long port = chip->port + kcontrol->id.index ? 
(VIA_REG_CAPTURE_CHANNEL + 0x10) : VIA_REG_CAPTURE_CHANNEL;
+   unsigned long port = chip->port + (kcontrol->id.index ? 
(VIA_REG_CAPTURE_CHANNEL + 0x10) : VIA_REG_CAPTURE_CHANNEL);
ucontrol->value.enumerated.item[0] = inb(port) & VIA_REG_CAPTURE_CHANNEL_MIC ? 
1 : 0;
return 0;
 }
@@ -1410,7 +1410,7 @@
 static int snd_via8233_capture_source_put(snd_kcontrol_t *kcontrol, 
snd_ctl_elem_value_t *ucontrol)
 {
via82xx_t *chip = snd_kcontrol_chip(kcontrol);
-   unsigned long port = chip->port + kcontrol->id.index ? 
(VIA_REG_CAPTURE_CHANNEL + 0x10) : VIA_REG_CAPTURE_CHANNEL;
+   unsigned long port = chip->port + (kcontrol->id.index ? 
(VIA_REG_CAPTURE_CHANNEL + 0x10) : VIA_REG_CAPTURE_CHANNEL);
unsigned long flags;
u8 val, oval;
 



---
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-driver/pci/pdplus pdplus.c,1.14,1.15

2003-10-24 Thread Jaroslav Kysela
Update of /cvsroot/alsa/alsa-driver/pci/pdplus
In directory sc8-pr-cvs1:/tmp/cvs-serv3064/alsa-driver/pci/pdplus

Modified Files:
pdplus.c 
Log Message:
- AC97 code
  - introduced ac97_bus_t structure
  - moved attached codecs to /proc/asound/card?/codec97#? directory
  - merged snd_ac97_modem() to snd_ac97_mixer()
- proc cleanups - removed already initialized variables
- enhanced snd_info_set_text_ops() syntax


Index: pdplus.c
===
RCS file: /cvsroot/alsa/alsa-driver/pci/pdplus/pdplus.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- pdplus.c25 Sep 2003 09:58:28 -  1.14
+++ pdplus.c23 Oct 2003 14:34:51 -  1.15
@@ -5796,7 +5796,7 @@
 snd_assert (scard->card != NULL, return);
 
 if (! snd_card_proc_new (scard->card, "prodif_plus", &entry))
-   snd_info_set_text_ops(entry, scard, pdplus_proc_read);
+   snd_info_set_text_ops(entry, scard, 1024, pdplus_proc_read);
 }
 
 



---
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-kernel/core hwdep.c,1.23,1.24 info_oss.c,1.9,1.10 init.c,1.39,1.40 memory.c,1.26,1.27 pcm.c,1.33,1.34 rawmidi.c,1.39,1.40 sound.c,1.50,1.51 sound_oss.c,1.10,1.11 timer.c,1.51,1.52

2003-10-24 Thread Jaroslav Kysela
Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv3064/alsa-kernel/core

Modified Files:
hwdep.c info_oss.c init.c memory.c pcm.c rawmidi.c sound.c 
sound_oss.c timer.c 
Log Message:
- AC97 code
  - introduced ac97_bus_t structure
  - moved attached codecs to /proc/asound/card?/codec97#? directory
  - merged snd_ac97_modem() to snd_ac97_mixer()
- proc cleanups - removed already initialized variables
- enhanced snd_info_set_text_ops() syntax


Index: hwdep.c
===
RCS file: /cvsroot/alsa/alsa-kernel/core/hwdep.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- hwdep.c 21 Oct 2003 09:52:46 -  1.23
+++ hwdep.c 23 Oct 2003 14:34:52 -  1.24
@@ -487,7 +487,6 @@
 
memset(snd_hwdep_devices, 0, sizeof(snd_hwdep_devices));
if ((entry = snd_info_create_module_entry(THIS_MODULE, "hwdep", NULL)) != 
NULL) {
-   entry->content = SNDRV_INFO_CONTENT_TEXT;
entry->c.text.read_size = 512;
entry->c.text.read = snd_hwdep_proc_read;
if (snd_info_register(entry) < 0) {

Index: info_oss.c
===
RCS file: /cvsroot/alsa/alsa-kernel/core/info_oss.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- info_oss.c  13 Oct 2002 13:16:38 -  1.9
+++ info_oss.c  23 Oct 2003 14:34:52 -  1.10
@@ -114,7 +114,6 @@
 
memset(snd_sndstat_strings, 0, sizeof(snd_sndstat_strings));
if ((entry = snd_info_create_module_entry(THIS_MODULE, "sndstat", 
snd_oss_root)) != NULL) {
-   entry->content = SNDRV_INFO_CONTENT_TEXT;
entry->c.text.read_size = 2048;
entry->c.text.read = snd_sndstat_proc_read;
if (snd_info_register(entry) < 0) {

Index: init.c
===
RCS file: /cvsroot/alsa/alsa-kernel/core/init.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- init.c  30 Sep 2003 09:28:26 -  1.39
+++ init.c  23 Oct 2003 14:34:52 -  1.40
@@ -442,7 +442,6 @@
snd_printd("unable to create card entry\n");
goto __skip_info;
}
-   entry->content = SNDRV_INFO_CONTENT_TEXT;
entry->c.text.read_size = PAGE_SIZE;
entry->c.text.read = snd_card_id_read;
if (snd_info_register(entry) < 0) {
@@ -527,7 +526,6 @@
 
entry = snd_info_create_module_entry(THIS_MODULE, "cards", NULL);
snd_runtime_check(entry != NULL, return -ENOMEM);
-   entry->content = SNDRV_INFO_CONTENT_TEXT;
entry->c.text.read_size = PAGE_SIZE;
entry->c.text.read = snd_card_info_read;
if (snd_info_register(entry) < 0) {
@@ -539,7 +537,6 @@
 #ifdef MODULE
entry = snd_info_create_module_entry(THIS_MODULE, "modules", NULL);
if (entry) {
-   entry->content = SNDRV_INFO_CONTENT_TEXT;
entry->c.text.read_size = PAGE_SIZE;
entry->c.text.read = snd_card_module_info_read;
if (snd_info_register(entry) < 0)

Index: memory.c
===
RCS file: /cvsroot/alsa/alsa-kernel/core/memory.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- memory.c28 Feb 2003 14:29:17 -  1.26
+++ memory.c23 Oct 2003 14:34:52 -  1.27
@@ -231,7 +231,6 @@
 
entry = snd_info_create_module_entry(THIS_MODULE, "meminfo", NULL);
if (entry) {
-   entry->content = SNDRV_INFO_CONTENT_TEXT;
entry->c.text.read_size = 256;
entry->c.text.read = snd_memory_info_read;
if (snd_info_register(entry) < 0) {

Index: pcm.c
===
RCS file: /cvsroot/alsa/alsa-kernel/core/pcm.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- pcm.c   20 Oct 2003 15:28:38 -  1.33
+++ pcm.c   23 Oct 2003 14:34:52 -  1.34
@@ -407,11 +407,7 @@
pstr->proc_root = entry;
 
if ((entry = snd_info_create_card_entry(pcm->card, "info", pstr->proc_root)) 
!= NULL) {
-   entry->content = SNDRV_INFO_CONTENT_TEXT;
-   entry->mode = S_IFREG | S_IRUGO;
-   entry->c.text.read_size = 256;
-   entry->c.text.read = snd_pcm_stream_proc_info_read;
-   entry->private_data = pstr;
+   snd_info_set_text_ops(entry, pstr, 256, snd_pcm_stream_proc_info_read);
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
entry = NULL;
@@ -454,11 +450,7 @@
substream->proc_root = entry;
 
if ((entry = snd_info_create_card_entry(card, "info", substream->proc_root)) 

[alsa-cvslog] CVS: alsa-kernel/i2c/l3 uda1341.c,1.9,1.10

2003-10-24 Thread Jaroslav Kysela
Update of /cvsroot/alsa/alsa-kernel/i2c/l3
In directory sc8-pr-cvs1:/tmp/cvs-serv3064/alsa-kernel/i2c/l3

Modified Files:
uda1341.c 
Log Message:
- AC97 code
  - introduced ac97_bus_t structure
  - moved attached codecs to /proc/asound/card?/codec97#? directory
  - merged snd_ac97_modem() to snd_ac97_mixer()
- proc cleanups - removed already initialized variables
- enhanced snd_info_set_text_ops() syntax


Index: uda1341.c
===
RCS file: /cvsroot/alsa/alsa-kernel/i2c/l3/uda1341.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- uda1341.c   19 Apr 2003 13:34:33 -  1.9
+++ uda1341.c   23 Oct 2003 14:34:52 -  1.10
@@ -421,9 +421,9 @@
snd_info_entry_t *entry;
 
if (! snd_card_proc_new(card, "uda1341", &entry))
-   snd_info_set_text_ops(entry, clnt, snd_uda1341_proc_read);
+   snd_info_set_text_ops(entry, clnt, 1024, snd_uda1341_proc_read);
if (! snd_card_proc_new(card, "uda1341-regs", &entry))
-   snd_info_set_text_ops(entry, clnt, snd_uda1341_proc_regs_read);
+   snd_info_set_text_ops(entry, clnt, 1024, snd_uda1341_proc_regs_read);
 }
 
 /* }}} */



---
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-kernel/pci/ice1712 ice1712.c,1.35,1.36 ice1724.c,1.18,1.19

2003-10-24 Thread Jaroslav Kysela
Update of /cvsroot/alsa/alsa-kernel/pci/ice1712
In directory sc8-pr-cvs1:/tmp/cvs-serv3064/alsa-kernel/pci/ice1712

Modified Files:
ice1712.c ice1724.c 
Log Message:
- AC97 code
  - introduced ac97_bus_t structure
  - moved attached codecs to /proc/asound/card?/codec97#? directory
  - merged snd_ac97_modem() to snd_ac97_mixer()
- proc cleanups - removed already initialized variables
- enhanced snd_info_set_text_ops() syntax


Index: ice1712.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1712.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- ice1712.c   30 Sep 2003 11:30:35 -  1.35
+++ ice1712.c   23 Oct 2003 14:34:53 -  1.36
@@ -1450,13 +1450,17 @@
int err;
 
if (ice_has_con_ac97(ice)) {
+   ac97_bus_t bus, *pbus;
ac97_t ac97;
+   memset(&bus, 0, sizeof(bus));
+   bus.write = snd_ice1712_ac97_write;
+   bus.read = snd_ice1712_ac97_read;
+   if ((err = snd_ac97_bus(ice->card, &bus, &pbus)) < 0)
+   return err;
memset(&ac97, 0, sizeof(ac97));
-   ac97.write = snd_ice1712_ac97_write;
-   ac97.read = snd_ice1712_ac97_read;
ac97.private_data = ice;
ac97.private_free = snd_ice1712_mixer_free_ac97;
-   if ((err = snd_ac97_mixer(ice->card, &ac97, &ice->ac97)) < 0)
+   if ((err = snd_ac97_mixer(pbus, &ac97, &ice->ac97)) < 0)
printk(KERN_WARNING "ice1712: cannot initialize ac97 for 
consumer, skipped\n");
else {
if ((err = snd_ctl_add(ice->card, 
snd_ctl_new1(&snd_ice1712_mixer_digmix_route_ac97, ice))) < 0)
@@ -1466,13 +1470,17 @@
}
 
if (! (ice->eeprom.data[ICE_EEP1_ACLINK] & ICE1712_CFG_PRO_I2S)) {
+   ac97_bus_t bus, *pbus;
ac97_t ac97;
+   memset(&bus, 0, sizeof(bus));
+   bus.write = snd_ice1712_pro_ac97_write;
+   bus.read = snd_ice1712_pro_ac97_read;
+   if ((err = snd_ac97_bus(ice->card, &bus, &pbus)) < 0)
+   return err;
memset(&ac97, 0, sizeof(ac97));
-   ac97.write = snd_ice1712_pro_ac97_write;
-   ac97.read = snd_ice1712_pro_ac97_read;
ac97.private_data = ice;
ac97.private_free = snd_ice1712_mixer_free_ac97;
-   if ((err = snd_ac97_mixer(ice->card, &ac97, &ice->ac97)) < 0)
+   if ((err = snd_ac97_mixer(pbus, &ac97, &ice->ac97)) < 0)
printk(KERN_WARNING "ice1712: cannot initialize pro ac97, 
skipped\n");
else
return 0;
@@ -1533,7 +1541,7 @@
snd_info_entry_t *entry;
 
if (! snd_card_proc_new(ice->card, "ice1712", &entry))
-   snd_info_set_text_ops(entry, ice, snd_ice1712_proc_read);
+   snd_info_set_text_ops(entry, ice, 1024, snd_ice1712_proc_read);
 }
 
 /*

Index: ice1724.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1724.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ice1724.c   10 Sep 2003 18:01:16 -  1.18
+++ ice1724.c   23 Oct 2003 14:34:53 -  1.19
@@ -908,17 +908,21 @@
int err;
 
if (! (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S)) {
+   ac97_bus_t bus, *pbus;
ac97_t ac97;
/* cold reset */
outb(inb(ICEMT1724(ice, AC97_CMD)) | 0x80, ICEMT1724(ice, AC97_CMD));
mdelay(5); /* FIXME */
outb(inb(ICEMT1724(ice, AC97_CMD)) & ~0x80, ICEMT1724(ice, AC97_CMD));
 
+   memset(&bus, 0, sizeof(bus));
+   bus.write = snd_vt1724_ac97_write;
+   bus.read = snd_vt1724_ac97_read;
+   if ((err = snd_ac97_bus(ice->card, &bus, &pbus)) < 0)
+   return err;
memset(&ac97, 0, sizeof(ac97));
-   ac97.write = snd_vt1724_ac97_write;
-   ac97.read = snd_vt1724_ac97_read;
ac97.private_data = ice;
-   if ((err = snd_ac97_mixer(ice->card, &ac97, &ice->ac97)) < 0)
+   if ((err = snd_ac97_mixer(pbus, &ac97, &ice->ac97)) < 0)
printk(KERN_WARNING "ice1712: cannot initialize pro ac97, 
skipped\n");
else
return 0;
@@ -975,7 +979,7 @@
snd_info_entry_t *entry;
 
if (! snd_card_proc_new(ice->card, "ice1724", &entry))
-   snd_info_set_text_ops(entry, ice, snd_vt1724_proc_read);
+   snd_info_set_text_ops(entry, ice, 1024, snd_vt1724_proc_read);
 }
 
 /*



---
This SF.net email is sponsored by: The SF.net Do

[alsa-cvslog] CVS: alsa-kernel/pci cmipci.c,1.50,1.51 cs4281.c,1.45,1.46 ens1370.c,1.51,1.52 fm801.c,1.35,1.36 intel8x0.c,1.95,1.96 maestro3.c,1.42,1.43 rme32.c,1.27,1.28 rme96.c,1.29,1.30 sonicvibes.c,1.26,1.27 via82xx.c,1.62,1.63

2003-10-24 Thread Jaroslav Kysela
Update of /cvsroot/alsa/alsa-kernel/pci
In directory sc8-pr-cvs1:/tmp/cvs-serv3064/alsa-kernel/pci

Modified Files:
cmipci.c cs4281.c ens1370.c fm801.c intel8x0.c maestro3.c 
rme32.c rme96.c sonicvibes.c via82xx.c 
Log Message:
- AC97 code
  - introduced ac97_bus_t structure
  - moved attached codecs to /proc/asound/card?/codec97#? directory
  - merged snd_ac97_modem() to snd_ac97_mixer()
- proc cleanups - removed already initialized variables
- enhanced snd_info_set_text_ops() syntax


Index: cmipci.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/cmipci.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- cmipci.c14 Oct 2003 13:59:20 -  1.50
+++ cmipci.c23 Oct 2003 14:34:52 -  1.51
@@ -2837,7 +2837,7 @@
snd_info_entry_t *entry;
 
if (! snd_card_proc_new(cm->card, "cmipci", &entry))
-   snd_info_set_text_ops(entry, cm, snd_cmipci_proc_read);
+   snd_info_set_text_ops(entry, cm, 1024, snd_cmipci_proc_read);
 }
 
 

Index: cs4281.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/cs4281.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- cs4281.c14 Oct 2003 14:08:48 -  1.45
+++ cs4281.c23 Oct 2003 14:34:52 -  1.46
@@ -479,6 +479,7 @@
 
int dual_codec;
 
+   ac97_bus_t *ac97_bus;
ac97_t *ac97;
ac97_t *ac97_secondary;
 
@@ -564,7 +565,7 @@
 }
 
 static void snd_cs4281_ac97_write(ac97_t *ac97,
-  unsigned short reg, unsigned short val)
+ unsigned short reg, unsigned short val)
 {
/*
 *  1. Write ACCAD = Command Address Register = 46Ch for AC97 register address
@@ -609,7 +610,7 @@
 }
 
 static unsigned short snd_cs4281_ac97_read(ac97_t *ac97,
-   unsigned short reg)
+  unsigned short reg)
 {
cs4281_t *chip = snd_magic_cast(cs4281_t, ac97->private_data, return -ENXIO);
int count;
@@ -1119,6 +1120,12 @@
.private_value = ((BA0_PPLVC << 16) | BA0_PPRVC),
 };
 
+static void snd_cs4281_mixer_free_ac97_bus(ac97_bus_t *bus)
+{
+   cs4281_t *chip = snd_magic_cast(cs4281_t, bus->private_data, return);
+   chip->ac97_bus = NULL;
+}
+
 static void snd_cs4281_mixer_free_ac97(ac97_t *ac97)
 {
cs4281_t *chip = snd_magic_cast(cs4281_t, ac97->private_data, return);
@@ -1131,19 +1138,26 @@
 static int __devinit snd_cs4281_mixer(cs4281_t * chip)
 {
snd_card_t *card = chip->card;
+   ac97_bus_t bus;
ac97_t ac97;
int err;
 
+   memset(&bus, 0, sizeof(bus));
+   bus.write = snd_cs4281_ac97_write;
+   bus.read = snd_cs4281_ac97_read;
+   bus.private_data = chip;
+   bus.private_free = snd_cs4281_mixer_free_ac97_bus;
+   if ((err = snd_ac97_bus(card, &bus, &chip->ac97_bus)) < 0)
+   return err;
+
memset(&ac97, 0, sizeof(ac97));
-   ac97.write = snd_cs4281_ac97_write;
-   ac97.read = snd_cs4281_ac97_read;
ac97.private_data = chip;
ac97.private_free = snd_cs4281_mixer_free_ac97;
-   if ((err = snd_ac97_mixer(card, &ac97, &chip->ac97)) < 0)
+   if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
return err;
if (chip->dual_codec) {
ac97.num = 1;
-   if ((err = snd_ac97_mixer(card, &ac97, &chip->ac97_secondary)) < 0)
+   if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, 
&chip->ac97_secondary)) < 0)
return err;
}
if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_cs4281_fm_vol, chip))) < 0)
@@ -1215,7 +1229,7 @@
snd_info_entry_t *entry;
 
if (! snd_card_proc_new(chip->card, "cs4281", &entry))
-   snd_info_set_text_ops(entry, chip, snd_cs4281_proc_read);
+   snd_info_set_text_ops(entry, chip, 1024, snd_cs4281_proc_read);
if (! snd_card_proc_new(chip->card, "cs4281_BA0", &entry)) {
entry->content = SNDRV_INFO_CONTENT_DATA;
entry->private_data = chip;

Index: ens1370.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/ens1370.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- ens1370.c   14 Oct 2003 13:59:20 -  1.51
+++ ens1370.c   23 Oct 2003 14:34:52 -  1.52
@@ -1534,16 +1534,21 @@
 static int snd_ensoniq_1371_mixer(ensoniq_t * ensoniq)
 {
snd_card_t *card = ensoniq->card;
+   ac97_bus_t bus, *pbus;
ac97_t ac97;
int err, idx;
 
+   memset(&bus, 0, sizeof(bus));
+   bus.write = snd_es1371_codec_write;
+   bus.read = snd_es1371_codec_read;
+   if ((err = snd_ac97_bus(card, &bus, &pbus)) < 0)
+