ALSA: hda - Fix dynamic ADC change working again
The commit eb541337b7
ALSA: hda - Make converter setups sticky
changes the semantics of snd_hda_codec_cleanup_stream() not to clean up
the stream at that moment but delay the action. This broke the codes
expecting that the clean-up is done immediately, such as dynamic ADC
changes in some codec drivers.
This patch fixes the issue by introducing a lower helper,
__snd_hda_codec_cleanup_stream(), to allow the immediate clean up.
The original snd_hda_codec_cleanup_stream() is kept as is now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -656,7 +656,7 @@ static int change_cur_input(struct hda_codec *codec, unsigned int idx,
|
||||
return 0;
|
||||
if (spec->cur_adc && spec->cur_adc != spec->adc_nid[idx]) {
|
||||
/* stream is running, let's swap the current ADC */
|
||||
snd_hda_codec_cleanup_stream(codec, spec->cur_adc);
|
||||
__snd_hda_codec_cleanup_stream(codec, spec->cur_adc, 1);
|
||||
spec->cur_adc = spec->adc_nid[idx];
|
||||
snd_hda_codec_setup_stream(codec, spec->cur_adc,
|
||||
spec->cur_adc_stream_tag, 0,
|
||||
|
Reference in New Issue
Block a user