Lines Matching refs:the

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
16 from/to the controller must be implemented in the lowlevel driver.
19 Each codec chip belongs to a bus class which communicates with the
27 struct should be filled and passed to the constructor:
36 The card driver can set and use the private_data field to retrieve its
37 own data in callback functions. The pci field is used when the patch
38 needs to check the PCI subsystem IDs, so on. For non-PCI system, it
40 The modelname field specifies the board's specific configuration. The
41 string is passed to the codec parser, and it depends on the parser how
42 the string is used.
45 The ops field contains the callback functions as the following:
57 The command callback is called when the codec module needs to send a
58 VERB to the controller. It's always a single command.
59 The get_response callback is called when the codec requires the answer
60 for the last command. These two callbacks are mandatory and have to
62 The third, private_free callback, is optional. It's called in the
63 destructor to release any necessary data in the lowlevel driver.
66 CONFIG_SND_HDA_POWER_SAVE kconfig. It's called when the codec needs
67 to power up or may power down. The controller should check the all
68 belonging codecs on the bus whether they are actually powered off
69 (check codec->power_on), and optionally the driver may power down the
73 the card instance, the template, and the pointer to store the
86 Each codec chip on the board is then created on the BUS instance.
92 The first argument is the BUS instance, the second argument is the
93 address of the codec, and the last one is the pointer to store the
97 the codec list like:
105 initialization sequence is called when the controls are built later.
116 snd_hda_sequence_write_cache(). These are used for recording the
117 register states for the power-management resume. When no PM is needed,
120 To retrieve the number of sub nodes connected to the given node, use
124 When an unsolicited event happens, pass the event via
125 snd_hda_queue_unsol_event() so that the codec routines will process it
133 snd_hda_build_controls(). It then builds the mixers and does
140 snd_hda_build_pcms() gives the necessary information to create PCM
141 streams. When it's called, each codec belonging to the bus stores
143 the number of elements in pcm_info array. The card driver is supposed
144 to traverse the codec linked list, read the pcm information in
147 The pcm_info array contains the following record:
168 the information for playback (SNDRV_PCM_STREAM_PLAYBACK = 0) and
170 should pass substreams to snd_pcm_new() for the number of substreams
175 the format value for the HDA codec and controller. Call
176 snd_hda_calc_stream_format() to get the format value.
178 The ops field contains the following callback functions:
196 Similarly, the close callback should be called in the PCM close.
199 up the codec chip properly for the operation. The cleanup should be
200 called in hw_free to clean up the configuration.
202 The caller should check the return value, at least for open and
210 Each codec dumps the widget node information in
212 helpful for debugging. Please provide its contents together with the
220 Call snd_hda_suspend() in the PM suspend callback.
221 Call snd_hda_resume() in the PM resume callback.
227 To set up and handle the codec functionality fully, each codec may
240 When the codec id and codec subsystem id match with the given id and
241 subs fields bitwise (with bitmask mask and subs_mask), the callback
242 patch is called. The patch callback should initialize the codec and
243 set the codec->patch_ops field. This is defined as below:
262 Similarly, the build_pcms callback is called from
264 build_controls to initialize the hardware.
271 They can be NULL if no special sequence is required. When the resume
272 callback is NULL, the driver calls the init callback and resumes the
273 registers from the cache. If other handling is needed, you'd need to
274 write your own resume callback. There, the amp values can be resumed
277 and the other codec registers via
280 The check_power_status callback is called when the amp value of the
281 given widget NID is changed. The codec code can turn on/off the power
290 When the device doesn't match with any given presets, the widgets are
298 Call snd_hda_create_spdif_out_ctls() from the patch to create controls
305 snd_hda_get_codec_name() stores the codec name on the given string.
307 snd_hda_check_board_config() can be used to obtain the configuration
308 information matching with the device. Define the model string table
309 and the table with struct snd_pci_quirk entries (zero-terminated),
310 and pass it to the function. The function checks the modelname given
311 as a module parameter, and PCI subsystem IDs. If the matching entry
312 is found, it returns the config field value.
315 Pass the zero-terminated array of struct snd_kcontrol_new
318 used for the entry of struct snd_kcontrol_new.