I've just upgraded my wheezing P120Mhz Dell Lattitude LM to a recent
-current (Jan24 snap) & the sound *almost* works!

The first problem I had was to get the card recognized.  I needed to
patch the sbc bridge driver to recognize the ESS 1688:

Index: sys/dev/sound/isa/sbc.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/isa/sbc.c,v
retrieving revision 1.16
diff -u -r1.16 sbc.c
--- sbc.c       2000/01/12 11:16:23     1.16
+++ sbc.c       2000/01/25 04:29:06
@@ -205,6 +205,7 @@
        {0x01100000, "Avance Asound 110"},              /* @@@1001 */
        {0x01200000, "Avance Logic ALS120"},            /* @@@2001 */
 
+       {0x02017316, "ESS ES1688"},                     /* ESS1688 */
        {0x68187316, "ESS ES1868"},                     /* ESS1868 */
        {0x69187316, "ESS ES1869"},                     /* ESS1869 */
        {0xacb0110e, "ESS ES1869 (Compaq OEM)"},        /* CPQb0ac */

The second problem I had was that this laptop gives its sound card
only one DMA channel (drq 1).  Newpcm seems to have horrible problems
on simplex cards:

The sound card is now recognized & when I run amp I don't hear any
output.  If I run ktrace on the amp session, it doesn't look like any
writes are initiated to /dev/dsp from the child process.  I don't see
any interrupts on irq5 nor do I hear any sound.

The problem is that in getchns() (in dsp.c), the channel is set to
fakechan if the channel is simplex (eg, 1 DMA channel) and if the
priority hasn't been set.  It looks like SD_F_PRIO_WR is only set on
the channel in dsp_write().  But apparently dsp_write() never gets
called (or gets called after getchns()), so this prevents newpcm from
working on a simplex channel.  I have the following crude hack in
place:

Index: sys/dev/sound/pcm/dsp.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pcm/dsp.c,v
retrieving revision 1.14
diff -u -r1.14 dsp.c
--- dsp.c       2000/01/10 07:05:15     1.14
+++ dsp.c       2000/01/25 04:27:12
@@ -54,6 +54,8 @@
        KASSERT((d->flags & SD_F_PRIO_SET) != SD_F_PRIO_SET, \
                ("getchns: read and write both prioritised"));
 
+if(!(d->flags & (SD_F_PRIO_RD | SD_F_PRIO_WR)))   d->flags |= SD_F_PRIO_WR;
+
        if (d->flags & SD_F_SIMPLEX) {
                *rdch = (d->flags & SD_F_PRIO_RD)? d->arec[chan] : &d->fakechan;
                *wrch = (d->flags & SD_F_PRIO_WR)? d->aplay[chan] : &d->fakechan;



This gets me to the point where I can actually hear my laptop make
noise!  Unfortunately, I seem to be having the same symptoms as Nick
Hibma & Donn Miller are reporting in the "pcm - stutters" thread.
Since my box is dog-slow, I only hear stuttering from amp.  It is a
little better with RealPlayerG2, but not great.

Thanks for any help!

Drew

------------------------------------------------------------------------------
Andrew Gallatin, Sr Systems Programmer  http://www.cs.duke.edu/~gallatin
Duke University                         Email: [EMAIL PROTECTED]
Department of Computer Science          Phone: (919) 660-6590


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to