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

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

?? patch_cmedia.c

?? linux 內核源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * Universal Interface for Intel High Definition Audio Codec * * HD audio interface patch for C-Media CMI9880 * * Copyright (c) 2004 Takashi Iwai <tiwai@suse.de> * * *  This driver is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. * *  This driver is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA */#include <sound/driver.h>#include <linux/init.h>#include <linux/delay.h>#include <linux/slab.h>#include <linux/pci.h>#include <sound/core.h>#include "hda_codec.h"#include "hda_local.h"#define NUM_PINS	11/* board config type */enum {	CMI_MINIMAL,	/* back 3-jack */	CMI_MIN_FP,	/* back 3-jack + front-panel 2-jack */	CMI_FULL,	/* back 6-jack + front-panel 2-jack */	CMI_FULL_DIG,	/* back 6-jack + front-panel 2-jack + digital I/O */	CMI_ALLOUT,	/* back 5-jack + front-panel 2-jack + digital out */	CMI_AUTO,	/* let driver guess it */	CMI_MODELS};struct cmi_spec {	int board_config;	unsigned int no_line_in: 1;	/* no line-in (5-jack) */	unsigned int front_panel: 1;	/* has front-panel 2-jack */	/* playback */	struct hda_multi_out multiout;	hda_nid_t dac_nids[AUTO_CFG_MAX_OUTS];	/* NID for each DAC */	int num_dacs;	/* capture */	hda_nid_t *adc_nids;	hda_nid_t dig_in_nid;	/* capture source */	const struct hda_input_mux *input_mux;	unsigned int cur_mux[2];	/* channel mode */	int num_channel_modes;	const struct hda_channel_mode *channel_modes;	struct hda_pcm pcm_rec[2];	/* PCM information */	/* pin deafault configuration */	hda_nid_t pin_nid[NUM_PINS];	unsigned int def_conf[NUM_PINS];	unsigned int pin_def_confs;	/* multichannel pins */	struct hda_verb multi_init[9];	/* 2 verbs for each pin + terminator */};/* * input MUX */static int cmi_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo){	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);	struct cmi_spec *spec = codec->spec;	return snd_hda_input_mux_info(spec->input_mux, uinfo);}static int cmi_mux_enum_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol){	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);	struct cmi_spec *spec = codec->spec;	unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);	ucontrol->value.enumerated.item[0] = spec->cur_mux[adc_idx];	return 0;}static int cmi_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol){	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);	struct cmi_spec *spec = codec->spec;	unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);	return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol,				     spec->adc_nids[adc_idx], &spec->cur_mux[adc_idx]);}/* * shared line-in, mic for surrounds *//* 3-stack / 2 channel */static struct hda_verb cmi9880_ch2_init[] = {	/* set line-in PIN for input */	{ 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },	/* set mic PIN for input, also enable vref */	{ 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },	/* route front PCM (DAC1) to HP */	{ 0x0f, AC_VERB_SET_CONNECT_SEL, 0x00 },	{}};/* 3-stack / 6 channel */static struct hda_verb cmi9880_ch6_init[] = {	/* set line-in PIN for output */	{ 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },	/* set mic PIN for output */	{ 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },	/* route front PCM (DAC1) to HP */	{ 0x0f, AC_VERB_SET_CONNECT_SEL, 0x00 },	{}};/* 3-stack+front / 8 channel */static struct hda_verb cmi9880_ch8_init[] = {	/* set line-in PIN for output */	{ 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },	/* set mic PIN for output */	{ 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },	/* route rear-surround PCM (DAC4) to HP */	{ 0x0f, AC_VERB_SET_CONNECT_SEL, 0x03 },	{}};static struct hda_channel_mode cmi9880_channel_modes[3] = {	{ 2, cmi9880_ch2_init },	{ 6, cmi9880_ch6_init },	{ 8, cmi9880_ch8_init },};static int cmi_ch_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo){	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);	struct cmi_spec *spec = codec->spec;	return snd_hda_ch_mode_info(codec, uinfo, spec->channel_modes,				    spec->num_channel_modes);}static int cmi_ch_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol){	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);	struct cmi_spec *spec = codec->spec;	return snd_hda_ch_mode_get(codec, ucontrol, spec->channel_modes,				   spec->num_channel_modes, spec->multiout.max_channels);}static int cmi_ch_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol){	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);	struct cmi_spec *spec = codec->spec;	return snd_hda_ch_mode_put(codec, ucontrol, spec->channel_modes,				   spec->num_channel_modes, &spec->multiout.max_channels);}/* */static struct snd_kcontrol_new cmi9880_basic_mixer[] = {	/* CMI9880 has no playback volumes! */	HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), /* front */	HDA_CODEC_MUTE("Surround Playback Switch", 0x04, 0x0, HDA_OUTPUT),	HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x05, 1, 0x0, HDA_OUTPUT),	HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x05, 2, 0x0, HDA_OUTPUT),	HDA_CODEC_MUTE("Side Playback Switch", 0x06, 0x0, HDA_OUTPUT),	{		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,		/* The multiple "Capture Source" controls confuse alsamixer		 * So call somewhat different..		 * FIXME: the controls appear in the "playback" view!		 */		/* .name = "Capture Source", */		.name = "Input Source",		.count = 2,		.info = cmi_mux_enum_info,		.get = cmi_mux_enum_get,		.put = cmi_mux_enum_put,	},	HDA_CODEC_VOLUME("Capture Volume", 0x08, 0, HDA_INPUT),	HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0, HDA_INPUT),	HDA_CODEC_MUTE("Capture Switch", 0x08, 0, HDA_INPUT),	HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0, HDA_INPUT),	HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x23, 0, HDA_OUTPUT),	HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x23, 0, HDA_OUTPUT),	{ } /* end */};/* * shared I/O pins */static struct snd_kcontrol_new cmi9880_ch_mode_mixer[] = {	{		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,		.name = "Channel Mode",		.info = cmi_ch_mode_info,		.get = cmi_ch_mode_get,		.put = cmi_ch_mode_put,	},	{ } /* end */};/* AUD-in selections: * 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x1f 0x20 */static struct hda_input_mux cmi9880_basic_mux = {	.num_items = 4,	.items = {		{ "Front Mic", 0x5 },		{ "Rear Mic", 0x2 },		{ "Line", 0x1 },		{ "CD", 0x7 },	}};static struct hda_input_mux cmi9880_no_line_mux = {	.num_items = 3,	.items = {		{ "Front Mic", 0x5 },		{ "Rear Mic", 0x2 },		{ "CD", 0x7 },	}};/* front, rear, clfe, rear_surr */static hda_nid_t cmi9880_dac_nids[4] = {	0x03, 0x04, 0x05, 0x06};/* ADC0, ADC1 */static hda_nid_t cmi9880_adc_nids[2] = {	0x08, 0x09};#define CMI_DIG_OUT_NID	0x07#define CMI_DIG_IN_NID	0x0a/* */static struct hda_verb cmi9880_basic_init[] = {	/* port-D for line out (rear panel) */	{ 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },	/* port-E for HP out (front panel) */	{ 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },	/* route front PCM to HP */	{ 0x0f, AC_VERB_SET_CONNECT_SEL, 0x00 },	/* port-A for surround (rear panel) */	{ 0x0e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },	/* port-G for CLFE (rear panel) */	{ 0x1f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },	{ 0x1f, AC_VERB_SET_CONNECT_SEL, 0x02 },	/* port-H for side (rear panel) */	{ 0x20, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },	{ 0x20, AC_VERB_SET_CONNECT_SEL, 0x01 },	/* port-C for line-in (rear panel) */	{ 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },	/* port-B for mic-in (rear panel) with vref */	{ 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },	/* port-F for mic-in (front panel) with vref */	{ 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },	/* CD-in */	{ 0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },	/* route front mic to ADC1/2 */	{ 0x08, AC_VERB_SET_CONNECT_SEL, 0x05 },	{ 0x09, AC_VERB_SET_CONNECT_SEL, 0x05 },	{} /* terminator */};static struct hda_verb cmi9880_allout_init[] = {	/* port-D for line out (rear panel) */	{ 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },	/* port-E for HP out (front panel) */	{ 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },	/* route front PCM to HP */	{ 0x0f, AC_VERB_SET_CONNECT_SEL, 0x00 },	/* port-A for side (rear panel) */	{ 0x0e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },	/* port-G for CLFE (rear panel) */	{ 0x1f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },	{ 0x1f, AC_VERB_SET_CONNECT_SEL, 0x02 },	/* port-H for side (rear panel) */	{ 0x20, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },	{ 0x20, AC_VERB_SET_CONNECT_SEL, 0x01 },	/* port-C for surround (rear panel) */	{ 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },	/* port-B for mic-in (rear panel) with vref */	{ 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },	/* port-F for mic-in (front panel) with vref */	{ 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },	/* CD-in */	{ 0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },	/* route front mic to ADC1/2 */	{ 0x08, AC_VERB_SET_CONNECT_SEL, 0x05 },	{ 0x09, AC_VERB_SET_CONNECT_SEL, 0x05 },	{} /* terminator */};/* */static int cmi9880_build_controls(struct hda_codec *codec){	struct cmi_spec *spec = codec->spec;	int err;	err = snd_hda_add_new_ctls(codec, cmi9880_basic_mixer);	if (err < 0)		return err;	if (spec->channel_modes) {		err = snd_hda_add_new_ctls(codec, cmi9880_ch_mode_mixer);		if (err < 0)			return err;	}	if (spec->multiout.dig_out_nid) {		err = snd_hda_create_spdif_out_ctls(codec, spec->multiout.dig_out_nid);		if (err < 0)			return err;	}	if (spec->dig_in_nid) {		err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid);		if (err < 0)			return err;	}	return 0;}/* fill in the multi_dac_nids table, which will decide   which audio widget to use for each channel */static int cmi9880_fill_multi_dac_nids(struct hda_codec *codec, const struct auto_pin_cfg *cfg){	struct cmi_spec *spec = codec->spec;	hda_nid_t nid;	int assigned[4];	int i, j;	/* clear the table, only one c-media dac assumed here */	memset(spec->dac_nids, 0, sizeof(spec->dac_nids));	memset(assigned, 0, sizeof(assigned));	/* check the pins we found */	for (i = 0; i < cfg->line_outs; i++) {		nid = cfg->line_out_pins[i];		/* nid 0x0b~0x0e is hardwired to audio widget 0x3~0x6 */		if (nid >= 0x0b && nid <= 0x0e) {			spec->dac_nids[i] = (nid - 0x0b) + 0x03;			assigned[nid - 0x0b] = 1;		}	}	/* left pin can be connect to any audio widget */	for (i = 0; i < cfg->line_outs; i++) {		nid = cfg->line_out_pins[i];		if (nid <= 0x0e)			continue;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美一级二级三级| 94-欧美-setu| 久久久久亚洲蜜桃| 国产精品69久久久久水密桃| 国产日韩视频一区二区三区| www.综合网.com| 亚洲一区二区精品视频| 在线播放国产精品二区一二区四区| 一区二区三区欧美日韩| 欧美精品色一区二区三区| 美女在线一区二区| 国产精品美女久久久久av爽李琼| 91玉足脚交白嫩脚丫在线播放| 亚洲电影中文字幕在线观看| 日韩欧美一区电影| av男人天堂一区| 亚洲777理论| 国产欧美日韩综合| 欧美日韩亚洲综合一区二区三区| 狠狠色丁香久久婷婷综| 亚洲日本成人在线观看| 91精品国产91久久综合桃花| 国产高清精品网站| 五月天国产精品| 国产精品午夜在线观看| 欧美日韩和欧美的一区二区| 国产精品一二三四| 亚洲国产精品综合小说图片区| 欧美精品一区二区三区在线播放 | 亚洲精品视频一区| 日韩免费高清av| 91在线视频免费观看| 男男成人高潮片免费网站| 中文字幕一区二区在线观看| 日韩欧美中文字幕精品| 日本韩国一区二区三区| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 国产精品素人视频| 欧美丰满少妇xxxxx高潮对白| 国产精品一区二区x88av| 亚洲第一久久影院| 中文字幕在线一区| 精品国产伦一区二区三区观看体验| jiyouzz国产精品久久| 狠狠狠色丁香婷婷综合激情| 丝袜亚洲精品中文字幕一区| 亚洲乱码精品一二三四区日韩在线 | 免费高清视频精品| 国产成人午夜精品5599| 偷拍亚洲欧洲综合| 一区二区三区中文字幕| 久久人人超碰精品| 日韩精品资源二区在线| 欧美日韩在线电影| 色综合中文字幕国产 | 色吧成人激情小说| 成人免费视频视频在线观看免费| 琪琪一区二区三区| 亚洲v中文字幕| 亚洲国产综合人成综合网站| 亚洲日本va在线观看| 国产精品二三区| 日本一区免费视频| 久久久精品免费观看| 欧美成人一区二区三区片免费| 欧美男人的天堂一二区| 欧美午夜不卡在线观看免费| 97久久超碰精品国产| 97久久精品人人做人人爽50路| 波多野结衣亚洲| 99免费精品视频| 色一情一乱一乱一91av| 91玉足脚交白嫩脚丫在线播放| 成人开心网精品视频| 懂色av一区二区三区免费看| 国产成人精品影视| 成人综合在线网站| 丁香激情综合国产| 成人理论电影网| 91在线一区二区三区| 91老师国产黑色丝袜在线| 91视频在线观看| 在线一区二区观看| 欧美精品免费视频| 欧美电视剧在线观看完整版| 麻豆国产精品一区二区三区 | 国产福利一区在线| 福利一区二区在线| 一本到三区不卡视频| 欧美日韩精品三区| 欧美videofree性高清杂交| 欧美精品一区二区精品网| 国产亚洲精品久| 成人免费在线观看入口| 一区二区三区国产精华| 三级久久三级久久| 国产一区二区三区在线观看精品| 国产成人av一区二区| 91麻豆蜜桃一区二区三区| 欧美综合天天夜夜久久| 91麻豆精品国产无毒不卡在线观看 | 国产一区激情在线| 成人免费av资源| 欧美性视频一区二区三区| 日韩一区二区三区免费观看 | 亚洲欧美日韩一区二区三区在线观看| 亚洲人成亚洲人成在线观看图片| 亚洲国产精品久久艾草纯爱| 国产一区视频导航| 色八戒一区二区三区| 秋霞午夜鲁丝一区二区老狼| 精品无人码麻豆乱码1区2区| av亚洲精华国产精华精华| 欧美精品一级二级三级| 久久久精品国产99久久精品芒果 | 久久国产精品区| 一本色道综合亚洲| www一区二区| 五月婷婷欧美视频| 成人免费视频国产在线观看| 3atv在线一区二区三区| 中文字幕亚洲一区二区va在线| 日韩精品高清不卡| 色综合久久综合网97色综合| 亚洲精品一区二区精华| 天天色图综合网| 成人激情电影免费在线观看| 日韩一区二区精品葵司在线| 亚洲男同1069视频| 国产精品原创巨作av| 欧美伦理电影网| 亚洲图片另类小说| 国产呦萝稀缺另类资源| 欧美电影一区二区三区| 亚洲欧美日韩国产综合在线| 国产精品一区二区免费不卡| 欧美一级片免费看| 夜夜精品视频一区二区| av在线不卡观看免费观看| 亚洲精品一区二区三区影院| 亚洲二区在线观看| 日本精品一区二区三区高清| 国产精品私人影院| 国产盗摄一区二区| 亚洲精品一区二区三区四区高清 | 婷婷一区二区三区| 色欧美乱欧美15图片| 国产精品免费视频一区| 激情欧美日韩一区二区| 日韩一级高清毛片| 日本亚洲欧美天堂免费| 欧美日韩性生活| 亚洲国产综合视频在线观看| 在线看一区二区| 一级做a爱片久久| 日本久久一区二区| 亚洲综合激情网| 在线观看免费亚洲| 亚洲国产aⅴ成人精品无吗| 色婷婷久久综合| 亚洲精品午夜久久久| 日本高清不卡aⅴ免费网站| 亚洲色大成网站www久久九九| 福利视频网站一区二区三区| 日本一区二区成人在线| 成人免费毛片片v| 国产精品萝li| 99国产精品国产精品久久| 一区二区三区不卡视频| 欧美日韩一区三区| 石原莉奈在线亚洲三区| 91麻豆精品91久久久久同性| 人禽交欧美网站| 久久久久久久久岛国免费| 成人午夜激情片| 亚洲免费av高清| 在线成人av影院| 精品一区二区在线观看| 欧美国产精品一区二区| 波波电影院一区二区三区| 亚洲一区在线看| 欧美一三区三区四区免费在线看 | 粉嫩av亚洲一区二区图片| 自拍av一区二区三区| 欧美日韩午夜精品| 麻豆精品久久久| 国产精品久久久久影院亚瑟 | 久久久久9999亚洲精品| 99v久久综合狠狠综合久久| 亚洲国产精品久久一线不卡| 91精品在线一区二区| 国产精品一品二品| 亚洲精品国久久99热| 91精品国产综合久久香蕉麻豆| 精久久久久久久久久久| 成人欧美一区二区三区1314| 777午夜精品视频在线播放| 国产乱国产乱300精品| 亚洲免费色视频| 精品国产伦一区二区三区观看方式 |