Date: Fri, 12 Apr 2002 00:05:21 -0400 From: Colin Perkins <csp@isi.edu> To: freebsd-multimedia@FreeBSD.ORG Subject: Sound on ThinkPad X22 Message-ID: <200204120405.g3C45L59000480@purple.nge.isi.edu>
next in thread | raw e-mail | index | archive | help
Hi, I've been fighting to get audio working on my ThinkPad X22, running 4.5-STABLE. Seems I finally have success, and I wanted to share the information with the list for the record. Stock 4.5-STABLE detects the soundcard, but can't map the IO port space. The dmesg shows: pcm0: <Intel 82801CA (ICH3)> irq 5 at device 31.5 on pci0 pcm0: unable to map IO port space device_probe_and_attach: pcm0 attach returned 6 Applying the patches from PR kern/36716 and i386/36972 and recompiling with the PCI_ENABLE_IO_MODES option in the kernel config results in: pcm0: <Intel 82801CA (ICH3)> port 0x18c0-0x18ff,0x1c00-0x1cff irq 5 at device 31.5 on pci0 pcm0: ac97 codec reports dac not ready pcm0: measured ac97 link rate at 44201 Hz and non-functional sound. However, this can be fixed by increasing the delay in sys/dev/sound/pcm/ac97.c as follows: *** ac97.c.orig Thu Apr 11 14:29:49 2002 --- ac97.c Thu Apr 11 23:30:54 2002 *************** *** 367,373 **** wrcd(codec, AC97_REG_POWER, (codec->flags & AC97_F_EAPD_INV)? 0x8000 : 0x0000); wrcd(codec, AC97_REG_RESET, 0); ! DELAY(100000); wrcd(codec, AC97_REG_POWER, (codec->flags & AC97_F_EAPD_INV)? 0x8000 : 0x0000); i = rdcd(codec, AC97_REG_RESET); --- 367,373 ---- wrcd(codec, AC97_REG_POWER, (codec->flags & AC97_F_EAPD_INV)? 0x8000 : 0x0000); wrcd(codec, AC97_REG_RESET, 0); ! DELAY(400000); wrcd(codec, AC97_REG_POWER, (codec->flags & AC97_F_EAPD_INV)? 0x8000 : 0x0000); i = rdcd(codec, AC97_REG_RESET); *************** *** 462,468 **** wrcd(codec, AC97_REG_POWER, (codec->flags & AC97_F_EAPD_INV)? 0x8000 : 0x0000); wrcd(codec, AC97_REG_RESET, 0); ! DELAY(100000); wrcd(codec, AC97_REG_POWER, (codec->flags & AC97_F_EAPD_INV)? 0x8000 : 0x0000); i = rdcd(codec, AC97_REG_RESET); --- 462,468 ---- wrcd(codec, AC97_REG_POWER, (codec->flags & AC97_F_EAPD_INV)? 0x8000 : 0x0000); wrcd(codec, AC97_REG_RESET, 0); ! DELAY(400000); wrcd(codec, AC97_REG_POWER, (codec->flags & AC97_F_EAPD_INV)? 0x8000 : 0x0000); i = rdcd(codec, AC97_REG_RESET); and dmesg now shows: pcm0: <Intel 82801CA (ICH3)> port 0x18c0-0x18ff,0x1c00-0x1cff irq 5 at device 31.5 on pci0 Question for the list: is this increase in the delay parameter likely to cause problems with other devices? If not, can someone consider committing the necessary changes? Cheers, Colin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204120405.g3C45L59000480>