root/drivers/sound/adlib_card.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. attach_adlib_card
  2. probe_adlib
  3. unload_adlib

   1 /*
   2  * sound/adlib_card.c
   3  *
   4  * Detection routine for the AdLib card.
   5  */
   6 
   7 /*
   8  * Copyright by Hannu Savolainen 1993-1996
   9  *
  10  * Redistribution and use in source and binary forms, with or without
  11  * modification, are permitted provided that the following conditions are
  12  * met: 1. Redistributions of source code must retain the above copyright
  13  * notice, this list of conditions and the following disclaimer. 2.
  14  * Redistributions in binary form must reproduce the above copyright notice,
  15  * this list of conditions and the following disclaimer in the documentation
  16  * and/or other materials provided with the distribution.
  17  *
  18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
  19  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  20  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  21  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
  22  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  23  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  24  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  25  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  26  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  27  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  28  * SUCH DAMAGE.
  29  */
  30 #include <linux/config.h>
  31 
  32 
  33 #include "sound_config.h"
  34 
  35 #if defined(CONFIG_YM3812)
  36 
  37 long
  38 attach_adlib_card (long mem_start, struct address_info *hw_config)
     /* [previous][next][first][last][top][bottom][index][help] */
  39 {
  40 
  41   mem_start = opl3_init (mem_start, hw_config->io_base, hw_config->osp);
  42   request_region (hw_config->io_base, 4, "OPL3/OPL2");
  43 
  44   return mem_start;
  45 }
  46 
  47 int
  48 probe_adlib (struct address_info *hw_config)
     /* [previous][next][first][last][top][bottom][index][help] */
  49 {
  50 
  51   if (check_region (hw_config->io_base, 4))
  52     {
  53       printk ("\n\nopl3.c: I/O port %x already in use\n\n", hw_config->io_base);
  54       return 0;
  55     }
  56 
  57   return opl3_detect (hw_config->io_base, hw_config->osp);
  58 }
  59 
  60 void
  61 unload_adlib (struct address_info *hw_config)
     /* [previous][next][first][last][top][bottom][index][help] */
  62 {
  63   release_region (hw_config->io_base, 4);
  64 }
  65 
  66 
  67 #endif

/* [previous][next][first][last][top][bottom][index][help] */