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

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

?? hda_generic.c

?? linux-2.6.15.6
?? C
?? 第 1 頁 / 共 2 頁
字號:
	unsigned int pinctl;	char *label;	const char *type;	if (node->checked)		return 0;	node->checked = 1;	if (node->type != AC_WID_PIN) {		for (i = 0; i < node->nconns; i++) {			struct hda_gnode *child;			child = hda_get_node(spec, node->conn_list[i]);			if (! child)				continue;			err = parse_adc_sub_nodes(codec, spec, child);			if (err < 0)				return err;			if (err > 0) {				/* found one,				 * select the path, unmute both input and output				 */				if (node->nconns > 1)					select_input_connection(codec, node, i);				unmute_input(codec, node, i);				unmute_output(codec, node);				return err;			}		}		return 0;	}	/* input capable? */	if (! (node->pin_caps & AC_PINCAP_IN))		return 0;	if (node->wid_caps & AC_WCAP_DIGITAL)		return 0; /* skip SPDIF */	if (spec->input_mux.num_items >= HDA_MAX_NUM_INPUTS) {		snd_printk(KERN_ERR "hda_generic: Too many items for capture\n");		return -EINVAL;	}	pinctl = AC_PINCTL_IN_EN;	/* create a proper capture source label */	type = get_input_type(node, &pinctl);	if (! type) {		/* input as default? */		if (! (node->pin_ctl & AC_PINCTL_IN_EN))			return 0;		type = "Input";	}	label = spec->cap_labels[spec->input_mux.num_items];	strcpy(label, type);	spec->input_mux.items[spec->input_mux.num_items].label = label;	/* unmute the PIN external input */	unmute_input(codec, node, 0); /* index = 0? */	/* set PIN-In enable */	snd_hda_codec_write(codec, node->nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl);	return 1; /* found */}/* * parse input */static int parse_input_path(struct hda_codec *codec, struct hda_gnode *adc_node){	struct hda_gspec *spec = codec->spec;	struct hda_gnode *node;	int i, err;	snd_printdd("AUD_IN = %x\n", adc_node->nid);	clear_check_flags(spec);	// awk added - fixed no recording due to muted widget	unmute_input(codec, adc_node, 0);		/*	 * check each connection of the ADC	 * if it reaches to a proper input PIN, add the path as the	 * input path.	 */	for (i = 0; i < adc_node->nconns; i++) {		node = hda_get_node(spec, adc_node->conn_list[i]);		if (! node)			continue;		err = parse_adc_sub_nodes(codec, spec, node);		if (err < 0)			return err;		else if (err > 0) {			struct hda_input_mux_item *csrc = &spec->input_mux.items[spec->input_mux.num_items];			char *buf = spec->cap_labels[spec->input_mux.num_items];			int ocap;			for (ocap = 0; ocap < spec->input_mux.num_items; ocap++) {				if (! strcmp(buf, spec->cap_labels[ocap])) {					/* same label already exists,					 * put the index number to be unique					 */					sprintf(buf, "%s %d", spec->cap_labels[ocap],						spec->input_mux.num_items);				}			}			csrc->index = i;			spec->input_mux.num_items++;		}	}	if (! spec->input_mux.num_items)		return 0; /* no input path found... */	snd_printdd("[Capture Source] NID=0x%x, #SRC=%d\n", adc_node->nid, spec->input_mux.num_items);	for (i = 0; i < spec->input_mux.num_items; i++)		snd_printdd("  [%s] IDX=0x%x\n", spec->input_mux.items[i].label,			    spec->input_mux.items[i].index);	spec->adc_node = adc_node;	return 1;}/* * parse input */static int parse_input(struct hda_codec *codec){	struct hda_gspec *spec = codec->spec;	struct list_head *p;	struct hda_gnode *node;	int err;	/*	 * At first we look for an audio input widget.	 * If it reaches to certain input PINs, we take it as the	 * input path.	 */	list_for_each(p, &spec->nid_list) {		node = list_entry(p, struct hda_gnode, list);		if (node->wid_caps & AC_WCAP_DIGITAL)			continue; /* skip SPDIF */		if (node->type == AC_WID_AUD_IN) {			err = parse_input_path(codec, node);			if (err < 0)				return err;			else if (err > 0)				return 0;		}	}	snd_printd("hda_generic: no proper input path found\n");	return 0;}/* * create mixer controls if possible */#define DIR_OUT		0x1#define DIR_IN		0x2static int create_mixer(struct hda_codec *codec, struct hda_gnode *node,			unsigned int index, const char *type, const char *dir_sfx){	char name[32];	int err;	int created = 0;	snd_kcontrol_new_t knew;	if (type)		sprintf(name, "%s %s Switch", type, dir_sfx);	else		sprintf(name, "%s Switch", dir_sfx);	if ((node->wid_caps & AC_WCAP_IN_AMP) &&	    (node->amp_in_caps & AC_AMPCAP_MUTE)) {		knew = (snd_kcontrol_new_t)HDA_CODEC_MUTE(name, node->nid, index, HDA_INPUT);		snd_printdd("[%s] NID=0x%x, DIR=IN, IDX=0x%x\n", name, node->nid, index);		if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0)			return err;		created = 1;	} else if ((node->wid_caps & AC_WCAP_OUT_AMP) &&		   (node->amp_out_caps & AC_AMPCAP_MUTE)) {		knew = (snd_kcontrol_new_t)HDA_CODEC_MUTE(name, node->nid, 0, HDA_OUTPUT);		snd_printdd("[%s] NID=0x%x, DIR=OUT\n", name, node->nid);		if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0)			return err;		created = 1;	}	if (type)		sprintf(name, "%s %s Volume", type, dir_sfx);	else		sprintf(name, "%s Volume", dir_sfx);	if ((node->wid_caps & AC_WCAP_IN_AMP) &&	    (node->amp_in_caps & AC_AMPCAP_NUM_STEPS)) {		knew = (snd_kcontrol_new_t)HDA_CODEC_VOLUME(name, node->nid, index, HDA_INPUT);		snd_printdd("[%s] NID=0x%x, DIR=IN, IDX=0x%x\n", name, node->nid, index);		if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0)			return err;		created = 1;	} else if ((node->wid_caps & AC_WCAP_OUT_AMP) &&		   (node->amp_out_caps & AC_AMPCAP_NUM_STEPS)) {		knew = (snd_kcontrol_new_t)HDA_CODEC_VOLUME(name, node->nid, 0, HDA_OUTPUT);		snd_printdd("[%s] NID=0x%x, DIR=OUT\n", name, node->nid);		if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0)			return err;		created = 1;	}	return created;}/* * check whether the controls with the given name and direction suffix already exist */static int check_existing_control(struct hda_codec *codec, const char *type, const char *dir){	snd_ctl_elem_id_t id;	memset(&id, 0, sizeof(id));	sprintf(id.name, "%s %s Volume", type, dir);	id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;	if (snd_ctl_find_id(codec->bus->card, &id))		return 1;	sprintf(id.name, "%s %s Switch", type, dir);	id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;	if (snd_ctl_find_id(codec->bus->card, &id))		return 1;	return 0;}/* * build output mixer controls */static int build_output_controls(struct hda_codec *codec){	struct hda_gspec *spec = codec->spec;	int err;	err = create_mixer(codec, spec->pcm_vol_node, spec->pcm_vol_index,			   "PCM", "Playback");	if (err < 0)		return err;	return 0;}/* create capture volume/switch */static int build_input_controls(struct hda_codec *codec){	struct hda_gspec *spec = codec->spec;	struct hda_gnode *adc_node = spec->adc_node;	int err;	if (! adc_node)		return 0; /* not found */	/* create capture volume and switch controls if the ADC has an amp */	err = create_mixer(codec, adc_node, 0, NULL, "Capture");	/* create input MUX if multiple sources are available */	if (spec->input_mux.num_items > 1) {		static snd_kcontrol_new_t cap_sel = {			.iface = SNDRV_CTL_ELEM_IFACE_MIXER,			.name = "Capture Source",			.info = capture_source_info,			.get = capture_source_get,			.put = capture_source_put,		};		if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&cap_sel, codec))) < 0)			return err;		spec->cur_cap_src = 0;		select_input_connection(codec, adc_node, spec->input_mux.items[0].index);	}	return 0;}/* * parse the nodes recursively until reach to the output PIN. * * returns 0 - if not found, *         1 - if found, but no mixer is created *         2 - if found and mixer was already created, (just skip) *         a negative error code */static int parse_loopback_path(struct hda_codec *codec, struct hda_gspec *spec,			       struct hda_gnode *node, struct hda_gnode *dest_node,			       const char *type){	int i, err;	if (node->checked)		return 0;	node->checked = 1;	if (node == dest_node) {		/* loopback connection found */		return 1;	}	for (i = 0; i < node->nconns; i++) {		struct hda_gnode *child = hda_get_node(spec, node->conn_list[i]);		if (! child)			continue;		err = parse_loopback_path(codec, spec, child, dest_node, type);		if (err < 0)			return err;		else if (err >= 1) {			if (err == 1) {				err = create_mixer(codec, node, i, type, "Playback");				if (err < 0)					return err;				if (err > 0)					return 2; /* ok, created */				/* not created, maybe in the lower path */				err = 1;			}			/* connect and unmute */			if (node->nconns > 1)				select_input_connection(codec, node, i);			unmute_input(codec, node, i);			unmute_output(codec, node);			return err;		}	}	return 0;}/* * parse the tree and build the loopback controls */static int build_loopback_controls(struct hda_codec *codec){	struct hda_gspec *spec = codec->spec;	struct list_head *p;	struct hda_gnode *node;	int err;	const char *type;	if (! spec->out_pin_node)		return 0;	list_for_each(p, &spec->nid_list) {		node = list_entry(p, struct hda_gnode, list);		if (node->type != AC_WID_PIN)			continue;		/* input capable? */		if (! (node->pin_caps & AC_PINCAP_IN))			return 0;		type = get_input_type(node, NULL);		if (type) {			if (check_existing_control(codec, type, "Playback"))				continue;			clear_check_flags(spec);			err = parse_loopback_path(codec, spec, spec->out_pin_node,						  node, type);			if (err < 0)				return err;			if (! err)				continue;		}	}	return 0;}/* * build mixer controls */static int build_generic_controls(struct hda_codec *codec){	int err;	if ((err = build_input_controls(codec)) < 0 ||	    (err = build_output_controls(codec)) < 0 ||	    (err = build_loopback_controls(codec)) < 0)		return err;	return 0;}/* * PCM */static struct hda_pcm_stream generic_pcm_playback = {	.substreams = 1,	.channels_min = 2,	.channels_max = 2,};static int build_generic_pcms(struct hda_codec *codec){	struct hda_gspec *spec = codec->spec;	struct hda_pcm *info = &spec->pcm_rec;	if (! spec->dac_node && ! spec->adc_node) {		snd_printd("hda_generic: no PCM found\n");		return 0;	}	codec->num_pcms = 1;	codec->pcm_info = info;	info->name = "HDA Generic";	if (spec->dac_node) {		info->stream[0] = generic_pcm_playback;		info->stream[0].nid = spec->dac_node->nid;	}	if (spec->adc_node) {		info->stream[1] = generic_pcm_playback;		info->stream[1].nid = spec->adc_node->nid;	}	return 0;}/* */static struct hda_codec_ops generic_patch_ops = {	.build_controls = build_generic_controls,	.build_pcms = build_generic_pcms,	.free = snd_hda_generic_free,};/* * the generic parser */int snd_hda_parse_generic_codec(struct hda_codec *codec){	struct hda_gspec *spec;	int err;	if(!codec->afg)		return 0;	spec = kzalloc(sizeof(*spec), GFP_KERNEL);	if (spec == NULL) {		printk(KERN_ERR "hda_generic: can't allocate spec\n");		return -ENOMEM;	}	codec->spec = spec;	INIT_LIST_HEAD(&spec->nid_list);	if ((err = build_afg_tree(codec)) < 0)		goto error;	if ((err = parse_input(codec)) < 0 ||	    (err = parse_output(codec)) < 0)		goto error;	codec->patch_ops = generic_patch_ops;	return 0; error:	snd_hda_generic_free(codec);	return err;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产成人tv| 91免费视频大全| 在线看日本不卡| 精品国产成人在线影院| 亚洲一区二区三区免费视频| 国产在线观看免费一区| 欧美日本乱大交xxxxx| 综合婷婷亚洲小说| 国产福利91精品| 精品国产乱码久久久久久影片| 亚洲欧美日韩国产成人精品影院| 国产一区二区不卡老阿姨| 欧美日韩精品是欧美日韩精品| 日本一区二区三区电影| 国产真实乱对白精彩久久| 91精品国产日韩91久久久久久| 一区二区国产盗摄色噜噜| 99久久精品免费观看| 久久精品一区二区三区不卡| 精一区二区三区| 欧美一区二区日韩| 日韩有码一区二区三区| 欧美日韩专区在线| 一个色综合网站| 在线观看国产91| 亚洲一区二区三区小说| 一本色道久久加勒比精品| 亚洲视频在线一区观看| av色综合久久天堂av综合| 国产视频一区在线观看| 国产91富婆露脸刺激对白| 久久精品亚洲精品国产欧美kt∨ | 久久天天做天天爱综合色| 免费观看久久久4p| 欧美xxxxx牲另类人与| 久久精品国产99国产精品| 久久综合色8888| 国产激情偷乱视频一区二区三区| 国产亚洲1区2区3区| av激情亚洲男人天堂| 中文字幕在线观看不卡视频| 色域天天综合网| 亚洲第一综合色| 日韩精品专区在线影院观看| 韩国精品主播一区二区在线观看 | 4438x成人网最大色成网站| 日韩和的一区二区| 欧美不卡一二三| 国产成人啪午夜精品网站男同| 国产精品乱人伦| 在线观看欧美日本| 毛片av一区二区| 日本一区二区三区在线不卡| 91色九色蝌蚪| 日本aⅴ亚洲精品中文乱码| 久久先锋影音av| 色94色欧美sute亚洲13| 偷拍自拍另类欧美| 久久久美女艺术照精彩视频福利播放| 丁香亚洲综合激情啪啪综合| 一区二区三区在线观看视频| 欧美久久婷婷综合色| 国产一区二区三区精品欧美日韩一区二区三区| 国产人成一区二区三区影院| 色香蕉久久蜜桃| 奇米精品一区二区三区在线观看| 久久精品无码一区二区三区| 精品视频在线免费看| 久久99精品久久久久久动态图| 中文字幕精品综合| 欧美日本视频在线| 成人免费视频app| 日本va欧美va欧美va精品| 日韩毛片精品高清免费| 日韩欧美国产一区二区在线播放| 成人久久久精品乱码一区二区三区 | 国产精品家庭影院| 3d成人h动漫网站入口| 成人av网站在线| 免费一级片91| 亚洲图片一区二区| 日本一区二区成人| 日韩精品一区二区在线观看| 日本韩国精品在线| 国产成人在线观看| 久草中文综合在线| 亚洲成av人片www| 亚洲三级理论片| 久久精品一区二区三区av | 欧美性大战久久| 高清久久久久久| 国产一区二区视频在线| 亚洲成人免费视| 一区二区三区欧美激情| 欧美国产精品一区| 久久这里只有精品首页| 欧美高清性hdvideosex| 欧洲精品在线观看| 99免费精品视频| zzijzzij亚洲日本少妇熟睡| 国内成+人亚洲+欧美+综合在线 | 欧美一区永久视频免费观看| 91日韩在线专区| av一区二区三区四区| 国产1区2区3区精品美女| 精品一区二区三区的国产在线播放| 亚洲五码中文字幕| 夜夜揉揉日日人人青青一国产精品| 日韩毛片精品高清免费| 中文字幕视频一区二区三区久| 国产欧美视频一区二区三区| 国产婷婷色一区二区三区在线| 久久久99精品免费观看不卡| 精品福利在线导航| 国产亚洲精品精华液| 国产免费久久精品| 国产精品少妇自拍| 中文字幕一区在线| 亚洲天堂成人在线观看| 一区二区三区在线观看国产| 亚洲一区二区三区国产| 天堂蜜桃91精品| 久久se精品一区二区| 国产成人日日夜夜| 99精品久久久久久| 欧美午夜精品免费| 欧美一级日韩免费不卡| 欧美一级二级在线观看| 欧美一区二区网站| 久久精品一区四区| 亚洲女女做受ⅹxx高潮| 图片区小说区国产精品视频| 久久国产日韩欧美精品| 粉嫩蜜臀av国产精品网站| 91看片淫黄大片一级在线观看| 欧洲国内综合视频| 欧美一区二区美女| 国产欧美精品一区二区色综合| 亚洲三级在线播放| 日韩国产欧美一区二区三区| 国产精品亚洲一区二区三区妖精 | 免费日韩伦理电影| 国产99精品国产| 欧美伊人久久久久久久久影院| 欧美电影在哪看比较好| 久久精品亚洲一区二区三区浴池 | 国产精品卡一卡二卡三| 性久久久久久久久| 国产剧情av麻豆香蕉精品| 91浏览器在线视频| 日韩亚洲欧美在线观看| 国产精品黄色在线观看| 日日欢夜夜爽一区| 成人妖精视频yjsp地址| 欧美蜜桃一区二区三区| 久久色中文字幕| 午夜视频在线观看一区二区| 国产福利一区二区三区| 666欧美在线视频| 国产精品国产馆在线真实露脸| 日韩和欧美一区二区| 91丨九色丨黑人外教| 精品国产精品网麻豆系列| 亚洲一区二区四区蜜桃| 成人在线一区二区三区| 欧美电影免费观看高清完整版在| 亚洲另类中文字| 国产传媒一区在线| 日韩欧美国产一区在线观看| 亚洲六月丁香色婷婷综合久久 | 久久精品国产久精国产爱| 99精品国产一区二区三区不卡| 欧美成人精精品一区二区频| 亚洲一区免费在线观看| 成人精品高清在线| 久久久久久久免费视频了| 天天综合网 天天综合色| 99久久久久久| 国产精品久久三区| 国产精品1区2区| 精品久久国产97色综合| 日韩高清一区在线| 欧美日韩精品一区视频| 亚洲图片欧美色图| 91美女在线看| 国产精品国产自产拍在线| 国产99久久久久| 欧美激情一区在线观看| 国产精品一区二区三区网站| 日韩欧美黄色影院| 欧美a级理论片| 在线播放一区二区三区| 亚洲不卡在线观看| 在线观看国产一区二区| 亚洲永久精品大片| 欧美丝袜丝交足nylons图片| 亚洲一区在线观看免费 | 日本中文字幕一区| 欧美一区二区三区影视| 日韩精品高清不卡|