if ( sscape_sb_enable ) i |= devc->ic_type == IC_ODIE ? 0x05 : 0x07; 
static void __init sscape_pnp_init_hw(sscape_info* devc){		unsigned char midi_irq = 0, sb_irq = 0;	unsigned i;	static	char code_file_name[23] = "/sndscape/sndscape.cox";		int sscape_sb_enable		= 0;	int sscape_joystic_enable	= 0x7f;	int sscape_mic_enable		= 0;	int sscape_ext_midi		= 0;			if ( !sscape_pnp_alloc_dma(devc) ) {		printk(KERN_ERR "sscape: faild to allocate dma\n");		return;	}	for (i = 0; i < 4; i++) {		if ( devc -> irq   == valid_interrupts[i] ) 			midi_irq = i;		if ( devc -> codec_irq == valid_interrupts[i] ) 			sb_irq = i;	}	sscape_write( devc, 5, 0x50);	sscape_write( devc, 7, 0x2e);	sscape_write( devc, 8, 0x00);	sscape_write( devc, 2, devc->ic_type == IC_ODIE ? 0x70 : 0x40);	sscape_write( devc, 3, ( devc -> dma << 4) | 0x80);	if ( sscape_sb_enable )		sscape_write (devc, 4, 0xF0 | (sb_irq << 2) | midi_irq);	else			sscape_write (devc, 4, 0xF0 | (midi_irq<<2) | midi_irq);	i = 0x10; //sscape_read(devc, 9) & (devc->ic_type == IC_ODIE ? 0xf0 : 0xc0);	if ( sscape_sb_enable )		i |= devc->ic_type == IC_ODIE ? 0x05 : 0x07;	    	if (sscape_joystic_enable) i |= 8;		sscape_write (devc, 9, i);	sscape_write (devc, 6, 0x80);	sscape_write (devc, 1, 0x80);	if (devc -> codec_type == 2) {		sscape_pnp_write_codec( devc, 0x0C, 0x50);		sscape_pnp_write_codec( devc, 0x10, sscape_pnp_read_codec( devc, 0x10) & 0x3F);		sscape_pnp_write_codec( devc, 0x11, sscape_pnp_read_codec( devc, 0x11) | 0xC0);		sscape_pnp_write_codec( devc, 29, 0x20);	}	if (sscape_pnp_upload_file(devc, "/sndscape/scope.cod") == 0 ) {		printk(KERN_ERR "sscape: faild to upload file /sndscape/scope.cod\n");		sscape_pnp_free_dma(devc);		return;	}	i = sscape_read_host_ctrl( devc );		if ( (i & 0x0F) >  7 ) {		printk(KERN_ERR "sscape: scope.cod faild\n");		sscape_pnp_free_dma(devc);		return;	}	if ( i & 0x10 ) sscape_write( devc, 7, 0x2F);	code_file_name[21] = (char) ( i & 0x0F) + 0x30;	if (sscape_pnp_upload_file( devc, code_file_name) == 0) {		printk(KERN_ERR "sscape: faild to upload file %s\n", code_file_name);		sscape_pnp_free_dma(devc);		return;	}		if (devc->ic_type != IC_ODIE) {		sscape_pnp_write_codec( devc, 10, (sscape_pnp_read_codec(devc, 10) & 0x7f) |		 ( sscape_mic_enable == 0 ? 0x00 : 0x80) );	}	sscape_write_host_ctrl2( devc, 0x84, 0x64 );  /* MIDI volume */	sscape_write_host_ctrl2( devc, 0x86, 0x64 );  /* MIDI volume?? */	sscape_write_host_ctrl2( devc, 0x8A, sscape_ext_midi);	sscape_pnp_write_codec ( devc, 6, 0x3f ); //WAV_VOL	sscape_pnp_write_codec ( devc, 7, 0x3f ); //WAV_VOL	sscape_pnp_write_codec ( devc, 2, 0x1F ); //WD_CDXVOLL	sscape_pnp_write_codec ( devc, 3, 0x1F ); //WD_CDXVOLR	if (devc -> codec_type == 1) {		sscape_pnp_write_codec ( devc, 4, 0x1F );		sscape_pnp_write_codec ( devc, 5, 0x1F );		sscape_write_host_ctrl2( devc, 0x88, sscape_mic_enable);	} else {		int t;		sscape_pnp_write_codec ( devc, 0x10, 0x1F << 1);		sscape_pnp_write_codec ( devc, 0x11, 0xC0 | (0x1F << 1));		t = sscape_pnp_read_codec( devc, 0x00) & 0xDF;		if ( (sscape_mic_enable == 0)) t |= 0;		else t |= 0x20;		sscape_pnp_write_codec ( devc, 0x00, t);		t = sscape_pnp_read_codec( devc, 0x01) & 0xDF;		if ( (sscape_mic_enable == 0) ) t |= 0;		else t |= 0x20;		sscape_pnp_write_codec ( devc, 0x01, t);		sscape_pnp_write_codec ( devc, 0x40 | 29 , 0x20);		outb(0, devc -> codec);	}	if (devc -> ic_type == IC_OPUS ) {		int i = sscape_read( devc, 9 );		sscape_write( devc, 9, i | 3 );		sscape_write( devc, 3, 0x40);		if (request_region(0x228, 1, "sscape setup junk")) {			outb(0, 0x228);			release_region(0x228,1);		}		sscape_write( devc, 3, (devc -> dma << 4) | 0x80);		sscape_write( devc, 9, i );	}		host_close ( devc );	sscape_pnp_free_dma(devc);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f25ad2d3b886e61d7ec03a3bdefc22871c14e9da/sscape.c/buggy/sound/oss/sscape.c