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

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

?? macboing.c

?? 底層驅(qū)動開發(fā)
?? 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 ){}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产传媒欧美日韩成人| 久久久.com| 午夜久久久久久久久| 欧美男男青年gay1069videost| 亚洲制服欧美中文字幕中文字幕| 欧美亚洲综合一区| 天堂va蜜桃一区二区三区漫画版| 欧美日韩国产影片| 麻豆国产91在线播放| 日韩欧美成人激情| 国产精品99久久久久| 国产精品久久久久天堂| 91久久国产最好的精华液| 丝袜诱惑亚洲看片| 精品成a人在线观看| 99精品视频中文字幕| 亚洲成人动漫在线观看| 日韩欧美在线不卡| 成人黄色综合网站| 亚洲影视在线观看| 精品久久99ma| 99久久国产综合精品麻豆| 亚洲国产裸拍裸体视频在线观看乱了| 欧美美女一区二区| 国产成人综合在线| 亚洲mv在线观看| 久久久91精品国产一区二区精品 | 亚洲欧美日韩国产一区二区三区| 色综合久久久久久久久久久| 日韩在线观看一区二区| 欧美国产1区2区| 在线播放中文一区| 成人美女视频在线观看18| 丝袜美腿亚洲一区二区图片| 国产精品视频免费| 日韩精品一区二区三区在线播放| 成人免费电影视频| 美国欧美日韩国产在线播放| 亚洲欧洲综合另类在线| 久久综合狠狠综合久久综合88 | 日韩欧美另类在线| 色猫猫国产区一区二在线视频| 久久国产婷婷国产香蕉| 悠悠色在线精品| 国产欧美日韩另类视频免费观看| 在线成人av网站| 91色视频在线| 国产不卡视频一区| 麻豆精品在线看| 亚洲国产一二三| 日韩美女视频一区| 国产精品无遮挡| 久久亚洲综合色| 日韩精品一区二区三区视频在线观看| 色老汉一区二区三区| eeuss鲁片一区二区三区在线观看| 美女被吸乳得到大胸91| 天堂成人国产精品一区| 亚洲综合免费观看高清完整版在线 | 婷婷综合在线观看| 亚洲视频一二三| 成人欧美一区二区三区| 久久精品亚洲精品国产欧美 | 国产精品伦一区| 欧美精品一区男女天堂| 日韩欧美一级在线播放| 91精品国产入口| 日韩一区二区三区高清免费看看| 欧洲精品中文字幕| 欧美色图在线观看| 在线观看网站黄不卡| 日本电影亚洲天堂一区| 一本大道久久a久久综合婷婷| 99久久99久久精品免费看蜜桃| www..com久久爱| 播五月开心婷婷综合| 成人av午夜电影| 99久久综合国产精品| 97精品久久久午夜一区二区三区| 成人黄色片在线观看| 99久久久久久99| 日本大香伊一区二区三区| 一本色道a无线码一区v| 欧亚一区二区三区| 欧美精选一区二区| www激情久久| 国产精品久久久久久久久免费桃花| 中文字幕欧美区| 亚洲女与黑人做爰| 亚洲国产欧美日韩另类综合| 美国欧美日韩国产在线播放| 国产一区二区美女诱惑| proumb性欧美在线观看| 欧美亚一区二区| 日韩一级精品视频在线观看| ww亚洲ww在线观看国产| 中文字幕一区二区三区四区 | 石原莉奈在线亚洲二区| 麻豆成人久久精品二区三区小说| 国模无码大尺度一区二区三区| 国产福利一区二区三区在线视频| 成人免费视频caoporn| 色婷婷精品久久二区二区蜜臀av| 欧美日韩国产综合视频在线观看| 欧美tk丨vk视频| √…a在线天堂一区| 日韩中文字幕av电影| 国产ts人妖一区二区| 精品视频1区2区| 26uuu欧美| 亚洲午夜激情网站| 欧美日韩在线不卡| 久久综合九色欧美综合狠狠| 一区二区三区日本| 韩日欧美一区二区三区| 在线免费观看视频一区| 精品黑人一区二区三区久久| 亚洲欧美日本韩国| 久久99精品国产麻豆婷婷| 99久精品国产| 久久午夜色播影院免费高清| 亚洲电影一级黄| 成人午夜大片免费观看| 欧美日韩亚洲综合一区 | 中文字幕一区二区不卡| 视频一区二区三区中文字幕| 成人视屏免费看| 日韩亚洲欧美在线观看| 亚洲综合一二区| 成人动漫视频在线| 日韩欧美国产综合| 亚洲一区二区精品久久av| 国产精品91一区二区| 欧美肥妇毛茸茸| 亚洲一区二区精品视频| 成人免费高清在线观看| 337p日本欧洲亚洲大胆精品 | 亚洲品质自拍视频网站| 精品一区二区三区久久久| 欧美日韩精品三区| 自拍偷拍亚洲激情| 国产91高潮流白浆在线麻豆 | 高清不卡一区二区在线| 666欧美在线视频| 亚洲自拍偷拍网站| 91成人免费电影| 亚洲日本在线观看| 成人国产一区二区三区精品| 久久综合网色—综合色88| 日韩av不卡在线观看| 欧美日韩精品一区二区天天拍小说 | 成人中文字幕合集| 精品国产一区二区三区忘忧草| 亚洲超碰精品一区二区| 91久久线看在观草草青青| 中文字幕亚洲不卡| 成人av电影在线| 欧美激情在线看| 国产99久久久久久免费看农村| 日韩区在线观看| 久久99精品久久久| 久久这里只有精品6| 国产中文一区二区三区| 欧美xingq一区二区| 国产一区二区影院| 久久奇米777| 国产jizzjizz一区二区| 久久久精品免费免费| 国产精品1024久久| 国产精品久久久一区麻豆最新章节| 国产麻豆精品久久一二三| 久久久精品天堂| 东方欧美亚洲色图在线| 国产精品久线在线观看| 色综合色综合色综合色综合色综合| 成人欧美一区二区三区1314| 色www精品视频在线观看| 亚洲成人av资源| 欧美白人最猛性xxxxx69交| 激情综合五月天| 国产欧美日韩精品在线| 91一区在线观看| 亚洲线精品一区二区三区八戒| 欧美人牲a欧美精品| 精品一区二区三区免费观看| 久久久久国产免费免费| 成人av集中营| 性感美女极品91精品| 日韩午夜在线观看| 国产福利一区在线观看| 亚洲男帅同性gay1069| 欧美日韩国产综合一区二区 | 亚洲成a人片在线观看中文| 欧美久久一区二区| 国产精品69久久久久水密桃| 亚洲色图都市小说| 欧美日韩精品综合在线| 国产精品夜夜嗨| 亚洲精品成人在线| 日韩美女一区二区三区|