亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? macboing.c

?? linux2.6.16版本
?? C
字號:
/* *	Mac bong noise generator. Note - we ought to put a boingy noise *	here 8) * *	---------------------------------------------------------------------- *	16.11.98: *	rewrote some functions, added support for Enhanced ASC (Quadras) *	after the NetBSD asc.c console bell patch by Colin Wood/Frederick Bruck *	Juergen Mellinger (juergen.mellinger@t-online.de) */#include <linux/sched.h>#include <linux/timer.h>#include <asm/macintosh.h>#include <asm/mac_asc.h>static int mac_asc_inited;/* * dumb triangular wave table */static __u8 mac_asc_wave_tab[ 0x800 ];/* * Alan's original sine table; needs interpolating to 0x800 * (hint: interpolate or hardwire [0 -> Pi/2[, it's symmetric) */static const signed char sine_data[] = {	0,  39,  75,  103,  121,  127,  121,  103,  75,  39,	0, -39, -75, -103, -121, -127, -121, -103, -75, -39};/* * where the ASC hides ... */static volatile __u8* mac_asc_regs = ( void* )0x50F14000;/* * sample rate; is this a good default value? */static unsigned long mac_asc_samplespersec = 11050;static int mac_bell_duration;static unsigned long mac_bell_phase; /* 0..2*Pi -> 0..0x800 (wavetable size) */static unsigned long mac_bell_phasepersample;/* * some function protos */static void mac_init_asc( void );static void mac_nosound( unsigned long );static void mac_quadra_start_bell( unsigned int, unsigned int, unsigned int );static void mac_quadra_ring_bell( unsigned long );static void mac_av_start_bell( unsigned int, unsigned int, unsigned int );static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int );/* * our timer to start/continue/stop the bell */static DEFINE_TIMER(mac_sound_timer, mac_nosound, 0, 0);/* * Sort of initialize the sound chip (called from mac_mksound on the first * beep). */static void mac_init_asc( void ){	int i;	/*	 * do some machine specific initialization	 * BTW:	 * the NetBSD Quadra patch identifies the Enhanced Apple Sound Chip via	 *	mac_asc_regs[ 0x800 ] & 0xF0 != 0	 * this makes no sense here, because we have to set the default sample	 * rate anyway if we want correct frequencies	 */	switch ( macintosh_config->ident )	{		case MAC_MODEL_IIFX:			/*			 * The IIfx is always special ...			 */			mac_asc_regs = ( void* )0x50010000;			break;			/*			 * not sure about how correct this list is			 * machines with the EASC enhanced apple sound chip			 */		case MAC_MODEL_Q630:		case MAC_MODEL_P475:			mac_special_bell = mac_quadra_start_bell;			mac_asc_samplespersec = 22150;			break;		case MAC_MODEL_C660:		case MAC_MODEL_Q840:			/*			 * The Quadra 660AV and 840AV use the "Singer" custom ASIC for sound I/O.			 * It appears to be similar to the "AWACS" custom ASIC in the Power Mac			 * [678]100.  Because Singer and AWACS may have a similar hardware			 * interface, this would imply that the code in drivers/sound/dmasound.c			 * for AWACS could be used as a basis for Singer support.  All we have to			 * do is figure out how to do DMA on the 660AV/840AV through the PSC and			 * figure out where the Singer hardware sits in memory. (I'd look in the			 * vicinity of the AWACS location in a Power Mac [678]100 first, or the			 * current location of the Apple Sound Chip--ASC--in other Macs.)  The			 * Power Mac [678]100 info can be found in MkLinux Mach kernel sources.			 *			 * Quoted from Apple's Tech Info Library, article number 16405:			 *   "Among desktop Macintosh computers, only the 660AV, 840AV, and Power			 *   Macintosh models have 16-bit audio input and output capability			 *   because of the AT&T DSP3210 hardware circuitry and the 16-bit Singer			 *   codec circuitry in the AVs.  The Audio Waveform Amplifier and			 *   Converter (AWAC) chip in the Power Macintosh performs the same			 *   16-bit I/O functionality.  The PowerBook 500 series computers			 *   support 16-bit stereo output, but only mono input."			 *			 *   http://til.info.apple.com/techinfo.nsf/artnum/n16405			 *			 * --David Kilzer			 */			mac_special_bell = mac_av_start_bell;			break;		case MAC_MODEL_Q650:		case MAC_MODEL_Q700:		case MAC_MODEL_Q800:		case MAC_MODEL_Q900:		case MAC_MODEL_Q950:			/*			 * Currently not implemented!			 */			mac_special_bell = NULL;			break;		default:			/*			 * Every switch needs a default			 */			mac_special_bell = NULL;			break;	}	/*	 * init the wave table with a simple triangular wave	 * A sine wave would sure be nicer here ...	 */	for ( i = 0; i < 0x400; i++ )	{		mac_asc_wave_tab[ i ] = i / 4;		mac_asc_wave_tab[ i + 0x400 ] = 0xFF - i / 4;	}	mac_asc_inited = 1;}/* * Called to make noise; current single entry to the boing driver. * Does the job for simple ASC, calls other routines else. * XXX Fixme: * Should be split into asc_mksound, easc_mksound, av_mksound and * function pointer set in mac_init_asc which would be called at * init time. * _This_ is rather ugly ... */void mac_mksound( unsigned int freq, unsigned int length ){	__u32 cfreq = ( freq << 5 ) / 468;	__u32 flags;	int i;	if ( mac_special_bell == NULL )	{		/* Do nothing */		return;	}	if ( !mac_asc_inited )		mac_init_asc();	if ( mac_special_bell )	{		mac_special_bell( freq, length, 128 );		return;	}	if ( freq < 20 || freq > 20000 || length == 0 )	{		mac_nosound( 0 );		return;	}	local_irq_save(flags);	del_timer( &mac_sound_timer );	for ( i = 0; i < 0x800; i++ )		mac_asc_regs[ i ] = 0;	for ( i = 0; i < 0x800; i++ )		mac_asc_regs[ i ] = mac_asc_wave_tab[ i ];	for ( i = 0; i < 8; i++ )		*( __u32* )( ( __u32 )mac_asc_regs + ASC_CONTROL + 0x814 + 8 * i ) = cfreq;	mac_asc_regs[ 0x807 ] = 0;	mac_asc_regs[ ASC_VOLUME ] = 128;	mac_asc_regs[ 0x805 ] = 0;	mac_asc_regs[ 0x80F ] = 0;	mac_asc_regs[ ASC_MODE ] = ASC_MODE_SAMPLE;	mac_asc_regs[ ASC_ENABLE ] = ASC_ENABLE_SAMPLE;	mac_sound_timer.expires = jiffies + length;	add_timer( &mac_sound_timer );	local_irq_restore(flags);}/* * regular ASC: stop whining .. */static void mac_nosound( unsigned long ignored ){	mac_asc_regs[ ASC_ENABLE ] = 0;}/* * EASC entry; init EASC, don't load wavetable, schedule 'start whining'. */static void mac_quadra_start_bell( unsigned int freq, unsigned int length, unsigned int volume ){	__u32 flags;	/* if the bell is already ringing, ring longer */	if ( mac_bell_duration > 0 )	{		mac_bell_duration += length;		return;	}	mac_bell_duration = length;	mac_bell_phase = 0;	mac_bell_phasepersample = ( freq * sizeof( mac_asc_wave_tab ) ) / mac_asc_samplespersec;	/* this is reasonably big for small frequencies */	local_irq_save(flags);	/* set the volume */	mac_asc_regs[ 0x806 ] = volume;	/* set up the ASC registers */	if ( mac_asc_regs[ 0x801 ] != 1 )	{		/* select mono mode */		mac_asc_regs[ 0x807 ] = 0;		/* select sampled sound mode */		mac_asc_regs[ 0x802 ] = 0;		/* ??? */		mac_asc_regs[ 0x801 ] = 1;		mac_asc_regs[ 0x803 ] |= 0x80;		mac_asc_regs[ 0x803 ] &= 0x7F;	}	mac_sound_timer.function = mac_quadra_ring_bell;	mac_sound_timer.expires = jiffies + 1;	add_timer( &mac_sound_timer );	local_irq_restore(flags);}/* * EASC 'start/continue whining'; I'm not sure why the above function didn't * already load the wave table, or at least call this one... * This piece keeps reloading the wave table until done. */static void mac_quadra_ring_bell( unsigned long ignored ){	int	i, count = mac_asc_samplespersec / HZ;	__u32 flags;	/*	 * we neither want a sound buffer overflow nor underflow, so we need to match	 * the number of samples per timer interrupt as exactly as possible.	 * using the asc interrupt will give better results in the future	 * ...and the possibility to use a real sample (a boingy noise, maybe...)	 */	local_irq_save(flags);	del_timer( &mac_sound_timer );	if ( mac_bell_duration-- > 0 )	{		for ( i = 0; i < count; i++ )		{			mac_bell_phase += mac_bell_phasepersample;			mac_asc_regs[ 0 ] = mac_asc_wave_tab[ mac_bell_phase & ( sizeof( mac_asc_wave_tab ) - 1 ) ];		}		mac_sound_timer.expires = jiffies + 1;		add_timer( &mac_sound_timer );	}	else		mac_asc_regs[ 0x801 ] = 0;	local_irq_restore(flags);}/* * AV code - please fill in. */static void mac_av_start_bell( unsigned int freq, unsigned int length, unsigned int volume ){}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美zozozo| 一本色道久久综合亚洲91| 欧美日韩国产另类一区| 亚洲最大色网站| 欧美二区三区91| 国产一区二三区好的| 国产三级久久久| 91丝袜美腿高跟国产极品老师 | youjizz久久| 亚洲另类一区二区| 91精品国产福利| 国产一区不卡视频| 亚洲六月丁香色婷婷综合久久| 欧美在线啊v一区| 青娱乐精品视频| 国产日韩欧美高清在线| 99久久99久久精品国产片果冻| 一区二区三区免费在线观看| 91精品在线观看入口| 国产成人在线色| 亚洲一级片在线观看| 日韩欧美成人一区二区| www.在线成人| 青青草一区二区三区| 国产欧美日韩激情| 欧美精品视频www在线观看| 久久99精品久久久久久| 亚洲欧美自拍偷拍| 日韩欧美资源站| 欧美日韩国产综合一区二区| 麻豆精品视频在线观看免费| 中文欧美字幕免费| 91.com视频| 不卡一二三区首页| 久久99久久久欧美国产| 日韩一区在线播放| 日韩精品一区二区在线观看| 欧美成人a视频| 91视视频在线观看入口直接观看www | 欧美白人最猛性xxxxx69交| 成人永久看片免费视频天堂| 婷婷综合五月天| 国产精品免费视频观看| 日韩一区二区免费视频| 一本在线高清不卡dvd| 国产精品影视在线| 日韩精品电影在线观看| 亚洲欧美日韩久久| 久久久噜噜噜久噜久久综合| 制服丝袜亚洲色图| 日本黄色一区二区| 成人精品在线视频观看| 国产一区中文字幕| 麻豆91免费看| 视频一区免费在线观看| 亚洲一区二区精品3399| 亚洲色欲色欲www| 国产精品麻豆99久久久久久| 精品欧美久久久| 欧美电影免费提供在线观看| 欧美卡1卡2卡| 欧美三级电影在线看| 日本精品视频一区二区| 91免费观看视频在线| 成人免费毛片片v| 国产精品一品二品| 国产一区二区精品久久99| 日韩成人一区二区三区在线观看| 亚洲精品国久久99热| 国产精品无人区| 国产精品久久久久久久久久免费看| 久久综合精品国产一区二区三区| 日韩欧美视频一区| 有坂深雪av一区二区精品| 国产精品全国免费观看高清| 亚洲国产经典视频| 国产精品电影一区二区| 1024成人网色www| 中文字幕亚洲精品在线观看| 国产精品午夜久久| 亚洲丝袜精品丝袜在线| 亚洲精品免费视频| 一区二区三区在线视频观看58| 一个色综合av| 丝袜国产日韩另类美女| 美国欧美日韩国产在线播放| 九九视频精品免费| 福利一区福利二区| 成人激情午夜影院| 91片在线免费观看| 欧美日韩国产免费一区二区 | 日韩视频中午一区| 久久综合色8888| 中文字幕欧美日本乱码一线二线| 中文字幕一区二区三区不卡在线| 亚洲视频一区二区免费在线观看| 一区二区三区在线观看国产| 午夜久久久影院| 精品影院一区二区久久久| 国产99久久久国产精品| 91麻豆视频网站| 欧美一级国产精品| 国产欧美日韩在线观看| 亚洲一区自拍偷拍| 精品一区二区免费| 99精品视频中文字幕| 欧美日韩在线三级| 精品播放一区二区| 亚洲欧洲在线观看av| 日本午夜一本久久久综合| 丁香桃色午夜亚洲一区二区三区| 91麻豆国产在线观看| 91精品国产91久久久久久一区二区 | 欧美卡1卡2卡| 国产三级精品视频| 亚洲va国产天堂va久久en| 韩日av一区二区| 在线视频亚洲一区| 久久精品日产第一区二区三区高清版 | 日本亚洲一区二区| www.在线欧美| 精品国产a毛片| 亚洲免费伊人电影| 韩国女主播成人在线| 在线免费不卡电影| 国产欧美精品一区二区色综合| 亚洲已满18点击进入久久| 国产精品 日产精品 欧美精品| 欧美三级日韩三级| 中文字幕一区二区三中文字幕| 免费观看成人鲁鲁鲁鲁鲁视频| 91亚洲男人天堂| 久久久精品一品道一区| 午夜精品久久久久影视| www.爱久久.com| 久久五月婷婷丁香社区| 五月天国产精品| 91麻豆.com| 欧美国产综合一区二区| 热久久国产精品| 欧美专区日韩专区| 国产精品国产三级国产| 国产在线精品一区二区夜色| 欧美伊人久久久久久午夜久久久久| 国产三级三级三级精品8ⅰ区| 视频一区视频二区中文| 日本黄色一区二区| 亚洲少妇30p| 99久精品国产| 国产精品久久毛片av大全日韩| 精品中文字幕一区二区| 欧美高清精品3d| 亚洲一区二区三区中文字幕在线| 懂色av中文一区二区三区| 26uuu成人网一区二区三区| 蜜桃在线一区二区三区| 在线不卡a资源高清| 亚洲国产综合在线| 欧洲一区二区三区在线| 夜色激情一区二区| 91电影在线观看| 亚洲综合一区二区三区| 91浏览器在线视频| 一区二区三区在线高清| 欧洲另类一二三四区| 亚洲精品免费播放| 91麻豆国产精品久久| 亚洲精品你懂的| 欧美最猛黑人xxxxx猛交| 樱桃视频在线观看一区| 色欧美乱欧美15图片| 一区二区三区四区精品在线视频| 97久久精品人人澡人人爽| 中文字幕字幕中文在线中不卡视频| 9色porny自拍视频一区二区| 亚洲欧洲无码一区二区三区| 色诱视频网站一区| 午夜精品福利视频网站| 777奇米四色成人影色区| 免费在线看成人av| 久久免费午夜影院| www..com久久爱| 一区二区三区日韩在线观看| 欧美日韩www| 极品美女销魂一区二区三区| 国产欧美精品日韩区二区麻豆天美| 成人动漫一区二区在线| 欧美国产欧美亚州国产日韩mv天天看完整| 久久日韩精品一区二区五区| 亚洲电影一区二区| 日韩欧美久久一区| 国产精品中文字幕欧美| 中文字幕日韩一区| 欧美视频第二页| 精品一区精品二区高清| 国产精品福利一区二区| 欧美视频一区二区三区四区| 久久成人羞羞网站| 综合激情成人伊人| 欧美一区二区三区视频免费|