Date: Wed, 26 Feb 2003 01:49:14 +0100 From: Olivier Houchard <cognet@ci0.org> To: ?yvind Rakv?g <rakis@online.no> Cc: freebsd-current@FreeBSD.ORG Subject: Re: SB Live goes silent after pcm commit Message-ID: <20030226004914.GA96935@ci0.org> In-Reply-To: <1046211203.654.14.camel@twister.rakvaag.net> References: <1046211203.654.14.camel@twister.rakvaag.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--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: <Creative EMU10K1> port 0x9400-0x941f irq 5 at device 13.0 on pci0 > pcm0: <TriTech TR28602 ac97 codec> > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030226004914.GA96935>