Alsa-Devel Archive on 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>,
	alsa-devel@alsa-project.org,  broonie@kernel.org
Cc: hdegoede@redhat.com, tiwai@suse.com, amadeuszx.slawinski@linux.intel.com
Subject: Re: [PATCH 2/8] ASoC: Intel: avs: Introduce PCM power management routines
Date: Thu, 20 Oct 2022 09:14:30 -0500	[thread overview]
Message-ID: <390775f4-5eca-b9a1-0474-69a182e66c11@linux.intel.com> (raw)
In-Reply-To: <247013af-31a2-2013-aae5-ea55eb4eb482@intel.com>



On 10/20/22 02:56, Cezary Rojewski wrote:
> On 2022-10-19 8:02 PM, Pierre-Louis Bossart wrote:
> 
> ...
> 
>> This is clearly going to conflict with my own rename/move changes in
>> "ALSA/ASoC: hda: move SPIB/DRMS functionality from ext layer"
>>
>> The SPIB and DRMS handling are not DSP-specific and should be handled in
>> the 'generic' sound/hda layer. In theory the HDaudio legacy driver
>> should have used those capabilities.
>>
>> It should be a simple rebase though for this patch.
> 
> No problem with waiting for the series you mention to be merged first.
> Will rebase once it's done.
> 
> Also, that's a good point in regard to DRSM. This could indeed be added
> into common sound/hda lib. Something like below perhaps?

Between SPIB and DRSM, I would pick SPIB as the most interesting for the
legacy HDaudio driver. This prevents the DMA hardware from playing stale
data and would allow for xruns to be detected in cleaner ways. The
programming sequences are relatively straightforward when the .ack is used.

I must admit my ignorance of how DRSM works exactly. We haven't used it
in the SOF driver where INFO_RESUME is disabled, and with a DSP I am not
too sure how to restart precisely from the same location with all the
intermediate buffering and processing that may happen.

> int snd_hdac_stream_resume(struct hdac_stream *azx_dev)
> {
>         struct hdac_bus *bus = azx_dev->bus;
>         u32 mask, reg;
>         int ret;
> 
>         mask = 1 << azx_dev->index;
> 
>         ret = readb_poll_timeout(bus->drsmcap + AZX_REG_DRSM_CTL, reg,
> !(reg & mask), 250, 2000);
>         if (ret)
>                 dev_dbg(bus->dev, "polling RSM 0x%08x failed: %d\n",
> mask, ret);
>         return ret;
> }
> EXPORT_SYMBOL_GPL(snd_hdac_stream_resume);

  reply	other threads:[~2022-10-20 14:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19 17:53 [PATCH 0/8] ASoC: Intel: avs: PCM power management Cezary Rojewski
2022-10-19 17:53 ` [PATCH 1/8] ASoC: Intel: avs: Split pcm pages freeing operation from hw_free() Cezary Rojewski
2022-10-19 17:53 ` [PATCH 2/8] ASoC: Intel: avs: Introduce PCM power management routines Cezary Rojewski
2022-10-19 18:02   ` Pierre-Louis Bossart
2022-10-20  7:56     ` Cezary Rojewski
2022-10-20 14:14       ` Pierre-Louis Bossart [this message]
2022-10-19 17:53 ` [PATCH 3/8] ASoC: Intel: avs: Handle SUSPEND and RESUME triggers Cezary Rojewski
2022-10-19 17:53 ` [PATCH 4/8] ASoC: Intel: avs: Restart instead of resuming HDA capture streams Cezary Rojewski
2022-10-19 17:53 ` [PATCH 5/8] ASoC: Intel: avs: Count low power streams Cezary Rojewski
2022-10-19 17:53 ` [PATCH 6/8] ASoC: Intel: avs: Standby power-state support Cezary Rojewski
2022-10-20  8:09   ` kernel test robot
2022-10-19 17:53 ` [PATCH 7/8] ASoC: Intel: avs: Power and clock gating policy overriding Cezary Rojewski
2022-10-19 17:53 ` [PATCH 8/8] ASoC: Intel: avs: Enact power gating policy 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=390775f4-5eca-b9a1-0474-69a182e66c11@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=hdegoede@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox