Subject: Re: New ESS Allegro-1 / Maestro3 driver
To: Jared D. McNeill <jmcneill@invisible.yi.org>
From: Kazuhiko Takai <kazuhiko_takai@anet.ne.jp>
List: port-i386
Date: 09/29/2001 08:12:51
Jared wrote:
> Also, this release will work on 1.5.2. If someone can test it on
> -current,

I have a laptop with ESS1988 and waited long time your driver, thank you!

I tried it but unfortunately I could not make it work on -current.

First, your definition __NetBSD_Version__ did not work.

  ====esa.c===
  #if (__NetBSD_Version__ >= 105250000)
  #include <uvm/uvm_extern.h>
  #else
  #include <vm/vm.h>
  #endif

On -current, it includes vm/vm.h but it sould include uvm/uvm_extern.h, I
suppose.

And when I changed all the if clause including _NetBSD_Version__ of esa.c
and  esavar.h, I got these messages.

  esa.c.kt.o: In function `esa_set_params':
  esa.c.kt.o(.text+0x51f): undefined reference to `swap_bytes'
  esa.c.kt.o(.text+0x534): undefined reference to `change_sign8'
  esa.c.kt.o(.text+0x55b): undefined reference to `change_sign8'
  esa.c.kt.o(.text+0x57f): undefined reference to
`swap_bytes_change_sign16_le'
  esa.c.kt.o(.text+0x5a3): undefined reference to `change_sign16_le'
  esa.c.kt.o(.text+0x5c8): undefined reference to `mulaw_to_slinear16_le'
  esa.c.kt.o(.text+0x5ec): undefined reference to `alaw_to_slinear16_le'
  esa.c.kt.o: In function `esa_attach':
  esa.c.kt.o(.text+0x1683): undefined reference to `ac97_attach'
  modload: can't prelink `esa.c.kt.o' creating `esa.c.kt'

I could found these symbols in dev/auconv.h but I could know why it didn't
work.  These symbols are used in esa.c between lines of 384-413 and this
part is almost the same as of esm.c so that it seems to work for me.

    ====esa.c====
        play->factor = 1;
        play->sw_code = 0;

				        switch(play->encoding) {
        case AUDIO_ENCODING_SLINEAR_BE:
                if (play->precision == 16)
                        play->sw_code = swap_bytes;
                else
                        play->sw_code = change_sign8;
                break;
   ====esm.c=====
        p->factor = 1;
        p->sw_code = 0;
        switch (p->encoding) {
        case AUDIO_ENCODING_SLINEAR_BE:
        if (p->precision == 16)
                p->sw_code = swap_bytes;
                else
                p->sw_code = change_sign8;
                break;

I am not a programmer at all so it is much likely I do not hit the points,
sorry in advance.

Kazuhiko Takai;kazuhiko_takai@anet.ne.jp