> > +static void rt5514_spi_copy_work(struct work_struct *work) > > +{ > > + struct rt5514_dsp *rt5514_dsp = > > + container_of(work, struct rt5514_dsp, copy_work.work); > > + struct snd_pcm_runtime *runtime = rt5514_dsp->substream->runtime; > > + size_t period_bytes, truncated_bytes = 0; > > I can't see anything that cancels this work when the PCM stream to > userspace is stopped or if things power off otherwise? > In the beginning of the function "rt5514_spi_copy_work", there is a if condition to check the variable "rt5514_dsp->substream", and the function "rt5514_spi_hw_free" will set the variable "rt5514_dsp->substream" to NULL. It also will make the delayed work stop and won't schedule again. _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel