diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-12-07 07:56:29 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:30:40 -0500 |
commit | 4a471b7ddfe76e39c1633d5a23a687f4b5fc0d8d (patch) | |
tree | 7ec3b5952d03751e5d5da2d6254f8ce63ba2ba05 /sound/pci/hda/patch_analog.c | |
parent | f7a9275d949cb0bf1f259a1546e52a0bf518151c (diff) |
[ALSA] hda-codec - Small clean up and fixes
Modules: HDA Codec driver,HDA generic driver
- Common labels for input pins
- Fix and clean up of Realtek codec parsers
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_analog.c')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index d1e1ded27532..1ada1b075c9a 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -1850,18 +1850,16 @@ static int new_analog_input(struct ad198x_spec *spec, hda_nid_t pin, | |||
1850 | static int ad1988_auto_create_analog_input_ctls(struct ad198x_spec *spec, | 1850 | static int ad1988_auto_create_analog_input_ctls(struct ad198x_spec *spec, |
1851 | const struct auto_pin_cfg *cfg) | 1851 | const struct auto_pin_cfg *cfg) |
1852 | { | 1852 | { |
1853 | static char *labels[AUTO_PIN_LAST] = { | ||
1854 | "Mic", "Front Mic", "Line", "Front Line", "CD", "Aux" | ||
1855 | }; | ||
1856 | struct hda_input_mux *imux = &spec->private_imux; | 1853 | struct hda_input_mux *imux = &spec->private_imux; |
1857 | int i, err; | 1854 | int i, err; |
1858 | 1855 | ||
1859 | for (i = 0; i < AUTO_PIN_LAST; i++) { | 1856 | for (i = 0; i < AUTO_PIN_LAST; i++) { |
1860 | err = new_analog_input(spec, cfg->input_pins[i], labels[i], | 1857 | err = new_analog_input(spec, cfg->input_pins[i], |
1858 | auto_pin_cfg_labels[i], | ||
1861 | i <= AUTO_PIN_FRONT_MIC); | 1859 | i <= AUTO_PIN_FRONT_MIC); |
1862 | if (err < 0) | 1860 | if (err < 0) |
1863 | return err; | 1861 | return err; |
1864 | imux->items[imux->num_items].label = labels[i]; | 1862 | imux->items[imux->num_items].label = auto_pin_cfg_labels[i]; |
1865 | imux->items[imux->num_items].index = ad1988_pin_to_adc_idx(cfg->input_pins[i]); | 1863 | imux->items[imux->num_items].index = ad1988_pin_to_adc_idx(cfg->input_pins[i]); |
1866 | imux->num_items++; | 1864 | imux->num_items++; |
1867 | } | 1865 | } |