All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Jason Zhu <jason.zhu@rock-chips.com>
Cc: sugar.zhang@rock-chips.com, alsa-devel@alsa-project.org,
	tiwai@suse.com, lgirdwood@gmail.com
Subject: Re: [PATCH 1/1] ASoC: soc-dai: export some symbols
Date: Fri, 23 Sep 2022 13:55:52 +0100	[thread overview]
Message-ID: <Yy2s2PA/C1ngeb//@sirena.org.uk> (raw)
In-Reply-To: <dfeac54a-a264-835a-f155-90eb8f093314@rock-chips.com>

[-- Attachment #1: Type: text/plain, Size: 1891 bytes --]

On Wed, Sep 21, 2022 at 10:37:06AM +0800, Jason Zhu wrote:
> 在 2022/9/20 20:47, Mark Brown 写道:
> > On Tue, Sep 20, 2022 at 11:45:45AM +0800, Jason Zhu wrote:

> > > Sometimes we need to make some dais alive when close the card, like
> > > VAD, so these functions must be exported so that they can be called.

> > I'm not sure I fully understand the use case here - why wouldn't
> > the core know about the audio stream being kept active?  For
> > something like VAD I'd expect this to be just working like a
> > normal audio path, if there's a DSP consuming the audio stream
> > then it'll keep everything open.  If there is a good use case I
> > suspect it'll be clearer if you send the users along with this
> > patch.

> Thanks. For example, we use the VAD(Voice Activity Detect) & PDM(
> Pulse Density Modulation) to record sound>. The PDM is used to
> record and copy data to DDR memory by DMA when the system is alive.
> The VAD is used to detect voice from PDM and copy data to sram
> (The sram is small) when the system is sleep. If the VAD detect
> specific sound, wake up the system and continue to record sound.
> The data can not be lost in this process. So we attach VAD & PDM
> in the same card, then close the card and wake up VAD & PDM again
> when the system is goto sleep. Like these code:

This sounds like a very normal thing with a standard audio stream -
other devices have similar VAD stuff without needing to open code access
to the PCM operations?

> When the system is waked up, open the sound card. The data in sram
> is copied firstly and close the vad. Then use the DMA to move data
> to DDR memory from PDM.

Generally things just continue to stream the voice data through the same
VAD stream IIRC - switching just adds complexity here, you don't have to
deal with joining the VAD and regular streams up for one thing.

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

  reply	other threads:[~2022-09-23 12:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20  3:45 [PATCH 0/1] Jason Zhu
2022-09-20  3:45 ` [PATCH 1/1] ASoC: soc-dai: export some symbols Jason Zhu
2022-09-20 12:47   ` Mark Brown
2022-09-21  2:37     ` Jason Zhu
2022-09-23 12:55       ` Mark Brown [this message]
2022-09-26  1:34         ` Jason Zhu
2022-09-26  7:52           ` Pierre-Louis Bossart
2022-09-26 15:33             ` Mark Brown
2022-09-26 16:07               ` Pierre-Louis Bossart
2022-09-27  3:57               ` Jason Zhu
2022-09-28 11:52                 ` Mark Brown
2022-09-29  0:52                   ` Jason Zhu
2022-09-24  4:21   ` kernel test robot
2022-09-24  4:21     ` kernel test robot

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=Yy2s2PA/C1ngeb//@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=jason.zhu@rock-chips.com \
    --cc=lgirdwood@gmail.com \
    --cc=sugar.zhang@rock-chips.com \
    --cc=tiwai@suse.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.