All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Jeeja KP <jeeja.kp@intel.com>,
	alsa-devel@alsa-project.org, broonie@kernel.org,
	"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
	lgirdwood@gmail.com
Subject: Re: [PATCH v2 5/7] ASoC: hda - add Skylake HD audio driver
Date: Wed, 22 Apr 2015 08:31:32 +0530	[thread overview]
Message-ID: <20150422030132.GB2738@intel.com> (raw)
In-Reply-To: <s5hfv7wwpbe.wl-tiwai@suse.de>

On Sun, Apr 19, 2015 at 09:27:17AM +0200, Takashi Iwai wrote:
> At Fri, 17 Apr 2015 14:43:18 +0530,
> Vinod Koul wrote:
> > +irqreturn_t azx_interrupt(int irq, void *dev_id)
> > +{
> > +	struct hdac_bus *chip = dev_id;
> > +	u32 status;
> > +
> > +#ifdef CONFIG_PM
> > +	if (!pm_runtime_active(chip->dev))
> > +		return IRQ_NONE;
> > +#endif
> > +
> > +	spin_lock(&chip->reg_lock);
> > +
> > +	status = snd_hdac_chip_readl(chip, INTSTS);
> > +	if (status == 0 || status == 0xffffffff) {
> > +		spin_unlock(&chip->reg_lock);
> > +		return IRQ_NONE;
> > +	}
> > +	spin_unlock(&chip->reg_lock);
> > +
> > +	return IRQ_WAKE_THREAD;
> > +}
> > +
> > +irqreturn_t azx_threaded_handler(int irq, void *dev_id)
> > +{
> > +	struct hdac_bus *chip = dev_id;
> > +	u32 status;
> > +	unsigned long cookie;
> > +
> > +	status = snd_hdac_chip_readl(chip, INTSTS);
> > +	spin_lock_irqsave(&chip->reg_lock, cookie);
> > +
> > +	snd_hdac_bus_handle_stream_irq(chip, status, &azx_position_check);
> > +
> > +	/* clear rirb int */
> > +	status = snd_hdac_chip_readb(chip, RIRBSTS);
> > +	if (status & RIRB_INT_MASK) {
> > +		if (status & RIRB_INT_RESPONSE)
> > +			snd_hdac_bus_update_rirb(chip);
> > +		snd_hdac_chip_writeb(chip, RIRBSTS, RIRB_INT_MASK);
> > +	}
> > +
> > +	spin_unlock_irqrestore(&chip->reg_lock, cookie);
> > +
> > +	return IRQ_HANDLED;
> > +}
> 
> BTW, you don't need to use a threaded irq for this task.  Unlike DSP
> driver, the PCM and CORB/RIRB irq doesn't need a long time to handle.
For this yes we dont. I can move this up.

But we still need a threaded handler for DSP ops, but yes no need to wake
all the time

-- 
~Vinod

  reply	other threads:[~2015-04-22  3:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17  9:13 [PATCH v2 0/7] ASoC: hda - add ASoC Skylake HD audio driver Vinod Koul
2015-04-17  9:13 ` [PATCH v2 1/7] ALSA: hda - add ASoC device type for hda core Vinod Koul
2015-04-17  9:13 ` [PATCH v2 2/7] ALSA: hda - add generic functions to set hdac stream params Vinod Koul
2015-04-17  9:39   ` Takashi Iwai
2015-04-17 11:33     ` Vinod Koul
2015-04-17  9:13 ` [PATCH v2 3/7] ASoC: hda - add soc hda codec driver wrapper Vinod Koul
2015-04-17  9:42   ` Takashi Iwai
2015-04-17 11:34     ` Vinod Koul
2015-04-17  9:13 ` [PATCH v2 4/7] ASoC: hda - add Skylake platform driver Vinod Koul
2015-04-17  9:57   ` Takashi Iwai
2015-04-17 11:47     ` Takashi Iwai
2015-04-17 11:51     ` Vinod Koul
2015-04-17  9:13 ` [PATCH v2 5/7] ASoC: hda - add Skylake HD audio driver Vinod Koul
2015-04-17 10:06   ` Takashi Iwai
2015-04-17 12:02     ` Vinod Koul
2015-04-19  7:27   ` Takashi Iwai
2015-04-22  3:01     ` Vinod Koul [this message]
2015-04-17  9:13 ` [PATCH v2 6/7] ASoC: hda - enable ASoC " Vinod Koul
2015-04-17  9:13 ` [PATCH v2 7/7] ASoC: hda - added Skylake I2S machine driver Vinod Koul
2015-04-17  9:44   ` Lars-Peter Clausen
2015-04-17 19:06     ` Vinod Koul
2015-04-17 19:14       ` Lars-Peter Clausen
2015-04-22  3:00         ` Vinod Koul

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=20150422030132.GB2738@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jeeja.kp@intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=subhransu.s.prusty@intel.com \
    --cc=tiwai@suse.de \
    /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.