All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Baluta <daniel.baluta@gmail.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"robh@kernel.org" <robh@kernel.org>,
	"S.j. Wang" <shengjiu.wang@nxp.com>,
	Mark Brown <broonie@kernel.org>, dl-linux-imx <linux-imx@nxp.com>,
	Viorel Suman <viorel.suman@nxp.com>,
	"gabrielcsmo@gmail.com" <gabrielcsmo@gmail.com>,
	Daniel Baluta <daniel.baluta@nxp.com>
Subject: Re: [RFC 2/2] ASoC: Add MICFIL SoC Digital Audio Interface driver.
Date: Wed, 27 Mar 2019 15:46:33 +0200	[thread overview]
Message-ID: <CAEnQRZBTjaHVPe=iW7f7ohJHNNaZBcPr_hv6dO7ng_CiQjaxdw@mail.gmail.com> (raw)
In-Reply-To: <f3a0f305-dc96-f8b9-3c57-e45256326e2f@linux.intel.com>

On Fri, Dec 14, 2018 at 10:09 PM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
>
>
> On 12/12/18 12:14 PM, Mark Brown wrote:
> >> +static irqreturn_t voice_detected_fn(int irq, void *devid)
> >> +{
> >> +    struct fsl_micfil *micfil = (struct fsl_micfil *)devid;
> >> +    struct device *dev = &micfil->pdev->dev;
> >> +    int ret;
> >> +
> >> +    /* disable hwvad */
> >> +    ret = disable_hwvad(dev, true);
> >> +    if (ret)
> >> +            dev_err(dev, "Failed to disable HWVAD module\n");
> >> +
> >> +    /* notify userspace that voice was detected */
> >> +    kobject_uevent_env(&dev->kobj, KOBJ_CHANGE, envp);
> >> +
> >> +    return IRQ_HANDLED;
> >> +}
> > So, this looks like it's intended to be used for keyword detection type
> > applications (though without the offload DSP that those tend to have).
> > What the other implementations I've seen have ended up doing is using a
> > compressed audio stream to return the audio data to userspace, allowing
> > the audion stream to be paused when no audio is detected.  Your approach
> > here is a bit more manual and may be more sensible for systems without
> > the offload DSP however the decision to go outside ALSA and use a
> > kobject needs to be thought about a bit, we'd want to ensure that
> > there's a standard way of handling hardware like this so applications
> > can work as consistently as possible with them.
>
> There's no mention of any buffer so it's likely plain vanilla VAD here.
> We've seen two choices to warn userspace of a acoustic event, either use
> a uevent or a kcontrol. I believe we ended-up chosing the latter on the
> Intel side in the past and that was also the plan for SOF.

Reviving this discussion about VAD. Do you have any draft patches for
the interface to send events to user space?

We are now trying to upstream VAD for PDM and we are looking
at all our options.

thanks,
Daniel.

      parent reply	other threads:[~2019-03-27 13:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-10  9:21 [RFC 0/2] Add MICFIL DAI support Cosmin Samoila
2018-12-10  9:21 ` [RFC 1/2] ASoC: micfil: Add bindings for MICFIL DAI Cosmin Samoila
2018-12-20 19:56   ` Rob Herring
2018-12-10  9:21 ` [RFC 2/2] ASoC: Add MICFIL SoC Digital Audio Interface driver Cosmin Samoila
2018-12-11  1:08   ` Mark Brown
2018-12-11  9:58     ` Daniel Baluta
2018-12-11 11:22       ` Mark Brown
2018-12-11 13:58       ` Sound card init Jean Manuel JACINTO
2018-12-12 18:14   ` [RFC 2/2] ASoC: Add MICFIL SoC Digital Audio Interface driver Mark Brown
2018-12-13 10:20     ` Cosmin Samoila
2018-12-13 13:57       ` Cosmin Samoila
2018-12-13 14:33         ` Mark Brown
2018-12-13 14:31       ` Mark Brown
2018-12-14 14:54         ` Daniel Baluta
2018-12-14 18:04           ` Mark Brown
2018-12-14 20:09     ` Pierre-Louis Bossart
2018-12-17 12:18       ` Mark Brown
2018-12-17 14:13         ` Daniel Baluta
2019-03-27 13:46       ` Daniel Baluta [this message]

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='CAEnQRZBTjaHVPe=iW7f7ohJHNNaZBcPr_hv6dO7ng_CiQjaxdw@mail.gmail.com' \
    --to=daniel.baluta@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gabrielcsmo@gmail.com \
    --cc=linux-imx@nxp.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=robh@kernel.org \
    --cc=shengjiu.wang@nxp.com \
    --cc=viorel.suman@nxp.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.