Commit Graph

1518 Commits

Author SHA1 Message Date
itohy a44328a50e Fix power-related init code.
Change the default mixer setting to make wave and OPL3 volume even.
Mute the chip during attach not to make noise.
1999-10-07 03:28:56 +00:00
itohy 4aba617989 Add "opl at ym" and "mpu at ym" attachment.
Options for ym driver are defopt'ed.
1999-10-05 03:48:27 +00:00
itohy 871f1c2c0a New ym driver.
1. Add power control to reduce power consumption.
    The behavior can be controlled by mixerctl(1).
 2. Add suspend/resume hook to keep the parameters.
    Currently this includes CODEC and control registers but
    does not include the DMA state.  FIXME.
 3. Support "opl at ym" and "mpu at ym" attachment.
    Actually, this is required for power control.
 4. Add support for the on-chip 3D enhancement hardware.
    This includes bass/treble enhancement, wide stereo, and
    the equalization mode.  This can be controlled by mixerctl(1).
 5. Make "audioctl -w play.gain=xxx" work like as
    "mixerctl -w inputs.dac=xxx" and now it changes
    the wave output volume correctly.
 6. Support hardware master volume switches.
 7. Change formula of calculating gain so that all the levels
    should be used equally.
 8. Change "audioctl name" to "OPL3-SA3" and "audioctl version"
    to the version of the chip.
1999-10-05 03:46:08 +00:00
itohy d82343a7ec Add power control hooks.
Make the wave output mute while playback is inactive.  This significantly
reduces noises while preparing playback, especially by mpg123.
1999-10-05 03:44:31 +00:00
itohy 3b2be55d69 Add power control hooks. 1999-10-05 03:42:53 +00:00
itohy 0fed0f8872 "mpu at ym" attachment glue for making use of
Roland MPU401 compatible MIDI port on Yamaha OPL3-SA3.
1999-10-05 03:41:05 +00:00
itohy 04c1bf41b9 "opl at ym" attachment glue for making use of
OPL3 FM synthesizer on Yamaha OPL3-SA3.
1999-10-05 03:40:21 +00:00
thorpej a3ef0b7a6d Fix compilation of ISA bha front-end. PR #8528, Takahiro Kambe. 1999-10-01 18:17:12 +00:00
thorpej 63b8530b4e Update for SCSPI changes. 1999-09-30 23:04:39 +00:00
is 4efecd1291 The nca.c probe routine falsely claims i82595tx chips to itself.
Move it to after the iy driver.
1999-09-09 09:54:08 +00:00
soren a4b7a96e0e Do not complain in sbfind() if another driver has mapped the registers. 1999-09-07 00:49:41 +00:00
rh ff962e992b Add mode 3 support for newer CS423X chips. Modify probe to correctly
distinguish between CS4236, CS4236B, and CS4237B.
1999-09-06 17:07:04 +00:00
thorpej 90b9deda72 When padding short packets on transmit, don't include the CRC length
in the computation.  kern/8194.
1999-08-25 22:41:42 +00:00
augustss 19570e813c Implement opl at wss. 1999-08-14 21:19:29 +00:00
drochner 7317aa4924 make it report the correct ISA port range 1999-08-14 14:32:12 +00:00
augustss 03c29debf5 Make this file compile again. 1999-08-05 11:25:47 +00:00
augustss 84d5e946e6 Use NMPU not NMIDI around call to mpu_intr. 1999-08-04 10:50:52 +00:00
augustss c1c87dde4a Add another file I forgot in my MPU changes. 1999-08-04 10:46:34 +00:00
augustss 42fb510148 Move the mpu device declaration to conf/files.
Let the mpu device attach at the sb device, and then midi at the mpu.
Update the mpu at eso attachment.
1999-08-02 17:37:41 +00:00
augustss cbf1f6f1b9 Move the MPU driver isa/ to ic/.
(I didn't move it in the repository because the revision history
is very short and uninteresting. :)
1999-08-01 18:05:39 +00:00
augustss 0c0dc211d4 Make an MPU attachment to ISA. Used for old Roland cards. Written
by me and gson@araneus.fi (Andreas Gustafsson).
1999-08-01 17:53:39 +00:00
augustss a6a09bcdd6 Add support for ES18[67][89]. From PR #7427 by AW9K-NNK@asahi-net.or.jp,
Nonaka Kimihiro.
1999-06-18 20:25:23 +00:00
dante 001471550c Move chip version check from advlib.c to adv_isa.c 1999-06-12 12:10:30 +00:00
dante 29c6046a31 Add adv_isa.c entry 1999-06-06 17:30:37 +00:00
dante 8c090be7cb Add support for the following AdvanSys SCSI ISA cards:
Connectivity Products:
   ABP510/5150 - Bus-Master ISA (240 CDB) (Footnote 1)
   ABP5140 - Bus-Master ISA (16 CDB) (Footnote 1) (Footnote 2)
   ABP5142 - Bus-Master ISA with floppy (16 CDB) (Footnote 3)

Single Channel Products:
   ABP542 - Bus-Master ISA with floppy (240 CDB)

Footnotes:
  1. This board has been shipped by HP with the 4020i CD-R drive.
     The board has no BIOS so it cannot control a boot device, but
     it can control any secondary SCSI device.
  2. This board has been sold by SIIG as the i540 SpeedMaster.
  3. This board has been sold by SIIG as the i542 SpeedMaster.
1999-06-06 17:28:58 +00:00
nathanw 70e38aa504 Fix bug uncovered by audio.c fix: Since the monitor control on the ESS
is a muting control, not a level control, change the name to reflect that.

XXX The fact that the audio code depends on the string names of the
XXX mixer devices is bogus.
1999-05-30 00:22:59 +00:00
bouyer ba2e85e711 32 bits I/O ocasionally fails on some hardware, so the test succeed but
the kernel can get a 'protection fault trap' later. Enable the 32 bits I/O
test conditionally on a config flag, disabled by default (problem
reported by kurt.schreiner@uni-mainz.de).
1999-05-19 14:41:25 +00:00
thorpej f98d358a1f Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m).  The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary.  Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
1999-05-18 23:52:51 +00:00
bad b7ae9f8e40 Convert some bogus panic()s into printf()s. 1999-04-30 15:29:24 +00:00
bad 8fb6c6124b From Onno van der Linden:
Reorganise the driver some what.
Rename tr_reset() to the more appropriate tr_stop().
Create a common tropic reset routine and use it in the frontends.
Move the code in tr_config() which is only used in the card attachment
routines into a new tr_attach() function.
Take adapter off the ring through tr_shutdown() in a shutdown hook.
This simplifies the bus-specific frontend.
1999-04-29 15:47:02 +00:00
jonathan 894ce34c9d Improved 509B-in-PnP mode detection (Christoph Badura, Jonathan Stone):
Verify EEPROM checksum, extract card rev-level, test capabilities
  word, then test high-order config bits to verify card is in PnP mode,
  and skip if so.
1999-04-28 01:20:01 +00:00
jonathan cc3feba3f5 Don't attach an 3bc509B as ep? at isa if the EEPROM is set to to PnP mode.
See PR# port-i386/7428
1999-04-20 22:07:37 +00:00
augustss 4084111fca Make copyrights conform. 1999-04-13 20:37:21 +00:00
bouyer 503de51fdd Fix probe code for IDE devices:
- Don't rely on ATA signature: some ide controllers seems to not transmit it
  properly (SIMIDE on arm32 machines). Instead, when we guess a drive is here
  after reset, just mark it as ATA and OLD is it's not ATAPI.
- at attach time, use IDENTIFY to eliminate ghost from the probe. If the
  drive had the old flag and IDENTIFY failed, issue a WDCC_RECAL command
  to detect a pre-ATA disk. If IDENTIFY succeded, remove the OLD flag,
  it's obviously not a pre-ATA disk.
- add a new controller flag, WDC_CAPABILITY_PREATA, used to shorcut parts
  of the probe (not necessary, but makes the probe/attach faster). This is
  only set by the ISA front-end, all other controllers supported can't have
  pre-ATA drives attached.
The mechanism used are more or less the same as before, they have just been
reordered. Should solve port-arm32/7324 (waiting for feedback).
1999-04-11 20:50:28 +00:00
bad 57ba75e2fc Correct a misleading comment copied over from the PCIC version of this file. 1999-04-08 16:14:29 +00:00
mycroft 2f91607aff Enable this is a non-entropy rnd source. 1999-03-30 21:02:41 +00:00
mycroft ca5dd9fee7 The AD1848/CS4231 attachment doesn't create DMA maps any more, so we have to
do it here.  This is preferrable anyway, since we're not actually doing DMA
through the AD/CS chip.
1999-03-30 16:40:47 +00:00
tron 777c326ff7 Make it possible to force 16 mode via "flags 4" in kernel configuration.
Patch supplied by Martin Husemann on "current-users", fixes PR kern/5673.
1999-03-28 12:51:49 +00:00
thorpej 34f3cd7ce9 Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
1999-03-25 23:20:22 +00:00
augustss 0ed038285c Remove leftover definition of AUDIO_DEBUG. 1999-03-24 20:59:21 +00:00
drochner 1c99e4196a Use BUS_SPACE_ALIGNED_POINTER() instead of ALIGNED_POINTER() where the pointer
in not just used to access memory but is bassed to bus_space_xxx_n()
methods. For debugging purposes, bus_space can have additional constraints
which will be properly met by BUS_SPACE_ALIGNED_POINTER().
1999-03-23 21:41:07 +00:00
bad f44fb0d91c A backend for Databook's TCIC family of PCMCIA chips.
Thanks to Andreas Lohrum, O'Reilly Verlag, Terry Moore, and Holger Czukay
for hardware, documentation, and support.
1999-03-23 20:04:14 +00:00
bad a4e508928f Oops. RcsID police. 1999-03-22 23:01:36 +00:00
bad ce0465b40f config(8) glue for Token-Ring and TROPIC drivers. 1999-03-22 22:33:35 +00:00
bad a8e47bd29b Add TLINK_619_POLY. 1999-03-22 22:26:27 +00:00
bad 2c16793ee5 Chipset driver for TROPIC based Token-Ring cards.
Frontends for IBM and 3COM ISA cards.

By Onno van der Linden <onno@simplex.nl>.
1999-03-22 22:21:26 +00:00
mycroft 330c5ea7a2 Create DMA maps at open time. 1999-03-22 14:54:01 +00:00
mycroft 9e4bd01bff Make sure we clean up any DMA maps if the open fails. 1999-03-22 14:38:02 +00:00
mycroft f887d74c45 Nuke sc_iooffs from orbit. This is exactly what bus_space_subregion() is for. 1999-03-22 14:29:14 +00:00
mycroft 97de30ff26 Several things:
* Rearrange the speed mapping table and adjust the code so that the highest
  rate can actually be used.  Previously we ended up rounding up slightly
  lower speeds and then losing because set_params couldn't set the mode
  back to the current one.
* Allow 260 as a valid I/O address, since the SB1 can be jumpered to this.
* Change the MPU-401 code so it can be attached as a separate device.
  (XXX Really, the SB code ought to just attach a subdevice itself.)
* Do not attach an OPL on the SB1.  Writing to the OPL registers at
  SB_base+0 on this card wedges my machine.
  (XXX Should we access it at 388 instead?  The Creative web site claims
  that this board *does* have an OPL2, but I haven't played with this
  extensively.)
* Allocate the SB DMA channels at open time, rather than attach time, so
  that a single DRQ can be used for multiple cards (if only one is in use
  at a given time).
  (XXX Let me tell you why this is a horrible hack.  If the ISA DMA code
  tries to allocate a bounce buffer after boot time, it will generally fail,
  because there is no contiguous memory below 16MB and the code to allocate
  contiguous pages doesn't know how to move things around.  Now, we
  shouldn't ever be using bounce buffers here, because we use
  isa_dmamem_alloc().  So we just turn off BUS_DMA_ALLOCNOW and we don't
  actually try to.  That's cool, and it even works, but isa_dmamem_alloc()
  has the same problem.  It just happens that we allocate the ring buffers
  at boot time, and whenever we reallocate them (due to the buffer size
  changing), we just deallocated the previous (contiguous) buffer, so we get
  lucky.  This is absolutely disgusting and needs to be fixed.)
1999-03-22 07:37:35 +00:00
mycroft 1337db796b Adjust the probe routine to work on chips where the mic preamp bit is shared
between register I0 and I1.
1999-03-22 07:27:46 +00:00
mycroft ee5f90d04c If bus_dmamap_create() fails, free the DMA channel. 1999-03-22 07:06:09 +00:00
mycroft 5b00b99bef Allow DRQ[A-C] to be used on the 1888 as well. 1999-03-19 12:40:21 +00:00
cgd fa26744c04 don't need isa_machdep.h, since isavar.h is included 1999-03-19 05:42:00 +00:00
cgd d324c9f2f6 pull isa_machdep.h in from machine/ instead of from $(MACHINE)/isa/ 1999-03-19 05:13:16 +00:00
mycroft b45b384ea1 Also fix ia_iosize. 1999-03-18 20:57:11 +00:00
mycroft 5a20d4df8d Some fixes to the IRQ/DRQ configuration, and the probe output. 1999-03-18 20:55:50 +00:00
mycroft 813fb95309 The chip is only rated for 44.1KHz, and will not record faster that 46.794KHz,
so adjust ESS_MAXRATE.  ESS_MINRATE was also wrong, not that anyone cares.
1999-03-18 07:11:21 +00:00
mycroft b6ee330d4e dmapos should start at 0, in theory.
Also experimentally force polling mode.
1999-03-18 06:04:21 +00:00
mycroft 81d2718d5b Add support for polling. 1999-03-18 06:03:31 +00:00
mycroft 039246b8d5 Add support for polling. 1999-03-18 04:31:36 +00:00
mycroft ff4754d6e5 Confirm that there was an interrupt before handling it. Allows IRQs to be
shared with other devices.
1999-03-18 02:44:27 +00:00
mycroft 8ace2247cb Fix a couple of other places we should avoid the Audio2 DRQ on the 1788. 1999-03-17 02:39:59 +00:00
mycroft 81a1ade358 More redux:
* Use a single routine to halt both input and output on Audio1.
* Reduce the number of register reads/writes used to set up a channel.
* A few other minor things.
1999-03-17 01:06:17 +00:00
mycroft 84f100d175 Audio1 does not support 16-bit DMA. Eliminate some code that tried to handle
that case.
1999-03-16 14:17:00 +00:00
mycroft 13d43eb62b Fix old typo. 1999-03-16 13:37:23 +00:00
mycroft e085a0c921 A little more cleanup. 1999-03-16 13:32:25 +00:00
mycroft 28e080a143 Minor fix to some debugging output. 1999-03-16 13:24:27 +00:00
mycroft 9e041fd850 Adjustments for structure name changes. 1999-03-16 13:07:45 +00:00
mycroft 3e404912dc Clean up the previous:
* Separate the interrupt handlers based on which channel (audio1/audio2)
  rather than which direction (input/output).  Only register the handler for
  audio1 on the 1788.
* Since the input sides are actually the same, GC the duplicated code.
* Re-KNF in a bunch of places.
* Make this work again on the 1887 in the Shark.
1999-03-16 13:06:35 +00:00
thomas 3387d026d6 Include machine/bswap.h, needed on big endian machines. 1999-03-15 20:19:57 +00:00
drochner 1b9cb332aa Don't try to selftest the keyboard port. PC keyboard controllers have
shown up which break in 3 different ways, so the test is becoming
pointless.
1999-03-05 10:40:54 +00:00
nathanw bd7b26e37d Add ISA attachment for ess chips. 1999-03-02 20:42:10 +00:00
nathanw 64fffdfef9 Add support for the 1788 AudioDrive chip.
Some minor cleanup; refer to more registers by macros rather
than raw hex constants.
1999-03-02 20:36:50 +00:00
explorer 3ebb419571 Update to slightly altered rnd_attach_source() api 1999-02-28 17:08:05 +00:00
drochner 0d46b0d0fd Make "1" an acceptable result in port tests.
This is a workaround for crappy hardware, normal keyboard controllers
return a "0".
Should fix PR port-i386/6636 by Krister Walfridsson and problems
reported by chopps and fvdl.
1999-02-28 14:26:38 +00:00
nathanw 281bba9355 Update for minor changes in the ad1848 back end. 1999-02-23 21:16:27 +00:00
mycroft 71eb5693e6 Use DMAMODE_DEMAND. 1999-02-22 03:24:33 +00:00
mycroft 10817df7f0 Oops; remove obsolete code. 1999-02-22 02:33:48 +00:00
mycroft bd575a4ff6 Add support for demand mode with auto-init. 1999-02-22 02:32:43 +00:00
mycroft 529c6c50aa Use DMAMODE_LOOPDEMAND. Tested on a CS4231 in a WSS clone. 1999-02-22 02:25:20 +00:00
mycroft 7da867ec93 Use DMAMODE_LOOPDEMAND. Tested on a ViBRA16. 1999-02-22 02:16:40 +00:00
mycroft ea50d6f672 Use DMAMODE_LOOPDEMAND.
Fixes the audible glitches (due to FIFO underruns) when receiving network
packets on the Shark.
1999-02-22 01:57:33 +00:00
mycroft b81ad0de61 Fix the halt_input and halt_output routines to actually disable the channel,
not just the DMA FIFO.  Fixes problems with sample misalignment.
1999-02-20 23:28:37 +00:00
mycroft 1790450d8c Fix structure names. 1999-02-19 16:59:36 +00:00
mycroft 4449a6ef39 Kill vestiges of isa_establish(). 1999-02-19 16:15:06 +00:00
mycroft 4822d3d0b0 Move IRQ setup into frontend. Need to move DRQ handling as well. 1999-02-19 16:10:44 +00:00
mycroft 28bc4dfeca Oops; PCIC_INTR_ENABLE does something *very* different. 1999-02-19 03:14:00 +00:00
mycroft f2c4e7f8bd Use the correct interrupt sharing type, and set PCIC_INTR_ENABLE(!). 1999-02-18 23:41:40 +00:00
mycroft 18e341a954 Add separate halt_input and halt_output methods in ad1848_isa, which disable
the DMA channel.
1999-02-18 17:27:39 +00:00
mycroft 9907eda026 spaces -> tabs 1999-02-18 16:09:01 +00:00
mycroft 81bc49921a Remove some superfluous softc elements. 1999-02-18 15:47:29 +00:00
mycroft 5e2fc07a14 Add separate halt_output and halt_input routines. 1999-02-18 07:08:35 +00:00
mycroft 27963c294a Use the trigger interface, and clean up a pile of cruft. 1999-02-17 23:05:28 +00:00
mycroft 71105fbda7 Update comments. 1999-02-17 21:44:55 +00:00
mycroft 7741cae143 Fix slight ommission in previous. 1999-02-17 02:43:13 +00:00
mycroft e5f5e628d2 Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.
1999-02-17 02:37:38 +00:00
mycroft 88ad3aa42b If we have an 8-bit DRQ, always pass that to isa_malloc(). 1999-02-17 01:22:47 +00:00
is 2c7fa23c38 Fix Copyright dates 1999-02-16 23:34:10 +00:00
is dc068e0d1f Assign my files to The NetBSD Foundation, Inc. 1999-02-16 22:46:55 +00:00