summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-17 15:53:29 +0100
committerTakashi Iwai <tiwai@suse.de>2013-01-17 15:53:29 +0100
commit0ffd534eb164fbc87e91fc54a217247ea0cfbabc (patch)
tree5c43c98bc039f7fcdb4a74437d5378ea6540d2d0 /sound/pci/hda/hda_generic.c
parent7a71bbf310cda13a713aab0c1dcf888707a54286 (diff)
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>
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r--sound/pci/hda/hda_generic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 9c06749738b1..fc3f24113ce3 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -2368,6 +2368,11 @@ static int fill_adc_nids(struct hda_codec *codec)
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;
}