[alsa-devel] [PATCH] ASoC: rt5514: Support the DSP recording continuously after the hotwording triggered
Mark Brown
broonie at kernel.org
Wed Jul 12 12:54:34 CEST 2017
On Thu, Jul 06, 2017 at 07:14:45PM +0800, Oder Chiou wrote:
> + remain_data = (cur_wp >= rt5514_dsp->buf_rp) ?
> + (cur_wp - rt5514_dsp->buf_rp) :
> + ((rt5514_dsp->buf_limit - rt5514_dsp->buf_rp) +
> + (cur_wp - rt5514_dsp->buf_base));
Please write this using a normal if statement, it'd be much easier to
read.
> +static irqreturn_t rt5514_spi_irq(int irq, void *data)
> +{
> + struct rt5514_dsp *rt5514_dsp = data;
> +
> + schedule_work(&rt5514_dsp->start_work);
> +
> + return IRQ_HANDLED;
> +}
Why not just use a threaded interrupt handler for the start_work?
That'd get you into process context.
Otherwise this looks basically fine.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20170712/94b7daa5/attachment.sig>
More information about the Alsa-devel
mailing list