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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? macboing.c

?? 一個(gè)2.4.21版本的嵌入式linux內(nèi)核
?? C
字號(hào):
/* *	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 = 0;/* * 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 = 0;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 ) = NULL;/* * our timer to start/continue/stop the bell */static struct timer_list mac_sound_timer = { function: mac_nosound };/* * 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;	}	save_flags( flags );	cli();	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 );	restore_flags( 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 */ 	save_flags( flags );	cli();	/* 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 );	restore_flags( 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...)	 */	save_flags( flags );	cli();		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;		restore_flags( flags );}/* * AV code - please fill in. */static void mac_av_start_bell( unsigned int freq, unsigned int length, unsigned int volume ){} 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美午夜不卡视频| 国产精品成人免费在线| 欧美一区二区三区播放老司机| 日韩高清一区二区| 从欧美一区二区三区| 久久99久久99精品免视看婷婷| 亚洲综合一区在线| 亚洲激情第一区| 亚洲卡通欧美制服中文| 亚洲综合999| 丝袜诱惑制服诱惑色一区在线观看 | 亚洲天堂av一区| 亚洲视频你懂的| 亚洲精品视频在线观看网站| 亚洲午夜视频在线观看| 亚洲第一av色| 青青草精品视频| 国产在线国偷精品免费看| 国产精品123| 93久久精品日日躁夜夜躁欧美| 日本韩国一区二区三区| 欧美日韩美少妇| 日韩欧美的一区二区| 国产三区在线成人av| 中文字幕欧美一区| 一区二区日韩av| 欧美aaaaa成人免费观看视频| 久久99精品久久久久久久久久久久 | 久久久综合网站| 中文字幕在线一区二区三区| 一区二区三区久久| 免费成人在线网站| 成人精品鲁一区一区二区| 91免费观看视频| 69av一区二区三区| 国产三级久久久| 亚洲国产一区二区三区| 国内国产精品久久| 色婷婷综合中文久久一本| 欧美一区二区三区影视| 欧美韩国日本不卡| 亚洲成人高清在线| 粉嫩蜜臀av国产精品网站| 欧美午夜宅男影院| 久久网这里都是精品| 一区二区三区四区激情| 久久99精品国产麻豆婷婷| 97精品久久久久中文字幕 | 日韩毛片高清在线播放| 亚洲国产一区二区a毛片| 国产麻豆精品久久一二三| 欧美在线免费观看视频| 欧美精品一区二区三区久久久| 中文字幕一区二区在线观看| 日本91福利区| 91亚洲精品一区二区乱码| 欧美大片在线观看一区| 亚洲视频中文字幕| 精品亚洲欧美一区| 欧美性高清videossexo| 国产亚洲精品精华液| 午夜av区久久| 97精品久久久午夜一区二区三区 | 亚洲午夜影视影院在线观看| 国产福利精品导航| 欧美一级二级在线观看| 一区二区在线观看不卡| 国产传媒欧美日韩成人| 6080亚洲精品一区二区| 一区二区三区高清不卡| 成人黄色网址在线观看| 精品嫩草影院久久| 婷婷综合另类小说色区| 色噜噜狠狠一区二区三区果冻| 久久精品夜夜夜夜久久| 图片区日韩欧美亚洲| 92精品国产成人观看免费| 国产性天天综合网| 精品一区二区三区久久| 在线不卡免费av| 亚洲黄一区二区三区| 成人激情午夜影院| 欧美国产日产图区| 国产一区二区91| 精品免费99久久| 另类小说一区二区三区| 91精品国产综合久久久久久久久久| 亚洲精品欧美激情| 99久久精品免费精品国产| 久久久国产精品麻豆| 国产综合色精品一区二区三区| 欧美一区二区三区小说| 午夜亚洲国产au精品一区二区| 91成人免费网站| 亚洲蜜臀av乱码久久精品| caoporen国产精品视频| 国产精品亲子伦对白| 国产精品白丝jk黑袜喷水| 欧美精品一区视频| 久久99精品久久久久久| 精品乱码亚洲一区二区不卡| 久久精品99国产精品日本| 日韩视频中午一区| 久久精品免费观看| 精品国产免费视频| 韩国一区二区在线观看| 久久精品人人爽人人爽| 国产精品一级片| 国产精品美女久久久久久久| 成人免费不卡视频| 综合色天天鬼久久鬼色| 99国产精品久久久久久久久久久 | 大白屁股一区二区视频| 国产精品久久久一区麻豆最新章节| 成人激情文学综合网| 亚洲少妇中出一区| 91国产视频在线观看| 丝袜美腿一区二区三区| 欧美一区三区二区| 狠狠色丁香久久婷婷综| 欧美国产禁国产网站cc| 97久久精品人人做人人爽| 亚洲一区在线免费观看| 在线91免费看| 国产又黄又大久久| 中文字幕不卡在线| 91精品福利视频| 免费一级片91| 日本一区二区在线不卡| 91网站在线播放| 五月综合激情日本mⅴ| 精品久久久久久久久久久院品网| 国产成人免费在线视频| 亚洲欧美色一区| 7777精品伊人久久久大香线蕉的 | 91久久精品一区二区| 日韩中文字幕一区二区三区| 日韩欧美成人午夜| 99久久综合精品| 亚洲国产精品久久一线不卡| 欧美第一区第二区| 99re亚洲国产精品| 蜜臀91精品一区二区三区 | 一区二区三区精密机械公司| 在线综合视频播放| 成人动漫精品一区二区| 亚洲成人久久影院| 国产亚洲欧美色| 欧美日韩免费一区二区三区| 国产一区激情在线| 一个色综合av| www激情久久| 欧美色男人天堂| 国产精品一二三四| 一区二区免费在线| 国产亚洲一区二区三区在线观看 | 亚洲精品一线二线三线| 色av综合在线| 国产精品1区二区.| 日韩黄色免费网站| 自拍偷拍国产亚洲| 久久九九全国免费| 欧美日本在线播放| 91老司机福利 在线| 国产在线精品免费| 日韩精品电影在线观看| 亚洲欧洲精品天堂一级| 日韩精品自拍偷拍| 在线观看视频一区| 国产美女精品人人做人人爽| 国产色产综合色产在线视频| 国内国产精品久久| 亚洲一区影音先锋| 国产精品女主播在线观看| 国产激情一区二区三区| 亚洲精品videosex极品| 久久久久九九视频| 欧美一区在线视频| 欧美在线观看视频一区二区三区| 国产美女娇喘av呻吟久久| 男女性色大片免费观看一区二区 | 久久国产三级精品| 一个色综合网站| 中文字幕在线一区| 久久亚洲免费视频| 日韩丝袜情趣美女图片| 欧美日韩国产免费| 91久久精品国产91性色tv| 成人涩涩免费视频| 国产精品一二三四五| 久久国产婷婷国产香蕉| 免费av成人在线| 亚洲成a人v欧美综合天堂下载| 亚洲免费观看高清完整版在线| 国产日韩欧美不卡| 久久―日本道色综合久久| 日韩视频中午一区| 日韩免费高清电影| 欧美一级高清片在线观看| 制服丝袜一区二区三区|