Date: Sun, 22 Feb 2004 04:34:54 +0800 From: Autrijus Tang <autrijus@autrijus.org> To: freebsd-multimedia@freebsd.org Cc: chris@chrisburkert.de Subject: [PATCH] fix snd_ich support for Asus M2400N Message-ID: <1077395693.3133.7.camel@localhost> In-Reply-To: <1077357399.2405.4.camel@localhost> References: <1077357399.2405.4.camel@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-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: <SigmaTel STAC9750/51 AC97 Codec>. 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: <Intel ICH4 (82801DB)> port 0xe100-0xe13f,0xe000-0xe0ff irq 5 at dev= ice 31.5 on pci0 pcm0: <SigmaTel STAC9750/51 AC97 Codec> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1077395693.3133.7.camel>