Esempio n. 1
0
File: seq.c Progetto: 3null/linux
static int __init alsa_seq_init(void)
{
	int err;

	snd_seq_autoload_lock();
	if ((err = client_init_data()) < 0)
		goto error;

	/* init memory, room for selected events */
	if ((err = snd_sequencer_memory_init()) < 0)
		goto error;

	/* init event queues */
	if ((err = snd_seq_queues_init()) < 0)
		goto error;

	/* register sequencer device */
	if ((err = snd_sequencer_device_init()) < 0)
		goto error;

	/* register proc interface */
	if ((err = snd_seq_info_init()) < 0)
		goto error;

	/* register our internal client */
	if ((err = snd_seq_system_client_init()) < 0)
		goto error;

 error:
	snd_seq_autoload_unlock();
	return err;
}
Esempio n. 2
0
static int __init alsa_seq_init(void)
{
	int err;

	snd_seq_autoload_lock();
	if ((err = client_init_data()) < 0)
		goto error;

	/*                                       */
	if ((err = snd_sequencer_memory_init()) < 0)
		goto error;

	/*                   */
	if ((err = snd_seq_queues_init()) < 0)
		goto error;

	/*                           */
	if ((err = snd_sequencer_device_init()) < 0)
		goto error;

	/*                         */
	if ((err = snd_seq_info_init()) < 0)
		goto error;

	/*                              */
	if ((err = snd_seq_system_client_init()) < 0)
		goto error;

 error:
	snd_seq_autoload_unlock();
	return err;
}
static int __init alsa_seq_dummy_init(void)
{
	int err;
	snd_seq_autoload_lock();
	err = register_client();
	snd_seq_autoload_unlock();
	return err;
}
Esempio n. 4
0
static int __init alsa_seq_midi_init(void)
{
	static struct snd_seq_dev_ops ops = {
		snd_seq_midisynth_register_port,
		snd_seq_midisynth_unregister_port,
	};
	memset(&synths, 0, sizeof(synths));
	snd_seq_autoload_lock();
	snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_MIDISYNTH, &ops, 0);
	snd_seq_autoload_unlock();
	return 0;
}
Esempio n. 5
0
static int __init alsa_seq_oss_init(void)
{
    int rc;
    static struct snd_seq_dev_ops ops = {
        snd_seq_oss_synth_register,
        snd_seq_oss_synth_unregister,
    };

    snd_seq_autoload_lock();
    if ((rc = register_device()) < 0)
        goto error;
    if ((rc = register_proc()) < 0) {
        unregister_device();
        goto error;
    }
    if ((rc = snd_seq_oss_create_client()) < 0) {
        unregister_proc();
        unregister_device();
        goto error;
    }

    if ((rc = snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OSS, &ops,
              sizeof(struct snd_seq_oss_reg))) < 0) {
        snd_seq_oss_delete_client();
        unregister_proc();
        unregister_device();
        goto error;
    }

    /* success */
    snd_seq_oss_synth_init();

error:
    snd_seq_autoload_unlock();
    return rc;
}