Date: Sun, 17 Nov 2002 05:00:06 -0800 (PST) From: Philipp Mergenthaler <un1i@rz.uni-karlsruhe.de> To: freebsd-bugs@FreeBSD.org Subject: Re: i386/40132: Enabling the joystick interface on es137x pci sound cards Message-ID: <200211171300.gAHD06uI007498@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/40132; it has been noted by GNATS. From: Philipp Mergenthaler <un1i@rz.uni-karlsruhe.de> To: freebsd-gnats-submit@FreeBSD.org, rombios@acedsl.com Cc: Subject: Re: i386/40132: Enabling the joystick interface on es137x pci sound cards Date: Sun, 17 Nov 2002 13:55:50 +0100 Could somebody please commit the patch from this PR? I can confirm that it works (i.e. makes the joystick usable), at least on es1371-compatible sound cards. Also, I think kern/20297 could then be closed, too. (That patch is only for es1370 and is slightly different in that it sets the flag CTRL_UART_EN, too. I don't see why that should be necessary and Linux's driver for the es1370 doesn't seem to do it either.) The original patch from this PR, which is for -stable, doesn't apply cleanly to -current and there's also a trailing blank. Below is a cleaned up version of "rombios"'s patch for -current. Thanks, Philipp Index: es137x.c =================================================================== RCS file: /ncvs/src/sys/dev/sound/pci/es137x.c,v retrieving revision 1.42 diff -c -r1.42 es137x.c *** es137x.c 28 Apr 2002 22:38:23 -0000 1.42 --- es137x.c 17 Nov 2002 12:09:07 -0000 *************** *** 470,476 **** static int es1370_init(struct es_info *es) { ! es->ctrl = CTRL_CDC_EN | CTRL_SERR_DIS | (DAC2_SRTODIV(DSP_DEFAULT_SPEED) << CTRL_SH_PCLKDIV); bus_space_write_4(es->st, es->sh, ES1370_REG_CONTROL, es->ctrl); --- 470,476 ---- static int es1370_init(struct es_info *es) { ! es->ctrl = CTRL_CDC_EN | CTRL_JYSTK_EN | CTRL_SERR_DIS | (DAC2_SRTODIV(DSP_DEFAULT_SPEED) << CTRL_SH_PCLKDIV); bus_space_write_4(es->st, es->sh, ES1370_REG_CONTROL, es->ctrl); *************** *** 498,504 **** if (debug > 0) printf("es_init\n"); es->num = 0; ! es->ctrl = 0; es->sctrl = 0; /* initialize the chips */ if ((devid == ES1371_PCI_ID && revid == ES1371REV_ES1373_8) || --- 498,504 ---- if (debug > 0) printf("es_init\n"); es->num = 0; ! es->ctrl = CTRL_JYSTK_EN; es->sctrl = 0; /* initialize the chips */ if ((devid == ES1371_PCI_ID && revid == ES1371REV_ES1373_8) || *************** *** 516,524 **** bus_space_write_4(es->st, es->sh, ES1370_REG_SERIAL_CONTROL, es->sctrl); bus_space_write_4(es->st, es->sh, ES1371_REG_LEGACY, 0); /* AC'97 warm reset to start the bitclk */ ! bus_space_write_4(es->st, es->sh, ES1371_REG_LEGACY, es->ctrl | ES1371_SYNC_RES); DELAY(2000); ! bus_space_write_4(es->st, es->sh, ES1370_REG_SERIAL_CONTROL, es->ctrl); /* Init the sample rate converter */ bus_space_write_4(es->st, es->sh, ES1371_REG_SMPRATE, ES1371_DIS_SRC); for (idx = 0; idx < 0x80; idx++) --- 516,525 ---- bus_space_write_4(es->st, es->sh, ES1370_REG_SERIAL_CONTROL, es->sctrl); bus_space_write_4(es->st, es->sh, ES1371_REG_LEGACY, 0); /* AC'97 warm reset to start the bitclk */ ! bus_space_write_4(es->st, es->sh, ES1370_REG_CONTROL, es->ctrl); /*added CTRL_JYSTK_EN*/ ! bus_space_write_4(es->st, es->sh, ES1371_REG_LEGACY,ES1371_SYNC_RES); DELAY(2000); ! bus_space_write_4(es->st, es->sh, ES1370_REG_SERIAL_CONTROL, es->sctrl); /* Init the sample rate converter */ bus_space_write_4(es->st, es->sh, ES1371_REG_SMPRATE, ES1371_DIS_SRC); for (idx = 0; idx < 0x80; idx++) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211171300.gAHD06uI007498>