Subject: minor ad1848 problems
To: None <port-i386@NetBSD.ORG>
From: jason <jabaker@grail.cba.csuohio.edu>
List: port-i386
Date: 07/03/1996 12:01:07
I hope I am in time to get this fixed for 1.2.  There are two typos in
the ad1848 audio code.  The first is harmless, but the second prevents
recording on an ad1848k.

CAPTURE_UPPER != PLAYBACK_UPPER, but since netbsd does not do pio the
question is moot.

AUTO_CAL_ENABLE is in the interface config register.  Trying to set
AUTO_CAL_ENABLE in the clock and data register selects a
non-existent sample rate and really confuses the ad1848k.  As long as
the clock and data format register is in this confused state, the
interface config register can't be set, and the chip can't be made to
use the single dma channel for record as well as playback.

Jason

*** ic/ad1848reg.h	Thu Jun 27 11:03:12 1996
--- /sys/dev/ic/ad1848reg.h	Tue Feb  6 16:24:45 1996
***************
*** 104,110 ****
  #define CAPTURE_READY		0x20
  #define CAPTURE_LEFT		0x40
  /* cpright is not left */
! #define CAPTURE_UPPER		0x08
  /* cplower is not upper */
  
  /* Input & Output regs bits */
--- 104,110 ----
  #define CAPTURE_READY		0x20
  #define CAPTURE_LEFT		0x40
  /* cpright is not left */
! #define CAPTURE_UPPER		0x80
  /* cplower is not upper */
  
  /* Input & Output regs bits */
*** isa/ad1848.c	Thu Jun 27 11:04:26 1996
--- /sys/dev/isa/ad1848.c	Wed Jun 26 16:50:49 1996
***************
*** 118,126 ****
      0x19,		/* Left DAC output Control */
      0x19,		/* Right DAC output Control */
      			/* Clock and Data Format */
!     CLOCK_XTAL1|FMT_PCM8|AUTO_CAL_ENABLE,
      			/* Interface Config */
!     SINGLE_DMA,
      INTERRUPT_ENABLE,	/* Pin control */
      0x00,		/* Test and Init */
      0xca,		/* Misc control */
--- 118,126 ----
      0x19,		/* Left DAC output Control */
      0x19,		/* Right DAC output Control */
      			/* Clock and Data Format */
!     CLOCK_XTAL1|FMT_PCM8,
      			/* Interface Config */
!     SINGLE_DMA|AUTO_CAL_ENABLE,
      INTERRUPT_ENABLE,	/* Pin control */
      0x00,		/* Test and Init */
      0xca,		/* Misc control */