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

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

?? hda_codec.txt

?? linux 內(nèi)核源代碼
?? TXT
字號:
Notes on Universal Interface for Intel High Definition Audio Codec------------------------------------------------------------------Takashi Iwai <tiwai@suse.de>[Still a draft version]General=======The snd-hda-codec module supports the generic access function for theHigh Definition (HD) audio codecs.  It's designed to be independentfrom the controller code like ac97 codec module.  The real accessorsfrom/to the controller must be implemented in the lowlevel driver.The structure of this module is similar with ac97_codec module.Each codec chip belongs to a bus class which communicates with thecontroller.Initialization of Bus Instance==============================The card driver has to create struct hda_bus at first.  The templatestruct should be filled and passed to the constructor:struct hda_bus_template {	void *private_data;	struct pci_dev *pci;	const char *modelname;	struct hda_bus_ops ops;};The card driver can set and use the private_data field to retrieve itsown data in callback functions.  The pci field is used when the patchneeds to check the PCI subsystem IDs, so on.  For non-PCI system, itdoesn't have to be set, of course.The modelname field specifies the board's specific configuration.  Thestring is passed to the codec parser, and it depends on the parser howthe string is used.These fields, private_data, pci and modelname are all optional.The ops field contains the callback functions as the following:struct hda_bus_ops {	int (*command)(struct hda_codec *codec, hda_nid_t nid, int direct,		       unsigned int verb, unsigned int parm);	unsigned int (*get_response)(struct hda_codec *codec);	void (*private_free)(struct hda_bus *);#ifdef CONFIG_SND_HDA_POWER_SAVE	void (*pm_notify)(struct hda_codec *codec);#endif};The command callback is called when the codec module needs to send aVERB to the controller.  It's always a single command.The get_response callback is called when the codec requires the answerfor the last command.  These two callbacks are mandatory and have tobe given.The third, private_free callback, is optional.  It's called in thedestructor to release any necessary data in the lowlevel driver.The pm_notify callback is available only withCONFIG_SND_HDA_POWER_SAVE kconfig.  It's called when the codec needsto power up or may power down.  The controller should check the allbelonging codecs on the bus whether they are actually powered off(check codec->power_on), and optionally the driver may power down thecontoller side, too.The bus instance is created via snd_hda_bus_new().  You need to passthe card instance, the template, and the pointer to store theresultant bus instance.int snd_hda_bus_new(struct snd_card *card, const struct hda_bus_template *temp,		    struct hda_bus **busp);It returns zero if successful.  A negative return value means anyerror during creation.Creation of Codec Instance==========================Each codec chip on the board is then created on the BUS instance.To create a codec instance, call snd_hda_codec_new().int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,		      struct hda_codec **codecp);The first argument is the BUS instance, the second argument is theaddress of the codec, and the last one is the pointer to store theresultant codec instance (can be NULL if not needed).The codec is stored in a linked list of bus instance.  You can followthe codec list like:	struct hda_codec *codec;	list_for_each_entry(codec, &bus->codec_list, list) {		...	}The codec isn't initialized at this stage properly.  Theinitialization sequence is called when the controls are built later.Codec Access============To access codec, use snd_hda_codec_read() and snd_hda_codec_write().snd_hda_param_read() is for reading parameters.For writing a sequence of verbs, use snd_hda_sequence_write().There are variants of cached read/write, snd_hda_codec_write_cache(),snd_hda_sequence_write_cache().  These are used for recording theregister states for the power-mangement resume.  When no PM is needed,these are equivalent with non-cached version.To retrieve the number of sub nodes connected to the given node, usesnd_hda_get_sub_nodes().  The connection list can be obtained viasnd_hda_get_connections() call.When an unsolicited event happens, pass the event viasnd_hda_queue_unsol_event() so that the codec routines will process itlater.(Mixer) Controls================To create mixer controls of all codecs, callsnd_hda_build_controls().  It then builds the mixers and doesinitialization stuff on each codec.PCM Stuff=========snd_hda_build_pcms() gives the necessary information to create PCMstreams.  When it's called, each codec belonging to the bus stores codec->num_pcms and codec->pcm_info fields.  The num_pcms indicatesthe number of elements in pcm_info array.  The card driver is supposedto traverse the codec linked list, read the pcm information inpcm_info array, and build pcm instances according to them. The pcm_info array contains the following record:/* PCM information for each substream */struct hda_pcm_stream {	unsigned int substreams;	/* number of substreams, 0 = not exist */	unsigned int channels_min;	/* min. number of channels */	unsigned int channels_max;	/* max. number of channels */	hda_nid_t nid;	/* default NID to query rates/formats/bps, or set up */	u32 rates;	/* supported rates */	u64 formats;	/* supported formats (SNDRV_PCM_FMTBIT_) */	unsigned int maxbps;	/* supported max. bit per sample */	struct hda_pcm_ops ops;};/* for PCM creation */struct hda_pcm {	char *name;	struct hda_pcm_stream stream[2];};The name can be passed to snd_pcm_new().  The stream field containsthe information  for playback (SNDRV_PCM_STREAM_PLAYBACK = 0) andcapture (SNDRV_PCM_STREAM_CAPTURE = 1) directions.  The card drivershould pass substreams to snd_pcm_new() for the number of substreamsto create.The channels_min, channels_max, rates and formats should be copied toruntime->hw record.  They and maxbps fields are used also to computethe format value for the HDA codec and controller.  Callsnd_hda_calc_stream_format() to get the format value.The ops field contains the following callback functions:struct hda_pcm_ops {	int (*open)(struct hda_pcm_stream *info, struct hda_codec *codec,		    struct snd_pcm_substream *substream);	int (*close)(struct hda_pcm_stream *info, struct hda_codec *codec,		     struct snd_pcm_substream *substream);	int (*prepare)(struct hda_pcm_stream *info, struct hda_codec *codec,		       unsigned int stream_tag, unsigned int format,		       struct snd_pcm_substream *substream);	int (*cleanup)(struct hda_pcm_stream *info, struct hda_codec *codec,		       struct snd_pcm_substream *substream);};All are non-NULL, so you can call them safely without NULL check.The open callback should be called in PCM open after runtime->hw isset up.  It may override some setting and constraints additionally.Similarly, the close callback should be called in the PCM close.The prepare callback should be called in PCM prepare.  This will setup the codec chip properly for the operation.  The cleanup should becalled in hw_free to clean up the configuration.The caller should check the return value, at least for open andprepare callbacks.  When a negative value is returned, some erroroccurred.Proc Files==========Each codec dumps the widget node information in/proc/asound/card*/codec#* file.  This information would be reallyhelpful for debugging.  Please provide its contents together with thebug report.Power Management================It's simple:Call snd_hda_suspend() in the PM suspend callback.Call snd_hda_resume() in the PM resume callback.Codec Preset (Patch)====================To set up and handle the codec functionality fully, each codec mayhave a codec preset (patch).  It's defined in struct hda_codec_preset:	struct hda_codec_preset {		unsigned int id;		unsigned int mask;		unsigned int subs;		unsigned int subs_mask;		unsigned int rev;		const char *name;		int (*patch)(struct hda_codec *codec);	};When the codec id and codec subsystem id match with the given id andsubs fields bitwise (with bitmask mask and subs_mask), the callbackpatch is called.  The patch callback should initialize the codec andset the codec->patch_ops field.  This is defined as below:	struct hda_codec_ops {		int (*build_controls)(struct hda_codec *codec);		int (*build_pcms)(struct hda_codec *codec);		int (*init)(struct hda_codec *codec);		void (*free)(struct hda_codec *codec);		void (*unsol_event)(struct hda_codec *codec, unsigned int res);	#ifdef CONFIG_PM		int (*suspend)(struct hda_codec *codec, pm_message_t state);		int (*resume)(struct hda_codec *codec);	#endif	#ifdef CONFIG_SND_HDA_POWER_SAVE		int (*check_power_status)(struct hda_codec *codec,					  hda_nid_t nid);	#endif	};The build_controls callback is called from snd_hda_build_controls().Similarly, the build_pcms callback is called fromsnd_hda_build_pcms().  The init callback is called afterbuild_controls to initialize the hardware.The free callback is called as a destructor.The unsol_event callback is called when an unsolicited event isreceived.The suspend and resume callbacks are for power management.They can be NULL if no special sequence is required.  When the resumecallback is NULL, the driver calls the init callback and resumes theregisters from the cache.  If other handling is needed, you'd need towrite your own resume callback.  There, the amp values can be resumedvia	void snd_hda_codec_resume_amp(struct hda_codec *codec);and the other codec registers via	void snd_hda_codec_resume_cache(struct hda_codec *codec);The check_power_status callback is called when the amp value of thegiven widget NID is changed.  The codec code can turn on/off the powerappropriately from this information.Each entry can be NULL if not necessary to be called.Generic Parser==============When the device doesn't match with any given presets, the widgets areparsed via th generic parser (hda_generic.c).  Its support islimited: no multi-channel support, for example.Digital I/O===========Call snd_hda_create_spdif_out_ctls() from the patch to create controlsrelated with SPDIF out.Helper Functions================snd_hda_get_codec_name() stores the codec name on the given string.snd_hda_check_board_config() can be used to obtain the configurationinformation matching with the device.  Define the model string tableand the table with struct snd_pci_quirk entries (zero-terminated),and pass it to the function.  The function checks the modelname givenas a module parameter, and PCI subsystem IDs.  If the matching entryis found, it returns the config field value.snd_hda_add_new_ctls() can be used to create and add control entries.Pass the zero-terminated array of struct snd_kcontrol_newMacros HDA_CODEC_VOLUME(), HDA_CODEC_MUTE() and their variables can beused for the entry of struct snd_kcontrol_new.The input MUX helper callbacks for such a control are provided, too:snd_hda_input_mux_info() and snd_hda_input_mux_put().  Seepatch_realtek.c for example.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品亚洲欧美一区| 国产精品国产自产拍高清av| 亚洲高清一区二区三区| 欧美视频中文字幕| 日产国产欧美视频一区精品 | 中文字幕欧美激情| 国产风韵犹存在线视精品| 国产欧美日韩在线看| 91视频免费观看| 日韩精品色哟哟| 久久精品一区二区三区av| jizzjizzjizz欧美| 亚洲国产视频在线| 精品福利在线导航| 99久久久国产精品免费蜜臀| 肉肉av福利一精品导航| 久久久三级国产网站| 91女人视频在线观看| 午夜精品免费在线观看| 久久久久国产精品厨房| 欧美性大战久久久久久久| 久久国产精品99久久人人澡| ●精品国产综合乱码久久久久 | 福利电影一区二区| 亚洲精品国产成人久久av盗摄| 91.com视频| 99re这里只有精品首页| 麻豆国产欧美日韩综合精品二区| 亚洲国产成人午夜在线一区| 欧美精品久久天天躁| 成人国产视频在线观看| 亚洲成人动漫一区| 成人欧美一区二区三区1314| 欧美一级国产精品| 91麻豆免费视频| 国产在线播精品第三| 亚洲午夜精品网| 中文字幕一区二区三区视频| 日韩一级免费一区| 欧美午夜电影在线播放| 91在线丨porny丨国产| 黄色小说综合网站| 无吗不卡中文字幕| 亚洲精品久久嫩草网站秘色| 久久精品日韩一区二区三区| 日韩三级电影网址| 欧美亚洲一区二区在线| 91在线观看视频| 成人午夜精品在线| 寂寞少妇一区二区三区| 午夜成人在线视频| 亚洲一区二区在线播放相泽| 国产丝袜在线精品| 精品国产乱码久久| 欧美一区二区三区思思人| 在线影视一区二区三区| 色综合天天综合| 99亚偷拍自图区亚洲| 成人丝袜18视频在线观看| 韩国av一区二区| 激情综合一区二区三区| 久久成人18免费观看| 秋霞成人午夜伦在线观看| 日韩精品三区四区| 三级一区在线视频先锋| 日日噜噜夜夜狠狠视频欧美人 | 91麻豆精品国产91| 欧美色图天堂网| 欧美在线你懂得| 欧美在线免费视屏| 欧美日韩一本到| 欧美性感一区二区三区| 欧美最猛黑人xxxxx猛交| 欧美色区777第一页| 欧美特级限制片免费在线观看| 色吊一区二区三区| 欧美在线你懂得| 欧美精品久久99久久在免费线| 欧美日韩三级在线| 欧美一区在线视频| 日韩欧美综合在线| 久久亚洲精品国产精品紫薇| 久久婷婷国产综合国色天香| 久久婷婷成人综合色| 国产精品五月天| 亚洲欧美日韩在线播放| 亚洲午夜在线观看视频在线| 午夜精品aaa| 国内久久精品视频| 国产成人在线看| 91视视频在线观看入口直接观看www | 亚洲一区二区三区四区的| 亚洲成人资源网| 久久国产人妖系列| 成人免费观看av| 日本久久电影网| 日韩精品中午字幕| 国产精品国产馆在线真实露脸| 亚洲精品综合在线| 日本午夜精品视频在线观看| 国产精品一区二区三区四区 | 亚洲一区二区中文在线| 青娱乐精品视频| 粉嫩欧美一区二区三区高清影视| 91亚洲精品久久久蜜桃网站| 欧美日韩第一区日日骚| 精品粉嫩超白一线天av| 国产精品电影一区二区| 视频一区欧美日韩| 国产精品亚洲专一区二区三区| 97久久超碰精品国产| 欧美老人xxxx18| 国产欧美日韩麻豆91| 亚洲一区视频在线| 国产成人亚洲综合a∨婷婷图片 | 日韩综合小视频| 国产高清不卡一区二区| 欧美色手机在线观看| 久久久99久久| 午夜影视日本亚洲欧洲精品| 国产精品一卡二卡在线观看| 在线观看亚洲专区| 久久久高清一区二区三区| 亚洲午夜久久久久| 成人精品小蝌蚪| 日韩女优电影在线观看| 亚洲精品成人在线| 国产一区 二区 三区一级| 91色porny在线视频| 精品久久久网站| 亚洲国产成人精品视频| 粉嫩av一区二区三区在线播放 | 亚洲主播在线观看| 成人av免费在线观看| 亚洲精品一区二区三区影院 | 成人午夜激情视频| 日韩限制级电影在线观看| 亚洲免费看黄网站| 国产91在线|亚洲| 精品少妇一区二区三区视频免付费| 有码一区二区三区| 成人网男人的天堂| 久久精品一二三| 美女一区二区视频| 日韩一区二区在线观看视频播放 | 日本美女一区二区三区视频| 91麻豆国产在线观看| 国产亚洲福利社区一区| 美日韩一区二区三区| 6080午夜不卡| 五月婷婷久久丁香| 欧美日韩黄色影视| 亚洲大片免费看| 欧美日韩视频在线第一区| 亚洲午夜羞羞片| 欧美三区在线观看| 天天影视网天天综合色在线播放| 欧美在线综合视频| 夜色激情一区二区| 欧美在线不卡视频| 亚洲在线视频网站| 欧美性感一类影片在线播放| 亚洲午夜视频在线观看| 欧美精三区欧美精三区| 欧美a级理论片| 日韩欧美一区二区视频| 久久99久久久欧美国产| 精品国产乱码久久久久久浪潮| 精品亚洲成a人在线观看| 2021国产精品久久精品 | 91色porny| 亚洲欧美日韩人成在线播放| 色欧美片视频在线观看| 亚洲曰韩产成在线| 欧美丰满嫩嫩电影| 精品一区二区三区免费视频| 久久久久九九视频| a在线播放不卡| 亚洲一级二级在线| 欧美一区二区三区在| 国产最新精品免费| 一区视频在线播放| 在线电影院国产精品| 免费一级片91| 国产女人aaa级久久久级| 99在线视频精品| 亚洲国产中文字幕在线视频综合| 日韩一区二区三区在线| 国产mv日韩mv欧美| 亚洲欧美日韩成人高清在线一区| 欧美亚洲一区二区在线观看| 卡一卡二国产精品 | 午夜国产精品一区| 精品不卡在线视频| 91同城在线观看| 首页国产欧美久久| 欧美国产精品久久| 成人91在线观看| 日韩欧美成人激情| 国产suv精品一区二区883|