Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Dec 1998 16:16:10 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        multimedia@FreeBSD.ORG
Subject:   Re: Dell latitude sound.... (fwd)
Message-ID:  <199812131516.QAA02169@labinfo.iet.unipi.it>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812131516.QAA02169>