diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-09-09 16:08:44 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-09-09 16:08:44 -0400 |
commit | 990061c28ab6c84e1120afb772b69d92d8965da8 (patch) | |
tree | 98973cef50ed22dad8bf88396cfa053c97360842 /sound | |
parent | a1c985158382cbce0b58b3264f771b3b153668a6 (diff) |
ALSA: hda - Add comments to new helper functions
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index affb4607c6da..ec38bdfad81e 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -4654,6 +4654,14 @@ static int get_line_pin_attr(unsigned int def_conf) | |||
4654 | return LINE_ATTR_NORMAL; | 4654 | return LINE_ATTR_NORMAL; |
4655 | } | 4655 | } |
4656 | 4656 | ||
4657 | /** | ||
4658 | * hda_get_input_pin_label - Give a label for the given input pin | ||
4659 | * | ||
4660 | * When check_location is true, the function checks the pin location | ||
4661 | * for mic and line-in pins, and set an appropriate prefix like "Front", | ||
4662 | * "Rear", "Internal". | ||
4663 | */ | ||
4664 | |||
4657 | const char *hda_get_input_pin_label(struct hda_codec *codec, hda_nid_t pin, | 4665 | const char *hda_get_input_pin_label(struct hda_codec *codec, hda_nid_t pin, |
4658 | int check_location) | 4666 | int check_location) |
4659 | { | 4667 | { |
@@ -4720,6 +4728,14 @@ static int check_mic_location_need(struct hda_codec *codec, | |||
4720 | return 0; | 4728 | return 0; |
4721 | } | 4729 | } |
4722 | 4730 | ||
4731 | /** | ||
4732 | * hda_get_autocfg_input_label - Get a label for the given input | ||
4733 | * | ||
4734 | * Get a label for the given input pin defined by the autocfg item. | ||
4735 | * Unlike hda_get_input_pin_label(), this function checks all inputs | ||
4736 | * defined in autocfg and avoids the redundant mic/line prefix as much as | ||
4737 | * possible. | ||
4738 | */ | ||
4723 | const char *hda_get_autocfg_input_label(struct hda_codec *codec, | 4739 | const char *hda_get_autocfg_input_label(struct hda_codec *codec, |
4724 | const struct auto_pin_cfg *cfg, | 4740 | const struct auto_pin_cfg *cfg, |
4725 | int input) | 4741 | int input) |
@@ -4737,6 +4753,13 @@ const char *hda_get_autocfg_input_label(struct hda_codec *codec, | |||
4737 | } | 4753 | } |
4738 | EXPORT_SYMBOL_HDA(hda_get_autocfg_input_label); | 4754 | EXPORT_SYMBOL_HDA(hda_get_autocfg_input_label); |
4739 | 4755 | ||
4756 | /** | ||
4757 | * snd_hda_add_imux_item - Add an item to input_mux | ||
4758 | * | ||
4759 | * When the same label is used already in the existing items, the number | ||
4760 | * suffix is appended to the label. This label index number is stored | ||
4761 | * to type_idx when non-NULL pointer is given. | ||
4762 | */ | ||
4740 | int snd_hda_add_imux_item(struct hda_input_mux *imux, const char *label, | 4763 | int snd_hda_add_imux_item(struct hda_input_mux *imux, const char *label, |
4741 | int index, int *type_idx) | 4764 | int index, int *type_idx) |
4742 | { | 4765 | { |