コード例 #1
0
ファイル: doswss.c プロジェクト: LighFusion/surreal
/* Open WSS for usage */
boolean wss_open()
{
	__dpmi_meminfo struct_info;

	if (!wss.ok)
		if (!wss_detect())
			return FALSE;

	if (wss.open)
		return FALSE;

	/* Now lock the wss structure in memory */
	struct_info.address = __djgpp_base_address + (unsigned long)&wss;
	struct_info.size = sizeof(wss);
	if (__dpmi_lock_linear_region(&struct_info))
		return FALSE;

	/* Hook the WSS IRQ */
	wss.irq_handle =
	  irq_hook(wss.irq, wss_irq, (long)wss_irq_end - (long)wss_irq);
	if (!wss.irq_handle) {
		__dpmi_unlock_linear_region(&struct_info);
		return FALSE;
	}

	/* Enable the interrupt */
	irq_enable(wss.irq_handle);
	if (wss.irq > 7)
		_irq_enable(2);

	wss.open++;

	return TRUE;
}
コード例 #2
0
static int __devinit galaxy_wss_config(struct snd_galaxy *galaxy, u8 wss_config)
{
    int err;

    err = wss_detect(galaxy->wss_port);
    if (err < 0)
        return err;

    wss_set_config(galaxy->wss_port, wss_config);

    err = galaxy_set_mode(galaxy, GALAXY_MODE_WSS);
    if (err < 0)
        return err;

    return 0;
}
コード例 #3
0
ファイル: drv_wss.c プロジェクト: Bracket-/psp-ports
static BOOL WSS_IsThere(void)
{
	return wss_detect();
}