ALSA: hda - Fix the connection selection of ADCs on Cirrus codecs

spec->cur_adc isn't set until cs_capture_pcm_prepare() is called although
the driver tries to select the connection at init time and at auto-mic
switch.  This results in the access to the widget NID 0, which is
obviously invalid, also a wrong capture source.

This patch fixes the issue by issuing the connect-select verb conditionally
at appropriate places.

Reported-and-tested-by: Dylan Reid <>
Cc: <>
Signed-off-by: Takashi Iwai <>
1 file changed