ALSA: hda - Fix inconsistent input_paths after ADC reduction
authorTakashi Iwai <tiwai@suse.de>
Wed, 9 Jan 2013 08:06:18 +0000 (09:06 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sat, 12 Jan 2013 07:44:20 +0000 (08:44 +0100)
commit3a65bcdc577a338712c2eaefc194909de79d4982
tree9bd49b65d3d4adcffbf420a5d4c71ff83a436777
parent54d778b31c98b305bf47fbbabd4107a3898ebe66
ALSA: hda - Fix inconsistent input_paths after ADC reduction

In the current parser code, the input_paths[] may become inconsistent
when some of detected ADCs are dropped due to incomplete inputs, since
the driver rearranges only adc_nids[] but doesn't touch input_paths[].

This patch fixes the issue, and also it optimizes the reachability
checks by simply referring to the parsed input_paths[] instead of
calling is_reachable() again for each connection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_generic.c