From owner-freebsd-multimedia@FreeBSD.ORG Sat Feb 21 12:35:27 2004 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 46D0B16A4CE for ; Sat, 21 Feb 2004 12:35:27 -0800 (PST) Received: from smtp2.apol.com.tw (smtp2.apol.com.tw [203.79.224.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id A32B243D1D for ; Sat, 21 Feb 2004 12:35:26 -0800 (PST) (envelope-from autrijus@autrijus.org) Received: from mail.autrijus.org (210-85-16-204.cm.apol.com.tw [210.85.16.204]) by smtp2.apol.com.tw (8.9.3/8.9.3) with ESMTP id EAA5158695; Sun, 22 Feb 2004 04:35:05 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.autrijus.org (Postfix) with ESMTP id 6A3CD41A4; Sun, 22 Feb 2004 04:37:10 +0800 (CST) Received: from mail.autrijus.org ([127.0.0.1]) by localhost (aut.dyndns.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24963-08; Sun, 22 Feb 2004 04:37:06 +0800 (CST) Received: from [192.168.1.4] (not [192.168.1.4]) by mail.autrijus.org (Postfix) with ESMTP id E4F4041A1; Sun, 22 Feb 2004 04:37:05 +0800 (CST) From: Autrijus Tang To: freebsd-multimedia@freebsd.org In-Reply-To: <1077357399.2405.4.camel@localhost> References: <1077357399.2405.4.camel@localhost> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-2PPJ4HwSLMQSHB1Lo/In" Message-Id: <1077395693.3133.7.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sun, 22 Feb 2004 04:34:54 +0800 X-Virus-Scanned: by amavisd-new at autrijus.org cc: chris@chrisburkert.de Subject: [PATCH] fix snd_ich support for Asus M2400N X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2004 20:35:27 -0000 --=-2PPJ4HwSLMQSHB1Lo/In Content-Type: text/plain Content-Transfer-Encoding: quoted-printable (This is a folllow-up to misc/61388) Hi. Here is a patch against -CURRENT that fixes ich4 support for pcm0: . It works by backporting the legacy support for NAMBAR/NABMBAR from 5.1-RELEASE, instead of using the newer and broken MMBAR/MBBAR. Before this patch, dmesg shows: pcm0: unable to map IO port space device_probe_and_attach: pcm0 attach returned 6 After this patch, it becomes: pcm0: port 0xe100-0xe13f,0xe000-0xe0ff irq 5 at dev= ice 31.5 on pci0 pcm0: Thanks, /Autrijus/ --- /usr/src/sys/dev/sound/pci/ich.orig Sat Feb 21 17:40:43 2004 +++ /usr/src/sys/dev/sound/pci/ich.c Sun Feb 22 04:21:29 2004 @@ -693,12 +693,23 @@ } =20 /* + * By default, ich4 has NAMBAR and NABMBAR i/o spaces as + * read-only. Need to enable "legacy support", by poking into + * pci config space. The driver should use MMBAR and MBBAR, + * but doing so will mess things up here. ich4 has enough new + * features it warrants it's own driver.=20 + */ + if (pci_get_devid(dev) =3D=3D ICH4ID) { + pci_write_config(dev, PCIR_ICH_LEGACY, ICH_LEGACY_ENABLE, 1); + } + + /* * Enable bus master. On ich4/5 this may prevent the detection of * the primary codec becoming ready in ich_init(). */ pci_enable_busmaster(dev); =20 - if ((pci_get_devid(dev) =3D=3D ICH4ID) || (pci_get_devid(dev) =3D=3D ICH5= ID)) { + if (pci_get_devid(dev) =3D=3D ICH5ID) { sc->nambarid =3D PCIR_MMBAR; sc->nabmbarid =3D PCIR_MBBAR; sc->regtype =3D SYS_RES_MEMORY; --=-2PPJ4HwSLMQSHB1Lo/In Content-Type: application/pgp-signature; name=signature.asc Content-Description: =?UTF-8?Q?=E9=80=99=E6=98=AF=E6=95=B8=E4=BD=8D=E5=8A=A0=E7=B0=BD?= =?UTF-8?Q?=E7=9A=84=E9=83=B5?= =?UTF-8?Q?=E4=BB=B6?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQBAN8DttLPdNzw1AaARAnIwAJ9Yx1u4/tr95aOB0wMI4Kmf6O0K3wCgik9R uMTl8d6tx3JlkEk2WxxpDd4= =EUVs -----END PGP SIGNATURE----- --=-2PPJ4HwSLMQSHB1Lo/In--