From owner-freebsd-stable Mon May 1 8:45:17 2000 Delivered-To: freebsd-stable@freebsd.org Received: from melete.ch.intel.com (melete.ch.intel.com [143.182.246.25]) by hub.freebsd.org (Postfix) with ESMTP id 7249E37B8A5 for ; Mon, 1 May 2000 08:45:13 -0700 (PDT) (envelope-from jreynold@sedona.ch.intel.com) Received: from sedona.intel.com (sedona.ch.intel.com [143.182.218.21]) by melete.ch.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.22 2000/04/06 17:58:51 dmccart Exp $) with ESMTP id PAA07753; Mon, 1 May 2000 15:46:31 GMT Received: from hip186.ch.intel.com (hip186.ch.intel.com [143.182.225.68]) by sedona.intel.com (8.9.1a/8.9.1/d: sendmail.cf,v 1.10 2000/02/10 21:38:16 steved Exp $) with ESMTP id IAA08363; Mon, 1 May 2000 08:45:08 -0700 (MST) X-Envelope-From: jreynold@sedona.ch.intel.com Received: (from jreynold@localhost) by hip186.ch.intel.com (8.9.1a/8.9.1/d: client.m4,v 1.3 1998/09/29 16:36:11 sedayao Exp sedayao $) id LAA25252; Mon, 1 May 2000 11:45:08 -0400 (EDT) X-Authentication-Warning: hip186.ch.intel.com: jreynold set sender to jreynold@sedona.ch.intel.com using -f From: John Reynolds~ MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14605.42627.743819.273014@hip186.ch.intel.com> Date: Mon, 1 May 2000 08:45:07 -0700 (MST) To: Walter Brameld Cc: Sean-Paul Rees , freebsd-stable@freebsd.org Subject: Re: Sound skipping In-Reply-To: <00043018320800.30807@Bozo_3.BozoLand.domain> References: <20000430141201.A79175@seanrees.com> <00043018320800.30807@Bozo_3.BozoLand.domain> X-Mailer: VM 6.75 under Emacs 20.3.11 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [ 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