diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-05-07 11:42:31 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-05-08 12:01:33 -0400 |
commit | 128bc4ba8c52194eae5a80594ec9b7f6b35ba88f (patch) | |
tree | 02cf180917b5a5f6732eaa5f6bfebd91abc120d8 /sound/pci/hda/hda_local.h | |
parent | 23d30f28275ddd7fdb87f265e9a440baf4a4cf09 (diff) |
ALSA: hda - Move BIOS pin-parser code to hda_auto_parser.c
Just code shuffles.
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.h | 82 |
1 files changed, 3 insertions, 79 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index a5cee952547d..9a096a8e0fc5 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -262,6 +262,8 @@ int snd_hda_input_mux_put(struct hda_codec *codec, | |||
262 | const struct hda_input_mux *imux, | 262 | const struct hda_input_mux *imux, |
263 | struct snd_ctl_elem_value *ucontrol, hda_nid_t nid, | 263 | struct snd_ctl_elem_value *ucontrol, hda_nid_t nid, |
264 | unsigned int *cur_val); | 264 | unsigned int *cur_val); |
265 | int snd_hda_add_imux_item(struct hda_input_mux *imux, const char *label, | ||
266 | int index, int *type_index_ret); | ||
265 | 267 | ||
266 | /* | 268 | /* |
267 | * Channel mode helper | 269 | * Channel mode helper |
@@ -393,72 +395,7 @@ struct hda_bus_unsolicited { | |||
393 | struct hda_bus *bus; | 395 | struct hda_bus *bus; |
394 | }; | 396 | }; |
395 | 397 | ||
396 | /* | 398 | /* helper macros to retrieve pin default-config values */ |
397 | * Helper for automatic pin configuration | ||
398 | */ | ||
399 | |||
400 | enum { | ||
401 | AUTO_PIN_MIC, | ||
402 | AUTO_PIN_LINE_IN, | ||
403 | AUTO_PIN_CD, | ||
404 | AUTO_PIN_AUX, | ||
405 | AUTO_PIN_LAST | ||
406 | }; | ||
407 | |||
408 | enum { | ||
409 | AUTO_PIN_LINE_OUT, | ||
410 | AUTO_PIN_SPEAKER_OUT, | ||
411 | AUTO_PIN_HP_OUT | ||
412 | }; | ||
413 | |||
414 | #define AUTO_CFG_MAX_OUTS HDA_MAX_OUTS | ||
415 | #define AUTO_CFG_MAX_INS 8 | ||
416 | |||
417 | struct auto_pin_cfg_item { | ||
418 | hda_nid_t pin; | ||
419 | int type; | ||
420 | }; | ||
421 | |||
422 | struct auto_pin_cfg; | ||
423 | const char *hda_get_autocfg_input_label(struct hda_codec *codec, | ||
424 | const struct auto_pin_cfg *cfg, | ||
425 | int input); | ||
426 | int snd_hda_get_pin_label(struct hda_codec *codec, hda_nid_t nid, | ||
427 | const struct auto_pin_cfg *cfg, | ||
428 | char *label, int maxlen, int *indexp); | ||
429 | int snd_hda_add_imux_item(struct hda_input_mux *imux, const char *label, | ||
430 | int index, int *type_index_ret); | ||
431 | |||
432 | enum { | ||
433 | INPUT_PIN_ATTR_UNUSED, /* pin not connected */ | ||
434 | INPUT_PIN_ATTR_INT, /* internal mic/line-in */ | ||
435 | INPUT_PIN_ATTR_DOCK, /* docking mic/line-in */ | ||
436 | INPUT_PIN_ATTR_NORMAL, /* mic/line-in jack */ | ||
437 | INPUT_PIN_ATTR_FRONT, /* mic/line-in jack in front */ | ||
438 | INPUT_PIN_ATTR_REAR, /* mic/line-in jack in rear */ | ||
439 | }; | ||
440 | |||
441 | int snd_hda_get_input_pin_attr(unsigned int def_conf); | ||
442 | |||
443 | struct auto_pin_cfg { | ||
444 | int line_outs; | ||
445 | /* sorted in the order of Front/Surr/CLFE/Side */ | ||
446 | hda_nid_t line_out_pins[AUTO_CFG_MAX_OUTS]; | ||
447 | int speaker_outs; | ||
448 | hda_nid_t speaker_pins[AUTO_CFG_MAX_OUTS]; | ||
449 | int hp_outs; | ||
450 | int line_out_type; /* AUTO_PIN_XXX_OUT */ | ||
451 | hda_nid_t hp_pins[AUTO_CFG_MAX_OUTS]; | ||
452 | int num_inputs; | ||
453 | struct auto_pin_cfg_item inputs[AUTO_CFG_MAX_INS]; | ||
454 | int dig_outs; | ||
455 | hda_nid_t dig_out_pins[2]; | ||
456 | hda_nid_t dig_in_pin; | ||
457 | hda_nid_t mono_out_pin; | ||
458 | int dig_out_type[2]; /* HDA_PCM_TYPE_XXX */ | ||
459 | int dig_in_type; /* HDA_PCM_TYPE_XXX */ | ||
460 | }; | ||
461 | |||
462 | #define get_defcfg_connect(cfg) \ | 399 | #define get_defcfg_connect(cfg) \ |
463 | ((cfg & AC_DEFCFG_PORT_CONN) >> AC_DEFCFG_PORT_CONN_SHIFT) | 400 | ((cfg & AC_DEFCFG_PORT_CONN) >> AC_DEFCFG_PORT_CONN_SHIFT) |
464 | #define get_defcfg_association(cfg) \ | 401 | #define get_defcfg_association(cfg) \ |
@@ -472,19 +409,6 @@ struct auto_pin_cfg { | |||
472 | #define get_defcfg_misc(cfg) \ | 409 | #define get_defcfg_misc(cfg) \ |
473 | ((cfg & AC_DEFCFG_MISC) >> AC_DEFCFG_MISC_SHIFT) | 410 | ((cfg & AC_DEFCFG_MISC) >> AC_DEFCFG_MISC_SHIFT) |
474 | 411 | ||
475 | /* bit-flags for snd_hda_parse_pin_def_config() behavior */ | ||
476 | #define HDA_PINCFG_NO_HP_FIXUP (1 << 0) /* no HP-split */ | ||
477 | #define HDA_PINCFG_NO_LO_FIXUP (1 << 1) /* don't take other outs as LO */ | ||
478 | |||
479 | int snd_hda_parse_pin_defcfg(struct hda_codec *codec, | ||
480 | struct auto_pin_cfg *cfg, | ||
481 | const hda_nid_t *ignore_nids, | ||
482 | unsigned int cond_flags); | ||
483 | |||
484 | /* older function */ | ||
485 | #define snd_hda_parse_pin_def_config(codec, cfg, ignore) \ | ||
486 | snd_hda_parse_pin_defcfg(codec, cfg, ignore, 0) | ||
487 | |||
488 | /* amp values */ | 412 | /* amp values */ |
489 | #define AMP_IN_MUTE(idx) (0x7080 | ((idx)<<8)) | 413 | #define AMP_IN_MUTE(idx) (0x7080 | ((idx)<<8)) |
490 | #define AMP_IN_UNMUTE(idx) (0x7000 | ((idx)<<8)) | 414 | #define AMP_IN_UNMUTE(idx) (0x7000 | ((idx)<<8)) |