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

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

?? macboing.c

?? 該文件是rt_linux
?? 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 ){} 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品午夜久久久| 欧美视频第二页| 国产精品99久久久久久久女警 | 国产日韩精品视频一区| 精品久久久网站| 久久夜色精品一区| 26uuuu精品一区二区| 久久先锋影音av| 久久久99久久| 国产精品国产成人国产三级 | 粉嫩绯色av一区二区在线观看 | 欧美中文一区二区三区| 欧洲亚洲精品在线| 欧美日韩国产另类一区| 欧美一区二区三区精品| 欧美电视剧免费观看| 久久奇米777| 中文字幕久久午夜不卡| 国产精品入口麻豆九色| 亚洲欧洲国产专区| 亚洲美女精品一区| 亚洲成人一二三| 裸体一区二区三区| 国产麻豆视频精品| 成人美女视频在线看| 色婷婷av久久久久久久| 欧美老年两性高潮| 久久综合资源网| 欧美激情一区二区三区在线| 亚洲精品欧美激情| 日本伊人午夜精品| 国产精品亚洲第一| 91麻豆国产在线观看| 欧美性猛片aaaaaaa做受| 这里只有精品视频在线观看| 欧美成人猛片aaaaaaa| 国产日本亚洲高清| 一区二区三区四区激情| 麻豆精品久久久| 久久网站热最新地址| 亚洲蜜臀av乱码久久精品| 五月综合激情网| 免费高清视频精品| 国产乱码精品一区二区三区av | 精品亚洲成av人在线观看| 国产精品456| 色婷婷av久久久久久久| 欧美成人性福生活免费看| 国产精品福利影院| 日韩高清不卡在线| 成人综合在线网站| 91精品国产一区二区三区香蕉| 欧美激情一区二区在线| 日韩影院在线观看| 不卡区在线中文字幕| 日韩三级在线观看| 亚洲欧洲国产日韩| 老司机精品视频在线| 欧美在线视频日韩| 国产情人综合久久777777| 亚洲午夜在线视频| 成人激情黄色小说| 欧美va亚洲va| 亚洲va韩国va欧美va| 成人精品亚洲人成在线| 欧美一区二区三区在线观看 | 91麻豆自制传媒国产之光| 日韩一区二区中文字幕| 亚洲精品欧美综合四区| 国产不卡视频一区二区三区| 欧美精品三级日韩久久| 亚洲乱码国产乱码精品精98午夜| 精品一区二区三区免费毛片爱| 欧美在线观看视频在线| 国产精品久久久久永久免费观看| 激情综合色丁香一区二区| 欧美日韩综合不卡| 亚洲视频一区二区免费在线观看| 国产精品66部| 欧美mv日韩mv国产网站app| 亚洲成人综合网站| 91在线视频网址| 中文字幕巨乱亚洲| 国产盗摄一区二区| 国产亚洲精品7777| 韩国在线一区二区| 91精品一区二区三区在线观看| 亚洲午夜一区二区三区| 一本色道久久综合亚洲aⅴ蜜桃| 国产欧美视频一区二区| 精品一区二区在线观看| 91精品国产欧美一区二区成人| 亚洲一区二区三区小说| 一本色道综合亚洲| 亚洲人妖av一区二区| 高清不卡一二三区| 国产午夜精品一区二区| 国产一区999| 久久美女艺术照精彩视频福利播放| 美女mm1313爽爽久久久蜜臀| 91精品国产黑色紧身裤美女| 美国欧美日韩国产在线播放| 日韩欧美精品在线| 老司机免费视频一区二区| 日韩视频免费观看高清完整版 | 亚洲码国产岛国毛片在线| www.色精品| 自拍偷拍亚洲欧美日韩| 99久精品国产| 亚洲精品成人天堂一二三| 色哟哟国产精品免费观看| 一区二区三区在线视频免费观看| 色欧美乱欧美15图片| 亚洲大片精品永久免费| 欧美日本免费一区二区三区| 日韩国产精品久久久久久亚洲| 3d成人h动漫网站入口| 精一区二区三区| 久久久久免费观看| 成人免费看视频| 一级特黄大欧美久久久| 欧美三级电影在线看| 蜜臀av性久久久久蜜臀aⅴ四虎| 精品欧美一区二区三区精品久久 | 欧美综合久久久| 肉丝袜脚交视频一区二区| 日韩一区二区精品在线观看| 久久精品二区亚洲w码| 国产午夜久久久久| 91免费在线看| 日韩高清不卡在线| 国产性天天综合网| 色999日韩国产欧美一区二区| 视频一区免费在线观看| 精品国产3级a| 不卡视频一二三四| 午夜精品免费在线观看| 日韩免费一区二区| www.亚洲免费av| 丝袜诱惑制服诱惑色一区在线观看 | 青娱乐精品视频| 国产日韩欧美综合在线| 在线亚洲一区观看| 久久成人免费电影| 中文字幕一区不卡| 欧美一区二区三区婷婷月色| 高清不卡在线观看av| 亚洲大片在线观看| 国产欧美va欧美不卡在线| 91福利视频在线| 老司机精品视频一区二区三区| 日韩一区在线播放| 日韩欧美三级在线| 色综合视频在线观看| 激情综合色播激情啊| 亚洲一区二区不卡免费| 国产女人18水真多18精品一级做| 欧美三级电影网| 波多野结衣一区二区三区 | 成人动漫av在线| 亚洲午夜免费电影| 国产精品色眯眯| 欧美一区二区三区在线电影| 99v久久综合狠狠综合久久| 免费在线观看精品| 亚洲色图制服丝袜| 日韩精品一区二区三区四区| 91毛片在线观看| 国产成人免费视频网站高清观看视频 | 五月婷婷另类国产| 中文字幕日韩精品一区| 日韩欧美黄色影院| 欧美日韩精品系列| 色妞www精品视频| 国产jizzjizz一区二区| 精品一区二区精品| 五月婷婷激情综合| 亚洲视频综合在线| 国产日韩欧美精品在线| 精品国产伦理网| 欧美夫妻性生活| 欧美中文字幕一区二区三区| av中文字幕不卡| 风流少妇一区二区| 精品亚洲porn| 毛片av一区二区| 日韩经典一区二区| 亚洲综合区在线| 一区二区三区欧美日| 国产精品久久久久久福利一牛影视 | 91网上在线视频| 国产成a人亚洲| 国产精品一品二品| 国产精品99久久久久久久女警| 蜜桃一区二区三区在线观看| 亚洲成人你懂的| 亚洲国产美女搞黄色| 亚洲一区二区三区四区在线| 一区二区三区影院| 亚洲男人电影天堂|