All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org, tiwai@suse.com,
	lgirdwood@gmail.com
Subject: Re: [alsa-devel] [PATCH v3 00/11] ASoC: SOF: Data probing
Date: Tue, 28 Jan 2020 15:11:38 -0600	[thread overview]
Message-ID: <450d7f9a-239a-0251-a58f-60591cc92736@linux.intel.com> (raw)
In-Reply-To: <462e700e-96e8-8941-5de1-fd8ef5f6c18f@intel.com>


>> I am fine with this update, but I just thought of an obscure case and 
>> couldn't find the answer on my own.
>>
>> These probe points are enabled/disabled with direct IPC calls. Once 
>> those routines have been called, I don't see any context maintained by 
>> the driver (other than the stream tag for the extractor).
> 
> These do not need to be maintained by the driver at all, it's FW's job 
> actually. Notice the existence of _INFO getters for probe_points and 
> dmas. FW caches all the necessary info for us and when required, host 
> can request for it via IPCs.

D'oh. That's a major disconnect I am afraid.

When the the PCI device enters D3 on APL+, the power rails are turned 
off and the SOF firmware does not save any context. On D0 resume, the 
power rails are turned back on, firmware is downloaded again, and 
ALSA/ASoC/topology cores restore the context with a set of IPCs.

The behavior you describe might be relevant for previous versions of the 
closed-source firmware but not for SOF as of today. The 
firmware-initiated context save/restore just does not exist.

I also wonder if a firmware-only solution would work, the DMA stream 
tags are allocated on the host side, so on resume you could have a 
coherency issue with possibly mismatches.

> Driver makes use of such operation during sof_probe_compr_free(). Before 
> _probe_deinit() is called, all the probe_points should be disconnected 
> and all the dmas detached. Since this patchset addresses extraction-only 
> (from the runtime point of view), the later is ignored.
> 
>>
>> So here's my question: what happens if there is a pm_runtime or system 
>> suspend after playing with debugfs to configure those probes? Would 
>> all context be lost and the user needs to re-enable all probes?
>>
>> Also what happens if there is a system suspend while an extractor is 
>> opened, would it be restored? I imagine a pm_runtime suspend is not 
>> possible since the device is active then.

> As stated, there is no cache on the host side, caching is left up to FW 
> alone. Debugfs files act only as a ipc-proxies. As probes require device 
> to be up and running, suspend is not possible. After suspend, I believe 
> FW context would be lost so all the actions had to be repeated.
> 
> I'd suggest consulting SOF FW team in regard to probes design if you 
> want to pursue the suspend case - whether it is achievable or not.

That team is in your building :-)

suspend/resume support is a requirement for all SOF capabilities - no 
exceptions. At minimum, you would want to do a pm_runtime_get_sync() to 
prevent runtime_pm from kicking-in while probes are enabled.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2020-01-28 21:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-28 10:43 [alsa-devel] [PATCH v3 00/11] ASoC: SOF: Data probing Cezary Rojewski
2020-01-28 10:43 ` [alsa-devel] [PATCH v3 01/11] ALSA: hda: Allow for compress stream to hdac_ext_stream assignment Cezary Rojewski
2020-01-28 10:43 ` [alsa-devel] [PATCH v3 02/11] ALSA: hda: Prepare for compress stream support Cezary Rojewski
2020-01-28 10:43 ` [alsa-devel] [PATCH v3 03/11] ALSA: hda: Interrupt servicing and BDL setup for compress streams Cezary Rojewski
2020-01-28 10:43 ` [alsa-devel] [PATCH v3 04/11] ALSA: core: Expand DMA buffer information Cezary Rojewski
2020-01-28 10:59   ` Vinod Koul
2020-01-28 11:58     ` Cezary Rojewski
2020-01-29  9:08       ` Takashi Iwai
2020-01-28 10:43 ` [alsa-devel] [PATCH v3 05/11] ALSA: core: Implement compress page allocation and free routines Cezary Rojewski
2020-01-28 11:05   ` Vinod Koul
2020-01-28 10:43 ` [alsa-devel] [PATCH v3 06/11] ASoC: SOF: Intel: Account for compress streams when servicing IRQs Cezary Rojewski
2020-01-28 10:43 ` [alsa-devel] [PATCH v3 07/11] ASoC: SOF: Implement Probe IPC API Cezary Rojewski
2020-01-28 10:43 ` [alsa-devel] [PATCH v3 08/11] ASoC: SOF: Generic probe compress operations Cezary Rojewski
2020-01-29  7:48   ` Daniel Baluta
2020-01-29  9:04     ` Cezary Rojewski
2020-01-28 10:43 ` [alsa-devel] [PATCH v3 09/11] ASoC: SOF: Intel: Probe " Cezary Rojewski
2020-01-29  7:55   ` Daniel Baluta
2020-01-29  9:09     ` Cezary Rojewski
2020-01-28 10:43 ` [alsa-devel] [PATCH v3 10/11] ASoC: SOF: Provide probe debugfs support Cezary Rojewski
2020-01-28 17:54   ` Sridharan, Ranjani
2020-01-28 18:59     ` Cezary Rojewski
2020-01-29 11:43     ` Mark Brown
2020-01-28 10:43 ` [alsa-devel] [PATCH v3 11/11] ASoC: SOF: Intel: Add Probe compress CPU DAIs Cezary Rojewski
2020-01-29  8:04   ` Daniel Baluta
2020-01-29  9:24     ` Cezary Rojewski
2020-01-29  9:46       ` Daniel Baluta
2020-01-31 12:34         ` Cezary Rojewski
2020-01-28 17:55 ` [alsa-devel] [PATCH v3 00/11] ASoC: SOF: Data probing Pierre-Louis Bossart
2020-01-28 19:29   ` Cezary Rojewski
2020-01-28 21:11     ` Pierre-Louis Bossart [this message]
2020-01-31 12:44       ` Cezary Rojewski

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=450d7f9a-239a-0251-a58f-60591cc92736@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=lgirdwood@gmail.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.