void attach_sgalaxy( struct address_info *ai ) { int n; request_region( ai->ai_sgbase, 0x10, "SoundGalaxy SB" ); attach_ms_sound( ai ); n=ai->slots[0]; if (n!=-1 && audio_devs[n]->mixer_dev != -1 ) { AD1848_REROUTE( SOUND_MIXER_LINE1, SOUND_MIXER_LINE ); /* Line-in */ AD1848_REROUTE( SOUND_MIXER_LINE2, SOUND_MIXER_SYNTH ); /* FM+Wavetable*/ AD1848_REROUTE( SOUND_MIXER_LINE3, SOUND_MIXER_CD ); /* CD */ } }
static void __init attach_opl3sa2_mss(struct address_info* hw_config) { int initial_mixers; initial_mixers = num_mixers; attach_ms_sound(hw_config, THIS_MODULE); /* Slot 0 */ if(hw_config->slots[0] != -1) { /* Did the MSS driver install? */ if(num_mixers == (initial_mixers + 1)) { /* The MSS mixer is installed, reroute mixers appropiately */ AD1848_REROUTE(SOUND_MIXER_LINE1, SOUND_MIXER_CD); AD1848_REROUTE(SOUND_MIXER_LINE2, SOUND_MIXER_SYNTH); AD1848_REROUTE(SOUND_MIXER_LINE3, SOUND_MIXER_LINE); } else { printk(KERN_ERR "opl3sa2: MSS mixer not installed?\n"); } } }
static void __init attach_opl3sa2_mss(struct address_info *hw_config) { char mixer_name[64]; /* Create pretty names for mixer stuff */ strncpy(mixer_name, chipset_name, 16); strncat(mixer_name, " and AD1848 (through MSS)", 64); strncpy(opl3sa2_mixer_operations.name, chipset_name, 16); strncat(opl3sa2_mixer_operations.name, "-AD1848", 64); /* Install master mixer */ devc->ad_mixer_dev = -1; if((opl3sa2_mixer = sound_install_mixer(MIXER_DRIVER_VERSION, mixer_name, &opl3sa2_mixer_operations, sizeof(struct mixer_operations), devc)) < 0) { printk(KERN_ERR "Could not install %s master mixer\n", chipset_name); return; } opl3sa2_mixer_reset(devc); attach_ms_sound(hw_config, THIS_MODULE); /* Slot 0 */ if(hw_config->slots[0] != -1) { /* Did the MSS driver install? */ if(num_mixers == (opl3sa2_mixer + 2)) { /* The MSS mixer is installed */ devc->ad_mixer_dev = audio_devs[hw_config->slots[0]]->mixer_dev; /* Reroute mixers appropiately */ AD1848_REROUTE(SOUND_MIXER_LINE1, SOUND_MIXER_CD); AD1848_REROUTE(SOUND_MIXER_LINE2, SOUND_MIXER_SYNTH); AD1848_REROUTE(SOUND_MIXER_LINE3, SOUND_MIXER_LINE); } } }