Lines Matching full:galaxy

165  * Aztech Sound Galaxy specifics
372 static int galaxy_init(struct snd_galaxy *galaxy, u8 *type) in galaxy_init() argument
378 err = dsp_reset(galaxy->port); in galaxy_init()
382 err = dsp_get_version(galaxy->port, &major, &minor); in galaxy_init()
389 err = dsp_command(galaxy->port, DSP_COMMAND_GALAXY_8); in galaxy_init()
393 err = dsp_command(galaxy->port, GALAXY_COMMAND_GET_TYPE); in galaxy_init()
397 err = dsp_get_byte(galaxy->port, type); in galaxy_init()
404 static int galaxy_set_mode(struct snd_galaxy *galaxy, u8 mode) in galaxy_set_mode() argument
408 err = dsp_command(galaxy->port, DSP_COMMAND_GALAXY_9); in galaxy_set_mode()
412 err = dsp_command(galaxy->port, mode); in galaxy_set_mode()
420 err = dsp_reset(galaxy->port); in galaxy_set_mode()
428 static void galaxy_set_config(struct snd_galaxy *galaxy, u32 config) in galaxy_set_config() argument
430 u8 tmp = ioread8(galaxy->config_port + CONFIG_PORT_SET); in galaxy_set_config()
433 iowrite8(tmp | 0x80, galaxy->config_port + CONFIG_PORT_SET); in galaxy_set_config()
435 iowrite8(config, galaxy->config_port + i); in galaxy_set_config()
438 iowrite8(tmp & 0x7f, galaxy->config_port + CONFIG_PORT_SET); in galaxy_set_config()
442 static void galaxy_config(struct snd_galaxy *galaxy, u32 config) in galaxy_config() argument
447 u8 tmp = ioread8(galaxy->config_port + i - 1); in galaxy_config()
448 galaxy->config = (galaxy->config << 8) | tmp; in galaxy_config()
450 config |= galaxy->config & GALAXY_CONFIG_MASK; in galaxy_config()
451 galaxy_set_config(galaxy, config); in galaxy_config()
454 static int galaxy_wss_config(struct snd_galaxy *galaxy, u8 wss_config) in galaxy_wss_config() argument
458 err = wss_detect(galaxy->wss_port); in galaxy_wss_config()
462 wss_set_config(galaxy->wss_port, wss_config); in galaxy_wss_config()
464 err = galaxy_set_mode(galaxy, GALAXY_MODE_WSS); in galaxy_wss_config()
473 struct snd_galaxy *galaxy = card->private_data; in snd_galaxy_free() local
475 if (galaxy->wss_port) in snd_galaxy_free()
476 wss_set_config(galaxy->wss_port, 0); in snd_galaxy_free()
477 if (galaxy->config_port) in snd_galaxy_free()
478 galaxy_set_config(galaxy, galaxy->config); in snd_galaxy_free()
483 struct snd_galaxy *galaxy; in __snd_galaxy_probe() local
490 sizeof(*galaxy), &card); in __snd_galaxy_probe()
495 galaxy = card->private_data; in __snd_galaxy_probe()
497 galaxy->res_port = devm_request_region(dev, port[n], 16, DRV_NAME); in __snd_galaxy_probe()
498 if (!galaxy->res_port) { in __snd_galaxy_probe()
503 galaxy->port = devm_ioport_map(dev, port[n], 16); in __snd_galaxy_probe()
504 if (!galaxy->port) in __snd_galaxy_probe()
507 err = galaxy_init(galaxy, &type); in __snd_galaxy_probe()
509 dev_err(dev, "did not find a Sound Galaxy at %#lx\n", port[n]); in __snd_galaxy_probe()
512 dev_info(dev, "Sound Galaxy (type %d) found at %#lx\n", type, port[n]); in __snd_galaxy_probe()
514 galaxy->res_config_port = in __snd_galaxy_probe()
517 if (!galaxy->res_config_port) { in __snd_galaxy_probe()
523 galaxy->config_port = in __snd_galaxy_probe()
525 if (!galaxy->config_port) in __snd_galaxy_probe()
527 galaxy_config(galaxy, config[n]); in __snd_galaxy_probe()
529 galaxy->res_wss_port = devm_request_region(dev, wss_port[n], 4, DRV_NAME); in __snd_galaxy_probe()
530 if (!galaxy->res_wss_port) { in __snd_galaxy_probe()
535 galaxy->wss_port = devm_ioport_map(dev, wss_port[n], 4); in __snd_galaxy_probe()
536 if (!galaxy->wss_port) in __snd_galaxy_probe()
539 err = galaxy_wss_config(galaxy, wss_config[n]); in __snd_galaxy_probe()