diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-09-09 14:21:17 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-09-09 16:45:58 +0200 |
commit | b5786e85cb2ffd0b07e86dec38a442bd20765ad8 (patch) | |
tree | b274f05600ab04ad189f48e342d02ebebc412140 /sound/pci/hda/hda_codec.c | |
parent | 6cb3b707f95954ac18f19b4b3919af235738371a (diff) |
ALSA: hda - Keep char arrays in input_mux items
Keep char array in the input_mux item itself instead of pointing to
an external string. This is a preliminary work for improving the
input-mux name based on the pin role.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index bfdde7b0baf..4348c33c6b8 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -4662,17 +4662,8 @@ const char *auto_pin_cfg_labels[AUTO_PIN_LAST] = { }; 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) +void snd_hda_get_input_pin_label(const struct auto_pin_cfg *cfg, + int input, char *str) { int type = cfg->inputs[input].type; int idx; @@ -4681,7 +4672,10 @@ const char *snd_hda_get_input_pin_label(const struct auto_pin_cfg *cfg, if (type != cfg->inputs[input].type) break; } - return input_labels[type][idx]; + if (idx > 0) + sprintf(str, "%s %d", auto_pin_cfg_labels[type], idx); + else + strcpy(str, auto_pin_cfg_labels[type]); } EXPORT_SYMBOL_HDA(snd_hda_get_input_pin_label); |