alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Mark Brown <broonie@kernel.org>
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: Tue, 29 Dec 2015 15:43:13 +0000	[thread overview]
Message-ID: <20151229154313.GA1490@localhost.localdomain> (raw)
In-Reply-To: <20151224193137.GI579@sirena.org.uk>

On Thu, Dec 24, 2015 at 07:31:37PM +0000, Mark Brown wrote:
> On Wed, Dec 23, 2015 at 09:58:06AM +0000, Charles Keepax wrote:
> > On Wed, Dec 23, 2015 at 12:19:07AM +0000, Mark Brown wrote:
> > > On Tue, Dec 15, 2015 at 11:29:48AM +0000, Charles Keepax wrote:
> 
> > > > +static int wm_adsp_buffer_ack_irq(struct wm_adsp_compr_buf *buf)
> > > > +{
> > > > +	if (buf->irq_ack & 0x01)
> 
> > > This is confusing, this isn't actually in the interrupt path...
> 
> > Acking the last IRQ basically tells the firmware that it is free
> > to send another. There is no point in doing so until we have
> > to wait for data. As we are just actively streaming available
> > data we can progress along fine without enabling the IRQ.
> 
> > I am somewhat torn between a comment and renaming the function. I
> > will try to add some sort of reasonable comment.
> 
> This doesn't sound like it's really acknowledging an IRQ - you have
> level triggered interrupts here so if the interrupt isn't acknowledged
> the interrupt handler will constantly be called.

It kinda is acking the IRQ just at the firmware level, not the
hardware level. The physical IRQ all gets acked through regmap
so that is all handled. This code here lets the firmware know,
which it will then use to decide whether it should send a new IRQ
or not.

I could perhaps rename the function to
wm_adsp_buffer_request_irq? and buf->irq_ack to buf->irq_count?
That might make the usage a little more clear.

Thanks,
Charles

  reply	other threads:[~2015-12-29 15:43 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
2015-12-23  9:58     ` Charles Keepax
2015-12-24 19:31       ` Mark Brown
2015-12-29 15:43         ` Charles Keepax [this message]
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=20151229154313.GA1490@localhost.localdomain \
    --to=ckeepax@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).