All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: Jason Zhu <jason.zhu@rock-chips.com>,
	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: Mon, 26 Sep 2022 18:07:43 +0200	[thread overview]
Message-ID: <8100f26f-df84-346d-3e5c-cf9a378f8027@linux.intel.com> (raw)
In-Reply-To: <YzHGPuajS54y1SV6@sirena.org.uk>



On 9/26/22 17:33, Mark Brown wrote:
> On Mon, Sep 26, 2022 at 09:52:34AM +0200, Pierre-Louis Bossart wrote:
>> On 9/26/22 03:34, Jason Zhu wrote:
>>> 在 2022/9/23 20:55, Mark Brown 写道:
> 
>>>>> 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?
> 
>>> At present, only VAD is handled in this way by Rockchip.
> 
> The point here is that other non-Rockchip devices do similar sounding
> things?
> 
>>>> 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.
> 
>>> Yes, this looks complicated. But our chip's sram which is assigned to VAD
>>>
>>> maybe used by other devices when the system is alive.  So we have to copy
>>>
>>> sound data in sram firstly, then use the DDR(SDRAM) to record sound data.
> 
>> There are other devices that requires a copy of the history buffer from
>> one PCM device and a software stitching with the real-time data coming
>> from another PCM device. It's not ideal but not uncommon either, even
>> for upcoming SDCA devices, combining data from 2 PCM devices will be an
>> allowed option (with additional control information to help with the
>> stitching).
> 
> If this is something that's not uncommon that sounds like an even
> stronger reason for not just randomly exporting the symbols and open
> coding things in individual drivers outside of framework control.  What
> are these other use cases, or is it other instances of the same thing?
> 
> TBH this sounds like at least partly a userspace problem rather than a
> kernel one, as with other things that tie multiple audio streams
> together.

I would tend to agree, the stitching can be either handled in DSP
firmware or in user-space. In the first case the kernel would expose a
single PCM to userspace, and in the second there would be two separate
PCM devices. The kernel drivers would typically do nothing other than
deal with moving captured data if/when available.

I also don't get the notion of 'keeping some DAIs alive when closing the
card', maybe the idea is to redefine what 'D3' means or have an 'active
standby' power state that doesn't exist today. That would in contrast be
something the frameworks know about.

  reply	other threads:[~2022-09-27  7:32 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
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 [this message]
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=8100f26f-df84-346d-3e5c-cf9a378f8027@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.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.