Lines Matching refs:codec

13 The snd-hda-codec module supports the generic access function for the
15 from the controller code like ac97 codec module. The real accessors
19 Each codec chip belongs to a bus class which communicates with the
41 string is passed to the codec parser, and it depends on the parser how
48 int (*command)(struct hda_codec *codec, hda_nid_t nid, int direct,
50 unsigned int (*get_response)(struct hda_codec *codec);
53 void (*pm_notify)(struct hda_codec *codec);
57 The command callback is called when the codec module needs to send a
59 The get_response callback is called when the codec requires the answer
66 CONFIG_SND_HDA_POWER_SAVE kconfig. It's called when the codec needs
69 (check codec->power_on), and optionally the driver may power down the
86 Each codec chip on the board is then created on the BUS instance.
87 To create a codec instance, call snd_hda_codec_new().
93 address of the codec, and the last one is the pointer to store the
94 resultant codec instance (can be NULL if not needed).
96 The codec is stored in a linked list of bus instance. You can follow
97 the codec list like:
99 struct hda_codec *codec;
100 list_for_each_entry(codec, &bus->codec_list, list) {
104 The codec isn't initialized at this stage properly. The
111 To access codec, use snd_hda_codec_read() and snd_hda_codec_write().
125 snd_hda_queue_unsol_event() so that the codec routines will process it
134 initialization stuff on each codec.
141 streams. When it's called, each codec belonging to the bus stores
142 codec->num_pcms and codec->pcm_info fields. The num_pcms indicates
144 to traverse the codec linked list, read the pcm information in
175 the format value for the HDA codec and controller. Call
181 int (*open)(struct hda_pcm_stream *info, struct hda_codec *codec,
183 int (*close)(struct hda_pcm_stream *info, struct hda_codec *codec,
185 int (*prepare)(struct hda_pcm_stream *info, struct hda_codec *codec,
188 int (*cleanup)(struct hda_pcm_stream *info, struct hda_codec *codec,
199 up the codec chip properly for the operation. The cleanup should be
210 Each codec dumps the widget node information in
211 /proc/asound/card*/codec#* file. This information would be really
227 To set up and handle the codec functionality fully, each codec may
228 have a codec preset (patch). It's defined in struct hda_codec_preset:
237 int (*patch)(struct hda_codec *codec);
240 When the codec id and codec subsystem id match with the given id and
242 patch is called. The patch callback should initialize the codec and
243 set the codec->patch_ops field. This is defined as below:
246 int (*build_controls)(struct hda_codec *codec);
247 int (*build_pcms)(struct hda_codec *codec);
248 int (*init)(struct hda_codec *codec);
249 void (*free)(struct hda_codec *codec);
250 void (*unsol_event)(struct hda_codec *codec, unsigned int res);
252 int (*suspend)(struct hda_codec *codec, pm_message_t state);
253 int (*resume)(struct hda_codec *codec);
256 int (*check_power_status)(struct hda_codec *codec,
276 void snd_hda_codec_resume_amp(struct hda_codec *codec);
277 and the other codec registers via
278 void snd_hda_codec_resume_cache(struct hda_codec *codec);
281 given widget NID is changed. The codec code can turn on/off the power
305 snd_hda_get_codec_name() stores the codec name on the given string.