root/drivers/sound/sb_card.c

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

DEFINITIONS

This source file includes following definitions.
  1. attach_sb_card
  2. probe_sb
  3. unload_sb

   1 /*
   2  * sound/sb_card.c
   3  *
   4  * Detection routine for the SoundBlaster cards.
   5  *
   6  * Copyright by Hannu Savolainen 1993
   7  *
   8  * Redistribution and use in source and binary forms, with or without
   9  * modification, are permitted provided that the following conditions are
  10  * met: 1. Redistributions of source code must retain the above copyright
  11  * notice, this list of conditions and the following disclaimer. 2.
  12  * Redistributions in binary form must reproduce the above copyright notice,
  13  * this list of conditions and the following disclaimer in the documentation
  14  * and/or other materials provided with the distribution.
  15  *
  16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
  17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
  20  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  22  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  23  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  26  * SUCH DAMAGE.
  27  *
  28  * Modified:
  29  *  Riccardo Facchetti  24 Mar 1995
  30  *  - Added the Audio Excel DSP 16 initialization routine.
  31  */
  32 
  33 #include "sound_config.h"
  34 
  35 #if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB)
  36 
  37 #include "sb.h"
  38 
  39 long
  40 attach_sb_card (long mem_start, struct address_info *hw_config)
     /* [previous][next][first][last][top][bottom][index][help] */
  41 {
  42 #if !defined(EXCLUDE_AUDIO) || !defined(EXCLUDE_MIDI)
  43   if (!sb_dsp_detect (hw_config))
  44     return mem_start;
  45   mem_start = sb_dsp_init (mem_start, hw_config);
  46   request_region (hw_config->io_base, 16, "SB");
  47 #endif
  48 
  49   return mem_start;
  50 }
  51 
  52 int
  53 probe_sb (struct address_info *hw_config)
     /* [previous][next][first][last][top][bottom][index][help] */
  54 {
  55   if (check_region (hw_config->io_base, 16))
  56     {
  57       printk ("\n\nsb_dsp.c: I/O port %x already in use\n\n",
  58               hw_config->io_base);
  59       return 0;
  60     }
  61 
  62 #if !defined(EXCLUDE_AEDSP16) && defined(AEDSP16_SBPRO)
  63   /*
  64      * Initialize Audio Excel DSP 16 to SBPRO.
  65    */
  66   InitAEDSP16_SBPRO (hw_config);
  67 #endif
  68   return sb_dsp_detect (hw_config);
  69 }
  70 
  71 void
  72 unload_sb (struct address_info *hw_config)
     /* [previous][next][first][last][top][bottom][index][help] */
  73 {
  74   release_region (hw_config->io_base, 16);
  75   sb_dsp_unload ();
  76 }
  77 
  78 #endif

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