提交 d258e24a 编写于 作者: T Takashi Iwai 提交者: Jaroslav Kysela

[ALSA] hda-codec - Add line_out_type to auto_pin_cfg struct

Added line_out_type field to auto_pin_cfg struct to provide the
pin type of default line_outs.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@suse.cz>
上级 658fba0e
...@@ -2288,12 +2288,14 @@ int __devinit snd_hda_parse_pin_def_config(struct hda_codec *codec, ...@@ -2288,12 +2288,14 @@ int __devinit snd_hda_parse_pin_def_config(struct hda_codec *codec,
sizeof(cfg->speaker_pins)); sizeof(cfg->speaker_pins));
cfg->speaker_outs = 0; cfg->speaker_outs = 0;
memset(cfg->speaker_pins, 0, sizeof(cfg->speaker_pins)); memset(cfg->speaker_pins, 0, sizeof(cfg->speaker_pins));
cfg->line_out_type = AUTO_PIN_SPEAKER_OUT;
} else if (cfg->hp_outs) { } else if (cfg->hp_outs) {
cfg->line_outs = cfg->hp_outs; cfg->line_outs = cfg->hp_outs;
memcpy(cfg->line_out_pins, cfg->hp_pins, memcpy(cfg->line_out_pins, cfg->hp_pins,
sizeof(cfg->hp_pins)); sizeof(cfg->hp_pins));
cfg->hp_outs = 0; cfg->hp_outs = 0;
memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins));
cfg->line_out_type = AUTO_PIN_HP_OUT;
} }
} }
......
...@@ -222,6 +222,12 @@ enum { ...@@ -222,6 +222,12 @@ enum {
AUTO_PIN_LAST AUTO_PIN_LAST
}; };
enum {
AUTO_PIN_LINE_OUT,
AUTO_PIN_SPEAKER_OUT,
AUTO_PIN_HP_OUT
};
extern const char *auto_pin_cfg_labels[AUTO_PIN_LAST]; extern const char *auto_pin_cfg_labels[AUTO_PIN_LAST];
struct auto_pin_cfg { struct auto_pin_cfg {
...@@ -230,6 +236,7 @@ struct auto_pin_cfg { ...@@ -230,6 +236,7 @@ struct auto_pin_cfg {
int speaker_outs; int speaker_outs;
hda_nid_t speaker_pins[5]; hda_nid_t speaker_pins[5];
int hp_outs; int hp_outs;
int line_out_type; /* AUTO_PIN_XXX_OUT */
hda_nid_t hp_pins[5]; hda_nid_t hp_pins[5];
hda_nid_t input_pins[AUTO_PIN_LAST]; hda_nid_t input_pins[AUTO_PIN_LAST];
hda_nid_t dig_out_pin; hda_nid_t dig_out_pin;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册