All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, vinod.koul@intel.com,
	patches@opensource.wolfsonmicro.com, lgirdwood@gmail.com,
	tiwai@suse.com
Subject: Re: [PATCH v3 7/8] ASoC: wm_adsp: Add a handler for the compressed IRQ
Date: Wed, 23 Dec 2015 00:19:07 +0000	[thread overview]
Message-ID: <20151223001907.GI16023@sirena.org.uk> (raw)
In-Reply-To: <1450178989-8749-8-git-send-email-ckeepax@opensource.wolfsonmicro.com>


[-- Attachment #1.1: Type: text/plain, Size: 1123 bytes --]

On Tue, Dec 15, 2015 at 11:29:48AM +0000, Charles Keepax wrote:

> +static irqreturn_t wm5110_adsp2_irq(int irq, void *data)
> +{
> +	struct wm5110_priv *florida = data;
> +
> +	wm_adsp_compr_handle_irq(&florida->core.adsp[2]);
> +
> +	return IRQ_HANDLED;
> +}

We unconditionally handle the IRQ...

> +int wm_adsp_compr_handle_irq(struct wm_adsp *dsp)
> +{
> +	struct wm_adsp_compr_buf *buf = dsp->buffer;
> +	int ret = 0;
> +
> +	mutex_lock(&dsp->pwr_lock);
> +
> +	if (!buf) {
> +		adsp_err(dsp, "Spurious buffer IRQ\n");
> +		ret = -EINVAL;
> +		goto out;
> +	}

...though we even have code to handle spurious IRQs.  I'd expect
IRQ_NONE if the interrupt wasn't handled, allowing genirq's error
handling and diagnostics to take effect.

> +static int wm_adsp_buffer_ack_irq(struct wm_adsp_compr_buf *buf)
> +{
> +	if (buf->irq_ack & 0x01)
> +		return 0;
> +
> +	adsp_dbg(buf->dsp, "Acking buffer IRQ(0x%x)\n", buf->irq_ack);
> +
> +	buf->irq_ack |= 0x01;
> +
> +	return wm_adsp_buffer_write(buf, HOST_BUFFER_FIELD(irq_ack),
> +				    buf->irq_ack);
> +}

This is confusing, this isn't actually in the interrupt path...

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2015-12-23  0:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 11:29 [PATCH v3 0/8] Add support for voice control on Arizona ADSP Charles Keepax
2015-12-15 11:29 ` [PATCH v3 1/8] ASoC: wm5110: Provide basic hookup for voice control Charles Keepax
2015-12-15 11:29 ` [PATCH v3 2/8] ASoC: wm_adsp: Factor out finding the location of an algorithm region Charles Keepax
2015-12-15 11:29 ` [PATCH v3 3/8] ALSA: compress: Add SND_AUDIOCODEC_BESPOKE Charles Keepax
2015-12-15 11:29 ` [PATCH v3 4/8] ASoC: wm_adsp: Add support for opening a compressed stream Charles Keepax
2015-12-23  0:14   ` Mark Brown
2015-12-23 10:00     ` Charles Keepax
2015-12-23 10:08       ` Charles Keepax
2015-12-15 11:29 ` [PATCH v3 5/8] ASoC: wm_adsp: Add code to locate and initialise compressed buffer Charles Keepax
2015-12-15 11:29 ` [PATCH v3 6/8] ASoC: wm_adsp: Attach buffers and streams together Charles Keepax
2015-12-15 11:29 ` [PATCH v3 7/8] ASoC: wm_adsp: Add a handler for the compressed IRQ Charles Keepax
2015-12-23  0:19   ` Mark Brown [this message]
2015-12-23  9:58     ` Charles Keepax
2015-12-24 19:31       ` Mark Brown
2015-12-29 15:43         ` Charles Keepax
2016-01-05 14:20           ` Mark Brown
2016-01-05 14:36             ` Charles Keepax
2016-01-05 16:10               ` Mark Brown
2015-12-15 11:29 ` [PATCH v3 8/8] ASoC: wm_adsp: Pull data through compressed read Charles Keepax
2016-01-06 18:12   ` Applied "ASoC: wm_adsp: Pull data through compressed read" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151223001907.GI16023@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=lgirdwood@gmail.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=tiwai@suse.com \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.