From owner-freebsd-bugs Sun Nov 17 5: 0:10 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1EA6737B401 for ; Sun, 17 Nov 2002 05:00:07 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C117A43E8A for ; Sun, 17 Nov 2002 05:00:06 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gAHD06x3007501 for ; Sun, 17 Nov 2002 05:00:06 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gAHD06uI007498; Sun, 17 Nov 2002 05:00:06 -0800 (PST) Date: Sun, 17 Nov 2002 05:00:06 -0800 (PST) Message-Id: <200211171300.gAHD06uI007498@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Philipp Mergenthaler Subject: Re: i386/40132: Enabling the joystick interface on es137x pci sound cards Reply-To: Philipp Mergenthaler Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR i386/40132; it has been noted by GNATS. From: Philipp Mergenthaler 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