Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: hda: ext: remove always-true conditions on host and link release

By construction a host and link DMA are always decoupled. This
decoupling happens in the assign() phase. There's no point in checking
if the two parts are decoupled, this is by-design always-true.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20220919121041.43463-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Pierre-Louis Bossart and committed by
Takashi Iwai
c6fe6be6 ac3467ad

+4 -2
+4 -2
sound/hda/ext/hdac_ext_stream.c
··· 382 382 383 383 case HDAC_EXT_STREAM_TYPE_HOST: 384 384 spin_lock_irq(&bus->reg_lock); 385 - if (hext_stream->decoupled && !hext_stream->link_locked) 385 + /* couple link only if not in use */ 386 + if (!hext_stream->link_locked) 386 387 snd_hdac_ext_stream_decouple_locked(bus, hext_stream, false); 387 388 snd_hdac_stream_release_locked(&hext_stream->hstream); 388 389 spin_unlock_irq(&bus->reg_lock); ··· 391 390 392 391 case HDAC_EXT_STREAM_TYPE_LINK: 393 392 spin_lock_irq(&bus->reg_lock); 394 - if (hext_stream->decoupled && !hext_stream->hstream.opened) 393 + /* couple host only if not in use */ 394 + if (!hext_stream->hstream.opened) 395 395 snd_hdac_ext_stream_decouple_locked(bus, hext_stream, false); 396 396 hext_stream->link_locked = 0; 397 397 hext_stream->link_substream = NULL;