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

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

?? macboing.c

?? 《嵌入式系統(tǒng)設(shè)計(jì)與實(shí)例開發(fā)實(shí)驗(yàn)教材二源碼》Linux內(nèi)核移植與編譯實(shí)驗(yàn)
?? 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 = 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
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产免费| 国产精品剧情在线亚洲| 婷婷夜色潮精品综合在线| 91老师国产黑色丝袜在线| 国产精品你懂的在线欣赏| 成人免费高清在线观看| 国产精品三级av| 欧洲国产伦久久久久久久| 午夜视频一区二区三区| 欧美大片拔萝卜| 国产大片一区二区| 亚洲精品国产品国语在线app| 欧美视频一区二| 久久99在线观看| 久久久国产午夜精品| 97久久久精品综合88久久| 亚洲专区一二三| 欧美电影免费观看高清完整版在线 | 国产精品一卡二| 国产午夜精品一区二区三区四区| 成人性视频免费网站| 亚洲成av人片在线| 久久婷婷综合激情| 欧美中文字幕不卡| 国产一区欧美日韩| 一区二区视频在线看| 69成人精品免费视频| 国产成人av电影在线| 亚洲最色的网站| 精品国产免费视频| 成人在线视频首页| 一区二区三区四区五区视频在线观看| 日韩欧美在线不卡| www.日韩在线| 同产精品九九九| 久久精品一区四区| 日韩一区二区三区在线| 成人动漫在线一区| 麻豆成人在线观看| 亚洲午夜免费电影| 中文字幕第一区综合| 欧美一卡二卡三卡| 欧美影视一区二区三区| 成人深夜福利app| 麻豆91在线观看| 亚洲综合色视频| 欧美激情一区二区在线| 日韩欧美亚洲国产精品字幕久久久| 色综合久久综合中文综合网| 黑人精品欧美一区二区蜜桃| 亚洲成人午夜影院| 亚洲女厕所小便bbb| 欧美极品aⅴ影院| 日韩久久久精品| 精品1区2区3区| 色综合久久综合| 美女一区二区在线观看| 亚洲一区在线观看免费观看电影高清| 国产欧美中文在线| 欧美精品一区二区三区蜜臀| 91精品一区二区三区在线观看| 99re在线视频这里只有精品| 国产成人日日夜夜| 激情欧美一区二区三区在线观看| 日日夜夜免费精品视频| 亚洲国产色一区| 亚洲图片欧美视频| 一区二区三区在线影院| 亚洲色图都市小说| 中文字幕一区二区三区四区| 日韩一区二区三区视频| 欧美老人xxxx18| 欧美肥胖老妇做爰| 欧美二区三区91| 欧美精品在线观看播放| 在线观看成人免费视频| 欧美性xxxxxx少妇| 欧美日韩精品欧美日韩精品一综合| 欧美又粗又大又爽| 欧美视频精品在线观看| 欧美日韩高清一区二区三区| 欧美高清hd18日本| 欧美一区二区三区公司| 亚洲精品在线免费播放| 久久五月婷婷丁香社区| 中文字幕成人av| 国产精品国产成人国产三级| 亚洲日本在线天堂| 激情综合网av| 捆绑紧缚一区二区三区视频| 久久超碰97中文字幕| 国产一区二区网址| 成人一区二区三区在线观看 | 亚洲国产成人av好男人在线观看| 亚洲一区二区在线免费观看视频| 午夜a成v人精品| 精品一区二区三区视频| 国产一区二区伦理| av一区二区三区四区| 欧美性猛片aaaaaaa做受| 欧美一区二区三区在线| 久久综合色一综合色88| 国产精品久久久久影院老司 | 亚洲va国产天堂va久久en| 日本午夜精品视频在线观看| 国产真实乱偷精品视频免| 99久久亚洲一区二区三区青草| 欧美撒尿777hd撒尿| 日韩女同互慰一区二区| 成人免费视频在线观看| 日日摸夜夜添夜夜添亚洲女人| 精品中文av资源站在线观看| a4yy欧美一区二区三区| 在线不卡a资源高清| 国产人成一区二区三区影院| 亚洲蜜臀av乱码久久精品蜜桃| 免费成人在线网站| 成人app网站| 欧美精品日日鲁夜夜添| 国产精品五月天| 五月婷婷综合在线| 精品一区二区在线看| 成人av网址在线| 精品日产卡一卡二卡麻豆| 国产精品素人视频| 日本不卡一区二区三区| 国产成人欧美日韩在线电影| 在线看一区二区| 国产日韩一级二级三级| 亚洲一二三级电影| jizz一区二区| 精品精品欲导航| 亚洲成人一区在线| 99精品欧美一区二区三区综合在线| 日韩欧美二区三区| 亚洲成人先锋电影| 色综合久久综合网欧美综合网| 久久综合五月天婷婷伊人| 亚洲成av人片在线观看无码| av成人老司机| 中国av一区二区三区| 久久99精品国产91久久来源| 精品国内二区三区| 日韩—二三区免费观看av| 色女孩综合影院| 中文字幕乱码一区二区免费| 久久 天天综合| 91精品免费在线观看| 精品一区二区影视| 国产成人a级片| 久久综合视频网| 久久久精品免费免费| 亚洲精品成人精品456| 国产成人av一区二区三区在线| 日韩一区二区三区观看| 亚洲午夜一区二区| 欧美伊人精品成人久久综合97| 国产精品免费av| 成人丝袜18视频在线观看| 国产性色一区二区| 国产精品香蕉一区二区三区| 欧美日韩1234| 亚洲18女电影在线观看| 欧美日韩在线不卡| 亚洲资源中文字幕| 欧美日韩国产美| 亚洲一区二区免费视频| 欧美日韩国产123区| 亚洲成在人线在线播放| 欧美日韩一区二区三区免费看 | 色偷偷一区二区三区| 中文字幕中文在线不卡住| 成人av综合一区| 中文字幕在线免费不卡| 色综合久久中文字幕综合网| 一区二区三区四区在线播放 | 国产精品一区在线| 国产视频一区二区三区在线观看| 丰满放荡岳乱妇91ww| 国产精品久久三区| 欧美在线视频全部完| 五月天一区二区| 日韩一区二区免费在线电影| 狠狠色丁香久久婷婷综| 国产欧美精品一区二区色综合朱莉| 成人看片黄a免费看在线| 免费亚洲电影在线| 国产日韩欧美不卡| 欧洲亚洲国产日韩| 久热成人在线视频| 国产欧美精品国产国产专区| 成人动漫一区二区| 亚洲一区在线观看免费 | 精东粉嫩av免费一区二区三区| 久久久久久久久久久久电影| 成人国产精品免费网站| 一区二区三区 在线观看视频| 欧美精品精品一区| 高清不卡一区二区| 亚洲国产精品久久久男人的天堂|