Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 216663
b: refs/heads/master
c: d7b1ae9
h: refs/heads/master
i:
  216661: 9fdc8af
  216659: 2085f3e
  216655: b44d3fd
v: v3
  • Loading branch information
Takashi Iwai committed Aug 30, 2010
1 parent fa0aeda commit 0093e63
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 75e0eb24ee3ec3549c2e53707dcc87e5f7a2c791
refs/heads/master: d7b1ae9d8851bd247590cf7ab53248a2dac0419f
25 changes: 24 additions & 1 deletion trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -4654,12 +4654,35 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
}
EXPORT_SYMBOL_HDA(snd_hda_parse_pin_def_config);

/* labels for input pins */
/* labels for input pins - for obsoleted config stuff */
const char *auto_pin_cfg_labels[AUTO_PIN_LAST] = {
"Mic", "Front Mic", "Line", "Front Line", "CD", "Aux"
};
EXPORT_SYMBOL_HDA(auto_pin_cfg_labels);

static const char *input_labels[AUTO_PIN_LAST][4] = {
{ "Mic", "Mic 2", "Mic 3", "Mic 4" },
{ "Front Mic", "Front Mic 2", "Front Mic 3", "Front Mic 4" },
{ "Line", "Line 2", "Line 3", "Line 4" },
{ "Front Line", "Front Line 2", "Front Line 3", "Front Line 4" },
{ "CD", "CD 2", "CD 3", "CD 4" },
{ "Aux", "Aux 2", "Aux 3", "Aux 4" },
};

const char *snd_hda_get_input_pin_label(const struct auto_pin_cfg *cfg,
int input)
{
int type = cfg->inputs[input].type;
int idx;

for (idx = 0; idx < 3 && --input >= 0; idx++) {
if (type != cfg->inputs[input].type)
break;
}
return input_labels[type][idx];
}
EXPORT_SYMBOL_HDA(snd_hda_get_input_pin_label);


#ifdef CONFIG_PM
/*
Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/pci/hda/hda_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ struct auto_pin_cfg_item {
};

struct auto_pin_cfg;
const char *snd_hda_get_input_pin_label(const struct auto_pin_cfg *cfg,
int input);

struct auto_pin_cfg {
int line_outs;
Expand Down

0 comments on commit 0093e63

Please sign in to comment.