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:
@@ -1733,7 +1733,7 @@ static void cxt5051_portc_automic(struct hda_codec *codec)
|
||||
new_adc = spec->adc_nids[spec->cur_adc_idx];
|
||||
if (spec->cur_adc && spec->cur_adc != new_adc) {
|
||||
/* 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 = new_adc;
|
||||
snd_hda_codec_setup_stream(codec, new_adc,
|
||||
spec->cur_adc_stream_tag, 0,
|
||||
|
Reference in New Issue
Block a user