[alsa-devel] [PATCH v3] ASoC: rt5514: add rt5514 SPI driver

Oder Chiou oder_chiou at realtek.com
Tue May 17 04:33:16 CEST 2016


> > +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.


More information about the Alsa-devel mailing list