From owner-freebsd-multimedia Sun Dec 13 09:26:43 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA18704 for freebsd-multimedia-outgoing; Sun, 13 Dec 1998 09:26:43 -0800 (PST) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id JAA18699 for ; Sun, 13 Dec 1998 09:26:40 -0800 (PST) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id QAA02169 for multimedia@freebsd.org; Sun, 13 Dec 1998 16:16:10 +0100 From: Luigi Rizzo Message-Id: <199812131516.QAA02169@labinfo.iet.unipi.it> Subject: Re: Dell latitude sound.... (fwd) To: multimedia@FreeBSD.ORG Date: Sun, 13 Dec 1998 16:16:10 +0100 (MET) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org As Soren noticed, the BIOS in the Dell Latitude laptop maps the codec registers of the CS423x at 0x530 -- this is a bit unusual because these registers are usually at 0x534 (0x530 is the offset for the configuration registers, which are not present in most modern boards...). For historical reasons, the "pcm" driver looks for the codec registers at ioaddr+4, so in order to find the codec ion the Dell and probably other machines you either need to specify the base address as 0x52c, or apply the following patch to sys/i386/isa/snd/ad1848.c cheers luigi int mss_detect(struct isa_device *dev) { int i; u_char tmp, tmp1, tmp2 ; snddev_info *d = &(pcm_info[dev->id_unit]); char *name; + int retry = 1 ; + + again: d->io_base = dev->id_iobase; d->bd_flags |= BD_F_MCE_BIT ; ... for (i=0; i<10; i++) if (inb(io_Index_Addr(d)) & IA_BUSY) DELAY(10000); /* maybe busy, wait & retry later */ else break ; if ((inb(io_Index_Addr(d)) & IA_BUSY) != 0x00) { /* Not a AD1848 */ + if (retry) { + retry = 0 ; + dev->id_iobase = dev->id_iobase - 4 ; + goto again ; } BVDDB(printf("mss_detect error, busy still set (0x%02x)\n", inb(io_Index_Addr(d)))); return 0; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message