From owner-freebsd-current Tue Feb 25 16:50:32 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E8EE37B405 for ; Tue, 25 Feb 2003 16:50:29 -0800 (PST) Received: from cognet.ci0.org (cognet.ci0.org [80.65.224.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id D278E43FDD for ; Tue, 25 Feb 2003 16:50:27 -0800 (PST) (envelope-from mlfbsd@cognet.ci0.org) Received: from cognet.ci0.org (localhost [127.0.0.1]) by cognet.ci0.org (8.12.7/8.12.7) with ESMTP id h1Q0nEGh002047; Wed, 26 Feb 2003 01:49:15 +0100 (CET) (envelope-from mlfbsd@cognet.ci0.org) Received: (from mlfbsd@localhost) by cognet.ci0.org (8.12.7/8.12.7/Submit) id h1Q0nE2s002046; Wed, 26 Feb 2003 01:49:14 +0100 (CET) Date: Wed, 26 Feb 2003 01:49:14 +0100 From: Olivier Houchard To: ?yvind Rakv?g Cc: freebsd-current@FreeBSD.ORG Subject: Re: SB Live goes silent after pcm commit Message-ID: <20030226004914.GA96935@ci0.org> References: <1046211203.654.14.camel@twister.rakvaag.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="gKMricLos+KVdGMg" Content-Disposition: inline In-Reply-To: <1046211203.654.14.camel@twister.rakvaag.net> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Feb 25, 2003 at 11:13:23PM +0100, ?yvind Rakv?g wrote: > I believe the commit Feb 20 17:31:11 2003 UTC on > src/sys/dev/sound/pci/emu10k1.c broke something. > > With a kernel built from 17:00 sources sound works, from 19:00 there is > only the sound of silence. Everything looks OK, xmms, mpg123 etc play, > but no sound. > > The pcm driver is compiled into the kernel, i haven't tested loading as > module. > > dmesg|grep pcm: > pcm0: port 0x9400-0x941f irq 5 at device 13.0 on pci0 > pcm0: > > Soundcard: Soundblaster Live 1024! Player > Motherboard: Asus A7V133, Via Apollo KT133A chipset > > Soundcard is sharing irq with an Intel NIC and the onboard USB > controller. Hi, Could you please try the attached patch (to be applied in /sys/dev/sound/pci). Thanks, Olivier --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="emu10k1.c.diff" Index: emu10k1.c =================================================================== RCS file: /home/ncvs/src/sys/dev/sound/pci/emu10k1.c,v retrieving revision 1.32 diff -u -p -r1.32 emu10k1.c --- emu10k1.c 23 Feb 2003 01:06:58 -0000 1.32 +++ emu10k1.c 26 Feb 2003 00:43:54 -0000 @@ -1022,9 +1022,9 @@ emu_intr(void *p) static void emu_setmap(void *arg, bus_dma_segment_t *segs, int nseg, int error) { - void **phys = arg; + bus_addr_t *phys = arg; - *phys = error? 0 : (void *)segs->ds_addr; + *phys = error? 0 : (bus_addr_t)segs->ds_addr; if (bootverbose) { printf("emu: setmap (%lx, %lx), nseg=%d, error=%d\n", @@ -1043,7 +1043,7 @@ emu_malloc(struct sc_info *sc, u_int32_t if (bus_dmamem_alloc(sc->parent_dmat, &buf, BUS_DMA_NOWAIT, &map)) return NULL; if (bus_dmamap_load(sc->parent_dmat, map, buf, sz, emu_setmap, addr, 0) - || !addr) + || !*addr) return NULL; return buf; } @@ -1094,7 +1094,7 @@ emu_memalloc(struct sc_info *sc, u_int32 ofs = 0; for (idx = start; idx < start + blksz; idx++) { mem->bmap[idx >> 3] |= 1 << (idx & 7); - tmp = (u_int32_t)(u_long)((u_int8_t *)&blk->buf_addr + ofs); + tmp = (u_int32_t)(u_long)((u_int8_t *)blk->buf_addr + ofs); /* printf("pte[%d] -> %x phys, %x virt\n", idx, tmp, ((u_int32_t)buf) + ofs); */ mem->ptb_pages[idx] = (tmp << 1) | idx; ofs += EMUPAGESIZE; --gKMricLos+KVdGMg-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message