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

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

?? macboing.c

?? 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;/* * 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一区二区三区免费野_久草精品视频
亚洲啪啪综合av一区二区三区| 韩国在线一区二区| 久热成人在线视频| 成人美女视频在线看| 欧美一级日韩免费不卡| 日韩国产在线一| 91影院在线免费观看| 久久先锋影音av鲁色资源网| 午夜欧美电影在线观看| www.亚洲在线| 国产亚洲一区二区三区| 日韩电影一区二区三区四区| 欧美午夜在线观看| 亚洲欧美激情一区二区| 懂色av噜噜一区二区三区av| 日韩色在线观看| 亚洲电影第三页| 欧美写真视频网站| 一区二区三区在线免费观看| kk眼镜猥琐国模调教系列一区二区| 精品国产免费久久| 美女视频黄久久| 欧美一区二区三区四区高清| 亚洲小说春色综合另类电影| 91行情网站电视在线观看高清版| 中文字幕一区不卡| caoporn国产精品| 亚洲同性同志一二三专区| 国产丶欧美丶日本不卡视频| 精品欧美一区二区久久| 六月丁香婷婷色狠狠久久| 在线播放国产精品二区一二区四区| 亚洲精品免费视频| 91啦中文在线观看| 亚洲一区二区欧美日韩| 欧美午夜理伦三级在线观看| 亚洲午夜精品久久久久久久久| 色婷婷综合久色| 午夜天堂影视香蕉久久| 国产精品国产自产拍在线| av一二三不卡影片| 亚洲精品国产无套在线观| 在线免费精品视频| 午夜视频一区二区三区| 欧美一二三四在线| 国产精品一区在线| 欧美韩国一区二区| 色综合天天综合网国产成人综合天 | 色婷婷综合久色| 亚洲一区二区三区四区在线免费观看| 欧洲亚洲国产日韩| 日本色综合中文字幕| 亚洲精品在线免费播放| 成人免费毛片aaaaa**| 一区二区三区在线观看视频| 欧美日韩黄色一区二区| 久久爱www久久做| 国产精品色婷婷| 欧美在线你懂得| 激情久久五月天| 亚洲天堂成人在线观看| 欧美丰满少妇xxxxx高潮对白| 久久se这里有精品| 亚洲毛片av在线| 精品国产91洋老外米糕| 99riav一区二区三区| 日韩二区在线观看| 中文字幕在线视频一区| 欧美妇女性影城| 国产suv精品一区二区三区| 性感美女极品91精品| www久久精品| 欧美亚一区二区| 国产精品888| 日本美女一区二区三区| 亚洲欧洲美洲综合色网| 欧美zozozo| 欧美日韩在线播| 不卡av免费在线观看| 天堂久久一区二区三区| 中文字幕一区二区在线观看| 欧美大片拔萝卜| 欧美视频一区在线| 91在线观看免费视频| 国产乱国产乱300精品| 日韩精品乱码av一区二区| 国产精品进线69影院| 久久久国产精品午夜一区ai换脸| 欧美日韩国产美女| 色偷偷久久人人79超碰人人澡| 国产一区在线不卡| 免费人成精品欧美精品| 亚洲国产色一区| 玉足女爽爽91| 亚洲图片激情小说| 亚洲欧洲av在线| 日本一区二区三区电影| 精品成人免费观看| 日韩欧美一卡二卡| 制服丝袜成人动漫| 欧美日韩高清一区二区| 欧洲激情一区二区| 欧美优质美女网站| 在线观看一区二区视频| 91官网在线观看| 在线免费观看成人短视频| 不卡在线视频中文字幕| 国产xxx精品视频大全| 丁香婷婷综合网| 国产在线麻豆精品观看| 国内成人免费视频| 国产一区二区看久久| 极品少妇xxxx精品少妇| 国产一区二区在线电影| 国产美女娇喘av呻吟久久| 激情久久五月天| 东方aⅴ免费观看久久av| 国产高清成人在线| www.亚洲色图.com| 91福利视频在线| 欧美精品aⅴ在线视频| 91精品啪在线观看国产60岁| 日韩三级在线免费观看| 久久影院视频免费| 国产亚洲欧美中文| 日韩理论片网站| 五月婷婷激情综合网| 日韩精品一二三区| 久久99精品网久久| av网站一区二区三区| 91美女视频网站| 欧美一区欧美二区| 国产午夜亚洲精品羞羞网站| 中文字幕欧美日韩一区| 一区二区三区四区中文字幕| 午夜电影网一区| 国产成人精品亚洲午夜麻豆| 99精品黄色片免费大全| 91精品国产综合久久婷婷香蕉| 精品精品国产高清a毛片牛牛| 亚洲国产高清在线| 午夜欧美视频在线观看| 国产精品一区二区免费不卡| 91国内精品野花午夜精品| 日韩女优av电影在线观看| 中文字幕中文字幕在线一区| 婷婷六月综合亚洲| 国产成人综合网| 欧美精品乱码久久久久久按摩| 精品国产乱码久久久久久老虎| 中文字幕在线观看不卡| 日本不卡一区二区三区| 波多野结衣欧美| 日韩欧美激情一区| 亚洲卡通欧美制服中文| 极品销魂美女一区二区三区| 91搞黄在线观看| 国产亚洲精品超碰| 五月婷婷久久丁香| 99久久精品国产一区二区三区| 欧美一区日韩一区| 一区二区三区四区五区视频在线观看| 麻豆成人综合网| 欧美综合在线视频| 国产欧美日本一区视频| 免费不卡在线观看| 欧美视频日韩视频在线观看| 国产精品视频一二| 久久精品国产99国产| 欧美午夜电影一区| **性色生活片久久毛片| 国产精品18久久久久久vr| 欧美美女视频在线观看| 亚洲欧美日韩中文播放| 国产成人日日夜夜| 精品国产麻豆免费人成网站| 五月综合激情婷婷六月色窝| 色综合一个色综合亚洲| 欧美韩国一区二区| 国产精品综合久久| 日韩一区二区精品在线观看| 亚洲一区二区精品视频| 一本大道久久a久久精品综合| 国产欧美精品一区二区色综合 | xfplay精品久久| 全部av―极品视觉盛宴亚洲| 欧美亚洲免费在线一区| 综合分类小说区另类春色亚洲小说欧美| 久久99热狠狠色一区二区| 日韩一二三四区| 免费成人在线视频观看| 91精品国产综合久久福利| 亚洲va欧美va人人爽午夜 | 日韩电影在线一区二区| 欧美亚洲禁片免费| 亚洲风情在线资源站| 在线亚洲免费视频| 亚洲午夜一区二区三区| 精品视频全国免费看| 亚洲综合自拍偷拍|