Lines Matching defs:galaxy

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