static int __init init_sscape(void)
{
	printk(KERN_INFO "Soundscape driver Copyright (C) by Hannu Savolainen 1993-1996\n");
	
	cfg.irq = irq;
	cfg.dma = dma;
	cfg.io_base = io;

	cfg_mpu.irq = mpu_irq;
	cfg_mpu.io_base = mpu_io;
	/* WEH - Try to get right dma channel */
        cfg_mpu.dma = dma;
	
	devc->codec = cfg.io_base;
	devc->codec_irq = cfg.irq;
	devc->codec_type = 0;
	devc->ic_type = 0;
	devc->raw_buf = NULL;
	spin_lock_init(&devc->lock);

	if (cfg.dma == -1 || cfg.irq == -1 || cfg.io_base == -1) {
		printk(KERN_ERR "DMA, IRQ, and IO port must be specified.\n");
		return -EINVAL;
	}
	
	if (cfg_mpu.irq == -1 && cfg_mpu.io_base != -1) {
		printk(KERN_ERR "MPU_IRQ must be specified if MPU_IO is set.\n");
		return -EINVAL;
	}
	
	if(spea != -1) {
		old_hardware = spea;
		printk(KERN_INFO "Forcing %s hardware support.\n",
			spea?"new":"old");
	}	
	if (probe_sscape(&cfg_mpu) == 0)
		return -ENODEV;

	attach_sscape(&cfg_mpu);
	
	mss = probe_ss_ms_sound(&cfg);

	if (mss)
		attach_ss_ms_sound(&cfg);

	return 0;
}
Example #2
0
int init_module(void)
{
	printk(KERN_INFO "Soundscape driver Copyright (C) by Hannu Savolainen 1993-1996\n");
	if (dma == -1 || irq == -1 || io == -1)
	{
		printk(KERN_ERR "DMA, IRQ, and IO port must be specified.\n");
		return -EINVAL;
	}
	if (mpu_irq == -1 && mpu_io != -1)
	{
		  printk(KERN_ERR "CONFIG_MPU_IRQ must be specified if CONFIG_MPU_IO is set.\n");
		  return -EINVAL;
	}
	config.irq = irq;
	config.dma = dma;
	config.io_base = io;

	mpu_config.irq = mpu_irq;
	mpu_config.io_base = mpu_io;

	if(spea != -1)
	{
		old_hardware = spea;
		printk(KERN_INFO "Forcing %s hardware support.\n",
			spea?"new":"old");
	}	
	if (probe_sscape(&mpu_config) == 0)
		return -ENODEV;

	attach_sscape(&mpu_config);
	
	mss = probe_ss_ms_sound(&config);

	if (mss)
		attach_ss_ms_sound(&config);
	SOUND_LOCK;
	return 0;
}