Date: Mon, 1 May 2000 08:45:07 -0700 (MST) From: John Reynolds~ <jreynold@sedona.ch.intel.com> To: Walter Brameld <brameld@twave.net> Cc: Sean-Paul Rees <sean@seanrees.com>, freebsd-stable@freebsd.org Subject: Re: Sound skipping Message-ID: <14605.42627.743819.273014@hip186.ch.intel.com> In-Reply-To: <00043018320800.30807@Bozo_3.BozoLand.domain> References: <20000430141201.A79175@seanrees.com> <00043018320800.30807@Bozo_3.BozoLand.domain>
next in thread | previous in thread | raw e-mail | index | archive | help
[ On Sunday, April 30, Walter Brameld wrote: ] > > I just installed it to give it a try, and I get skips whenever I do > anything else while it is in use. I can't use the equalizer either, > bogs the playback down to nil output. I'm running a P3 450 w/ 128M ram. > > It plays fine if I don't touch my mouse or keyboard.... guess I'll > stick with gqmpeg. > You might try applying this patch to your kernel: It makes xmms "responsive" on my system, but still doesn't fix the bug where it chews up almost 100% of the CPU when it's playing back (haven't had the time to dive into this one ... it didn't used to do that, so I don't know if it's a new version of xmms that is doing Bad Things(tm) or if we've done a Bad Thing(tm) to our pcm driver). --- es1370.c.orig Mon Feb 28 21:15:17 2000 +++ es1370.c Mon Feb 28 21:15:03 2000 @@ -628,7 +628,69 @@ static int es_select(dev_t i_dev, int rw, struct proc * p) { - return (ENOSYS); + int unit, c = 1; + snddev_info *d ; + u_long flags; + + /* dev = minor(i_dev); */ + /* d = get_snddev_info(dev, &unit); */ + unit = UNIT(minor(i_dev)); + d = &pcm_info[unit]; + + if (d == NULL ) /* should not happen! */ + return (ENXIO) ; + + { + /* + * if the user selected a block size, then we want to use the + * device as a block device, and select will return ready when + * we have a full block. + * In all other cases, select will return when 1 byte is ready. + */ + int lim = 1; + + int revents = 0 ; + if (rw & (POLLOUT | POLLWRNORM) ) { + if ( d->flags & SND_F_HAS_SIZE ) + lim = d->play_blocksize ; + /* XXX fix the test here for half duplex devices */ + if (1 /* write is compatible with current mode */) { + flags = spltty(); + if (d->dbuf_out.dl) { + es_wr_dmaupdate(d); + } + c = d->dbuf_out.fl ; + if (c < lim) /* no space available */ + selrecord(p, & (d->wsel)); + else + revents |= rw & (POLLOUT | POLLWRNORM); + splx(flags); + } + } + if (rw & (POLLIN | POLLRDNORM)) { + if ( d->flags & SND_F_HAS_SIZE ) + lim = d->rec_blocksize ; + /* XXX fix the test here */ + if (1 /* read is compatible with current mode */) { + flags = spltty(); + if ( d->dbuf_in.dl == 0 ) /* dma idle, restart it */ + dma_rdintr(d); + else { + es_rd_dmaupdate(d); + } + c = d->dbuf_in.rl ; + if (c < lim) /* no data available */ + selrecord(p, & (d->rsel)); + else + revents |= rw & (POLLIN | POLLRDNORM); + splx(flags); + } + DEB(printf("sndselect on read: %d >= %d flags 0x%08x\n", + c, lim, d->flags)); + return c < lim ? 0 : 1 ; + } + return revents; + } } @@ -746,6 +808,15 @@ if(es_debug > 0) printf("es_callback reason %d speed %d \t",reason ,d->p lay_speed); switch(reason & SND_CB_REASON_MASK) { + case SND_CB_DMAUPDATE: + if (reason & SND_CB_WR) + es_wr_dmaupdate(d); + else if (reason & SND_CB_RD) + es_rd_dmaupdate(d); + else return -1; + + break; + case SND_CB_INIT: /* if(es_debug > 0) printf("case SND_CB_INIT\n"); */ if (d->type == ES1371_PCI_ID){ -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | John Reynolds WCCG, CCE, Higher Levels of Abstraction | | Intel Corporation MS: CH6-210 Phone: 480-554-9092 pgr: 602-868-6512 | | jreynold@sedona.ch.intel.com http://www-aec.ch.intel.com/~jreynold/ | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14605.42627.743819.273014>