示例#1
0
void
soundcard_init (void)
{
#ifndef MODULE
  module_register_chrdev (sound_major, "sound", &sound_fops);
  chrdev_registered = 1;
#endif

  soundcard_configured = 1;

  sndtable_init ();		/* Initialize call tables and detect cards */



#ifdef CONFIG_LOWLEVEL_SOUND
  {
    extern void     sound_init_lowlevel_drivers (void);

    sound_init_lowlevel_drivers ();
  }
#endif

  if (sndtable_get_cardcount () == 0)
    return;			/* No cards detected */

#ifdef CONFIG_AUDIO
  if (num_audiodevs)		/* Audio devices present */
    {
      DMAbuf_init ();
      audio_init ();
    }
#endif

#ifdef CONFIG_MIDI
  if (num_midis)
    MIDIbuf_init ();
#endif

#ifdef CONFIG_SEQUENCER
  if (num_midis + num_synths)
    sequencer_init ();
#endif

}
示例#2
0
static void
start_services()
{
    int   soundcards_installed;

    if (!(soundcards_installed = sndtable_get_cardcount()))
        return ;	/* No cards detected */

#ifdef CONFIG_AUDIO
    if (num_audiodevs)	/* Audio devices present */
        DMAbuf_init();
#endif

#ifdef CONFIG_MIDI
    if (num_midis)
        /* MIDIbuf_init(0) */;
#endif

#ifdef CONFIG_SEQUENCER
    if (num_midis + num_synths)
        sequencer_init();
#endif
}