From: Takashi Iwai <tiwai@suse.de>
To: Vinod Koul <vinod.koul@intel.com>
Cc: alsa-devel@alsa-project.org, patches.audio@intel.com,
liam.r.girdwood@linux.intel.com, broonie@kernel.org,
Jeeja KP <jeeja.kp@intel.com>,
"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
Subject: Re: [PATCH v3 5/7] ASoC: intel - add Skylake HDA audio driver
Date: Thu, 30 Apr 2015 12:18:55 +0200 [thread overview]
Message-ID: <s5hsibhex68.wl-tiwai@suse.de> (raw)
In-Reply-To: <20150430101140.GN3521@localhost>
At Thu, 30 Apr 2015 15:41:40 +0530,
Vinod Koul wrote:
>
> On Wed, Apr 29, 2015 at 02:49:05PM +0200, Takashi Iwai wrote:
> > At Wed, 29 Apr 2015 01:24:28 +0530,
> > Vinod Koul wrote:
> > >
> > > +MODULE_LICENSE("GPL v2");
> > > +MODULE_SUPPORTED_DEVICE("{Intel, PCH},");
> > > +MODULE_DESCRIPTION("Intel aDSP HDA driver");
> >
> > Are the descriptions correct?
> What am i missing?
Is it for PCH?
Well, we've had entries for MODULE_SUPPORTED_DEVICE() that have been
used for alsaconf script. But nowadays it's really obsoleted, and I
think we should get rid of MODULE_SUPPORTED_DEVICE() line for avoiding
confusion.
> > > +static irqreturn_t azx_interrupt(int irq, void *dev_id)
> > > +{
> > > + struct soc_hdac_bus *sbus = dev_id;
> > > + struct hdac_bus *bus = hdac_bus(sbus);
> > > + u32 status;
> > > +
> > > +#ifdef CONFIG_PM
> > > + if (!pm_runtime_active(bus->dev))
> > > + return IRQ_NONE;
> > > +#endif
> > > +
> > > + spin_lock(&bus->reg_lock);
> > > +
> > > + status = snd_hdac_chip_readl(bus, INTSTS);
> > > + if (status == 0 || status == 0xffffffff) {
> > > + spin_unlock(&bus->reg_lock);
> > > + return IRQ_NONE;
> > > + }
> > > +
> > > + /* clear rirb int */
> > > + status = snd_hdac_chip_readb(bus, RIRBSTS);
> > > + if (status & RIRB_INT_MASK) {
> > > + if (status & RIRB_INT_RESPONSE)
> > > + snd_hdac_bus_update_rirb(bus);
> > > + snd_hdac_chip_writeb(bus, RIRBSTS, RIRB_INT_MASK);
> > > + return IRQ_HANDLED;
> >
> > An irq may have both RIRB and stream irq bits set. If we return
> > IRQ_HANDLED here, I suppose the stream irqs won't be handled.
> They will be in the thread handler.
... and it's woken up only when IRQ_WAKE_THREAD is returned.
> Also worth mentioning here is that the
> aDSP interrupts will be handled by IPC code (shared interrupt)
>
> Now yes we are missing fallback to coupled mode, if aDSP fails then stream
> should be handled here, will add that
>
> >
> > > + }
> > > +
> > > + spin_unlock(&bus->reg_lock);
> > > + return IRQ_WAKE_THREAD;
> > > +}
> >
> > The threaded irq handler checks only the stream irqs, so better to
> > check INTSTS here. That is, something like:
> > return snd_hdac_chip_readl(bus, INTSTS) ? IRQ_WAKE_THREAD : IRQ_HANDLED;
> Yes that makese sense
(snip)
> > > +static int azx_add_codec_device(int addr, struct hdac_bus *bus)
> > > +{
> > > + struct hdac_device *hdev = NULL;
> > > + char name[10];
> > > + int ret;
> > > +
> > > + hdev = devm_kzalloc(bus->dev, sizeof(*hdev), GFP_KERNEL);
> > > + if (!hdev)
> > > + return -ENOMEM;
> > > +
> > > + snprintf(name, sizeof(name), "codec#%03x", addr);
> >
> > The name should be unique, and this would conflict when there are
> > multiple sound cards with the same codec address. The legacy driver,
> > for example, encodes the name with the card index and the codec
> > address.
> would we have multiple cards on a system with hda codecs? I am not too sure,
> but yes lets add this
Yes, typically with discrete graphics (AMD or Nvidia).
Takashi
next prev parent reply other threads:[~2015-04-30 10:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 19:54 [PATCH v3 0/7] ASoC: intel - add skylake PCM driver Vinod Koul
2015-04-28 19:54 ` [PATCH v3 1/7] ASoC: hda - add soc hda codec driver wrapper Vinod Koul
2015-04-29 11:59 ` Takashi Iwai
2015-05-04 13:12 ` Mark Brown
2015-05-06 3:47 ` Vinod Koul
2015-05-06 12:51 ` Mark Brown
2015-05-06 16:51 ` Vinod Koul
2015-04-28 19:54 ` [PATCH v3 2/7] ALSA: hda - add new HDA registers Vinod Koul
2015-04-29 10:41 ` Takashi Iwai
2015-04-29 10:57 ` Vinod Koul
2015-04-29 12:02 ` Takashi Iwai
2015-04-28 19:54 ` [PATCH v3 3/7] ASoC: hda - adds SoC controller and stream operations Vinod Koul
2015-04-29 12:26 ` Takashi Iwai
2015-04-30 9:35 ` Vinod Koul
2015-04-30 9:49 ` Takashi Iwai
2015-04-28 19:54 ` [PATCH v3 4/7] ASoC: intel - add Skylake HDA platform driver Vinod Koul
2015-04-29 12:31 ` Takashi Iwai
2015-04-30 9:42 ` Vinod Koul
2015-04-30 9:52 ` Takashi Iwai
2015-04-30 10:39 ` Vinod Koul
2015-04-28 19:54 ` [PATCH v3 5/7] ASoC: intel - add Skylake HDA audio driver Vinod Koul
2015-04-29 12:49 ` Takashi Iwai
2015-04-30 10:11 ` Vinod Koul
2015-04-30 10:18 ` Takashi Iwai [this message]
2015-04-28 19:54 ` [PATCH v3 6/7] ASoC: intel - add makefile support for SKL driver Vinod Koul
2015-04-28 19:54 ` [PATCH v3 7/7] ASoC: intel - adds support for decoupled mode in skl driver 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=s5hsibhex68.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jeeja.kp@intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=patches.audio@intel.com \
--cc=subhransu.s.prusty@intel.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