aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_local.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-12-18 12:12:44 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-12 02:30:45 -0500
commitc9ce6b260b039392b24ad65954788047d13d4c9a (patch)
tree58a35568c53b2b291061d4b22430b0f64eb0f1b9 /sound/pci/hda/hda_local.h
parent81fede89eda16a597c2d814113b74677754b0058 (diff)
ALSA: hda - Move fixup code into struct hda_codec
Since the fixup code is used commonly, it's worth to move it to the common place, struct hda_codec, instead of keeping in hda_gen_spec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r--sound/pci/hda/hda_local.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index ff56da82b7a0..de12dcc5accc 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -386,6 +386,59 @@ int snd_hda_add_new_ctls(struct hda_codec *codec,
386 const struct snd_kcontrol_new *knew); 386 const struct snd_kcontrol_new *knew);
387 387
388/* 388/*
389 * Fix-up pin default configurations and add default verbs
390 */
391
392struct hda_pintbl {
393 hda_nid_t nid;
394 u32 val;
395};
396
397struct hda_model_fixup {
398 const int id;
399 const char *name;
400};
401
402struct hda_fixup {
403 int type;
404 bool chained;
405 int chain_id;
406 union {
407 const struct hda_pintbl *pins;
408 const struct hda_verb *verbs;
409 void (*func)(struct hda_codec *codec,
410 const struct hda_fixup *fix,
411 int action);
412 } v;
413};
414
415/* fixup types */
416enum {
417 HDA_FIXUP_INVALID,
418 HDA_FIXUP_PINS,
419 HDA_FIXUP_VERBS,
420 HDA_FIXUP_FUNC,
421};
422
423/* fixup action definitions */
424enum {
425 HDA_FIXUP_ACT_PRE_PROBE,
426 HDA_FIXUP_ACT_PROBE,
427 HDA_FIXUP_ACT_INIT,
428 HDA_FIXUP_ACT_BUILD,
429};
430
431int snd_hda_add_verbs(struct hda_codec *codec, const struct hda_verb *list);
432void snd_hda_apply_verbs(struct hda_codec *codec);
433void snd_hda_apply_pincfgs(struct hda_codec *codec,
434 const struct hda_pintbl *cfg);
435void snd_hda_apply_fixup(struct hda_codec *codec, int action);
436void snd_hda_pick_fixup(struct hda_codec *codec,
437 const struct hda_model_fixup *models,
438 const struct snd_pci_quirk *quirk,
439 const struct hda_fixup *fixlist);
440
441/*
389 * unsolicited event handler 442 * unsolicited event handler
390 */ 443 */
391 444