[Alsa-devel] Hercules Digifire [cs46xx] gameport troubles

2004-02-24 Thread Michael Huijsmans
Hi, 
the soundcard gameport doesn't entirely work with my analog joystick
(Logitech Wingman Light, 3 axes, 2 buttons) on the gameport of the
 Hercules Digifire 7.1; the two buttons do work, however, no axis movement
is registered. 

The gameport is initialized on alsa startup, the relevant modules are loaded:
joydev, gameport, analog, input. 

dmesg says:
input0: Analog 4-axis 4-button joystick at gameport0.0 [ADC port]

jstest does this:
$ jstest /dev/js0
Joystick (Analog 4-axis 4-button joystick) has 4 axes and 4 buttons. Driver version is 
2.1.0.
Testing ... (interrupt to exit)
Axes:  0: 0  1: 0  2:-32753  3:-31409 Buttons:  0:off  1:off  2:off  3:off 
...
(Buttons 0 and 1 are registered when pressed, the axis values don't change when moving 
the stick.)

and dmesg:
analog.c: 0 out of 4718 reads (0%) on gameport0 failed

changing the analog.o kernel module js= parameter doesn't change things,
the same behaviour occurs with alsa disabled and the kernel joystick module cs461x 
loaded (i.e. only the buttons are registered)

Any ideas what's going on?
Thanks,
Mike



---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] Re: [PATCH] ens1373/ct5880 - Switch Line In to Rear Out

2004-01-14 Thread Michael Huijsmans
On Tue, 13 Jan 2004 16:40:34 +0100
Takashi Iwai [EMAIL PROTECTED] wrote:

 At Sun, 11 Jan 2004 18:55:47 +0100,
 Michael Huijsmans wrote:
  
 patch to ens1370.c  
 
 thanks for the patch!
 
 i applied it with a minor correction (the return value of put
 callback) together with clean up and fixes of other parts.
 please check the cvs tree later (the anon. server isn't mirrored
 immediately) whether it works for you.
 
 
 ciao,
 
 Takashi

Hi, 

Yes, it's still working.

Thanks,

Mike


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] [PATCH] ens1373/ct5880 - Switch Line In to Rear Out

2004-01-11 Thread Michael Huijsmans
Hi,

The Gigabyte GA-7DXR motherboard has a 4-channel SB128 
(ct5880 + STAC9708/11) onboard. The line in and second line out (rear out)
are wired to the same connector. 
After some trial-and-error with the ct5880 GPIO registers I found one which
switches line in to rear out.

The patch below adds a new mixer element when the ens1371 finds itself
on a GA-7DXR (by checking subsystem vendor  device IDs).
Other motherboards with the ct5880 may have different IDs and/or
may require a different GPIO line.

Cheers,
Mike

 
--- alsa-driver-1.0.1-orig/alsa-kernel/pci/ens1370.c2003-10-28 12:28:01.0 
+0100
+++ alsa-driver-1.0.1/alsa-kernel/pci/ens1370.c 2004-01-10 16:45:12.0 +0100
@@ -1512,6 +1512,54 @@
.put =  snd_es1373_rear_put,
 };
 
+static int snd_es1373_line_info(snd_kcontrol_t *kcontrol,
snd_ctl_elem_info_t *uinfo)
+{
+uinfo-type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
+uinfo-count = 1;
+uinfo-value.integer.min = 0;
+uinfo-value.integer.max = 1;
+return 0;
+}
+
+static int snd_es1373_line_get(snd_kcontrol_t * kcontrol,
snd_ctl_elem_value_t * ucontrol)
+{
+   ensoniq_t *ensoniq = snd_kcontrol_chip(kcontrol);
+   int val = 0;
+   
+   spin_lock_irq(ensoniq-reg_lock);
+   if ((ensoniq-ctrl  ES_1371_GPIO_OUTM) = 4)
+   val = 1;
+   ucontrol-value.integer.value[0] = val;
+   spin_unlock_irq(ensoniq-reg_lock);
+   return 0;
+}
+
+static int snd_es1373_line_put(snd_kcontrol_t * kcontrol,
snd_ctl_elem_value_t * ucontrol)
+{
+   ensoniq_t *ensoniq = snd_kcontrol_chip(kcontrol);
+   unsigned int nval1 = 0;
+   
+   nval1 = ucontrol-value.integer.value[0];
+   spin_lock_irq(ensoniq-reg_lock);
+   if(nval1) {
+ ensoniq-ctrl |= ES_1371_GPIO_OUT(4); /* switch line-in - rear out */
+   } else {
+ ensoniq-ctrl = ~(ES_1371_GPIO_OUT(4));
+   }
+   outl(ensoniq-ctrl, ES_REG(ensoniq, CONTROL));
+   spin_unlock_irq(ensoniq-reg_lock);
+   return nval1;
+}
+
+static snd_kcontrol_new_t snd_ens1373_line __devinitdata =
+{
+   .iface =SNDRV_CTL_ELEM_IFACE_MIXER,
+   .name = Line In-Rear Out Switch,
+   .info = snd_es1373_line_info,
+   .get =  snd_es1373_line_get,
+   .put =  snd_es1373_line_put,
+};
+
 static void snd_ensoniq_mixer_free_ac97(ac97_t *ac97)
 {
ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t,
ac97-private_data, return);
@@ -1586,6 +1634,11 @@
ensoniq-cssr |= ES_1373_REAR_BIT26;
snd_ctl_add(card, snd_ctl_new1(snd_ens1373_rear, ensoniq));
}
+   if ((ensoniq-subsystem_vendor_id == 0x1274) 
+   (ensoniq-subsystem_device_id == 0x2000)) { /* GA-7DXR */
+snd_ctl_add(card, snd_ctl_new1(snd_ens1373_line, ensoniq));
+   }
+
return 0;
 }




---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel