/[openvortex]/alsa/alsa-kernel/core/rawmidi.c
ViewVC logotype

Diff of /alsa/alsa-kernel/core/rawmidi.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by vizard, Sun Jun 15 21:01:30 2003 UTC revision 1.3 by vizard, Mon Aug 11 00:06:38 2003 UTC
# Line 1437  static int snd_rawmidi_dev_free(snd_devi Line 1437  static int snd_rawmidi_dev_free(snd_devi
1437          return snd_rawmidi_free(rmidi);          return snd_rawmidi_free(rmidi);
1438  }  }
1439    
1440  #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)  #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
1441  static void snd_rawmidi_dev_seq_free(snd_seq_device_t *device)  static void snd_rawmidi_dev_seq_free(snd_seq_device_t *device)
1442  {  {
1443          snd_rawmidi_t *rmidi = snd_magic_cast(snd_rawmidi_t, device->private_data, return);          snd_rawmidi_t *rmidi = snd_magic_cast(snd_rawmidi_t, device->private_data, return);
# Line 1513  static int snd_rawmidi_dev_register(snd_ Line 1513  static int snd_rawmidi_dev_register(snd_
1513                  }                  }
1514          }          }
1515          rmidi->proc_entry = entry;          rmidi->proc_entry = entry;
1516  #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)  #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
1517          if (!rmidi->ops || !rmidi->ops->dev_register) { /* own registration mechanism */          if (!rmidi->ops || !rmidi->ops->dev_register) { /* own registration mechanism */
1518                  if (snd_seq_device_new(rmidi->card, rmidi->device, SNDRV_SEQ_DEV_ID_MIDISYNTH, 0, &rmidi->seq_dev) >= 0) {                  if (snd_seq_device_new(rmidi->card, rmidi->device, SNDRV_SEQ_DEV_ID_MIDISYNTH, 0, &rmidi->seq_dev) >= 0) {
1519                          rmidi->seq_dev->private_data = rmidi;                          rmidi->seq_dev->private_data = rmidi;
# Line 1568  static int snd_rawmidi_dev_unregister(sn Line 1568  static int snd_rawmidi_dev_unregister(sn
1568                  rmidi->ops->dev_unregister(rmidi);                  rmidi->ops->dev_unregister(rmidi);
1569          snd_unregister_device(SNDRV_DEVICE_TYPE_RAWMIDI, rmidi->card, rmidi->device);          snd_unregister_device(SNDRV_DEVICE_TYPE_RAWMIDI, rmidi->card, rmidi->device);
1570          up(&register_mutex);          up(&register_mutex);
1571  #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)  #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
1572          if (rmidi->seq_dev) {          if (rmidi->seq_dev) {
1573                  snd_device_free(rmidi->card, rmidi->seq_dev);                  snd_device_free(rmidi->card, rmidi->seq_dev);
1574                  rmidi->seq_dev = NULL;                  rmidi->seq_dev = NULL;
# Line 1630  static void __exit alsa_rawmidi_exit(voi Line 1630  static void __exit alsa_rawmidi_exit(voi
1630  module_init(alsa_rawmidi_init)  module_init(alsa_rawmidi_init)
1631  module_exit(alsa_rawmidi_exit)  module_exit(alsa_rawmidi_exit)
1632    
1633    #ifndef MODULE
1634    #ifdef CONFIG_SND_OSSEMUL
1635    /* format is: snd-rawmidi=midi_map,amidi_map */
1636    
1637    static int __init alsa_rawmidi_setup(char *str)
1638    {
1639            static unsigned __initdata nr_dev = 0;
1640    
1641            if (nr_dev >= SNDRV_CARDS)
1642                    return 0;
1643            (void)(get_option(&str,&midi_map[nr_dev]) == 2 &&
1644                   get_option(&str,&amidi_map[nr_dev]) == 2);
1645            nr_dev++;
1646            return 1;
1647    }
1648    
1649    __setup("snd-rawmidi=", alsa_rawmidi_setup);
1650    #endif /* CONFIG_SND_OSSEMUL */
1651    #endif /* ifndef MODULE */
1652    
1653  EXPORT_SYMBOL(snd_rawmidi_output_params);  EXPORT_SYMBOL(snd_rawmidi_output_params);
1654  EXPORT_SYMBOL(snd_rawmidi_input_params);  EXPORT_SYMBOL(snd_rawmidi_input_params);
1655  EXPORT_SYMBOL(snd_rawmidi_drop_output);  EXPORT_SYMBOL(snd_rawmidi_drop_output);

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26