ALSA: hda - Record all detected ADCs in hda_gen_spec
Since the generic parser reduces the ADC list, copy the list of the
all detected ADCs and keep it.
This list can be later referred by the codec driver for finer power
controls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 9c06749..fc3f241 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -2368,6 +2368,11 @@
break;
}
spec->num_adc_nids = nums;
+
+ /* copy the detected ADCs to all_adcs[] */
+ spec->num_all_adcs = nums;
+ memcpy(spec->all_adcs, spec->adc_nids, nums * sizeof(hda_nid_t));
+
return nums;
}
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index 43a8482..a0486b1 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -142,9 +142,11 @@
unsigned int dyn_adc_idx[HDA_MAX_NUM_INPUTS];
hda_nid_t shared_mic_vref_pin;
- /* DAC list */
+ /* DAC/ADC lists */
int num_all_dacs;
hda_nid_t all_dacs[16];
+ int num_all_adcs;
+ hda_nid_t all_adcs[AUTO_CFG_MAX_OUTS];
/* path list */
struct snd_array paths;