All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
Cc: Cezary Rojewski <cezary.rojewski@intel.com>,
	alsa-devel@alsa-project.org, tiwai@suse.com,
	pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com,
	broonie@kernel.org
Subject: Re: [PATCH v3 3/9] ALSA: hda: Introduce snd_hdac_stream_wait_drsm()
Date: Thu, 27 Oct 2022 13:05:49 +0200	[thread overview]
Message-ID: <87zgdhmsqa.wl-tiwai@suse.de> (raw)
In-Reply-To: <3977c2b3-ead3-3904-820a-d602aa04c51b@linux.intel.com>

On Thu, 27 Oct 2022 12:29:35 +0200,
Amadeusz Sławiński wrote:
> 
> On 10/27/2022 12:21 PM, Takashi Iwai wrote:
> > On Thu, 27 Oct 2022 10:23:25 +0200,
> > Cezary Rojewski wrote:
> >> --- a/sound/hda/hdac_stream.c
> >> +++ b/sound/hda/hdac_stream.c
> >> @@ -821,6 +821,27 @@ void snd_hdac_stream_drsm_enable(struct hdac_bus *bus,
> >>   }
> >>   EXPORT_SYMBOL_GPL(snd_hdac_stream_drsm_enable);
> >>   +/*
> >> + * snd_hdac_stream_wait_drsm - wait for HW to clear RSM for a stream
> >> + * @azx_dev: HD-audio core stream to await RSM for
> >> + *
> >> + * Returns 0 on success and -ETIMEDOUT upon a timeout.
> >> + */
> >> +int snd_hdac_stream_wait_drsm(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);
> > 
> > Remember that HD-audio bus doesn't always allow readb().  Tegra
> > requires the aligned access, for example.
> > 
> 
> The readb_poll_timeout macro was updated to take care of that,
> https://lore.kernel.org/all/20221007084856.1638302-1-amadeuszx.slawinski@linux.intel.com/
> so it should be fine?

This patch doesn't use that macro...


Takashi

  reply	other threads:[~2022-10-27 11:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27  8:23 [PATCH v3 0/9] ASoC: Intel: avs: PCM power management Cezary Rojewski
2022-10-27  8:23 ` [PATCH v3 1/9] ASoC: Intel: avs: Split pcm pages freeing operation from hw_free() Cezary Rojewski
2022-10-27  8:23 ` [PATCH v3 2/9] ASoC: Intel: avs: Introduce PCM power management routines Cezary Rojewski
2022-10-27  8:23 ` [PATCH v3 3/9] ALSA: hda: Introduce snd_hdac_stream_wait_drsm() Cezary Rojewski
2022-10-27 10:21   ` Takashi Iwai
2022-10-27 10:29     ` Amadeusz Sławiński
2022-10-27 11:05       ` Takashi Iwai [this message]
2022-10-27 11:08         ` Amadeusz Sławiński
2022-10-27 11:37         ` Cezary Rojewski
2022-10-27  8:23 ` [PATCH v3 4/9] ASoC: Intel: avs: Handle SUSPEND and RESUME triggers Cezary Rojewski
2022-10-27  8:23 ` [PATCH v3 5/9] ASoC: Intel: avs: Restart instead of resuming HDA capture streams Cezary Rojewski
2022-10-27  8:23 ` [PATCH v3 6/9] ASoC: Intel: avs: Count low power streams Cezary Rojewski
2022-10-27  8:23 ` [PATCH v3 7/9] ASoC: Intel: avs: Standby power-state support Cezary Rojewski
2022-10-27  8:23 ` [PATCH v3 8/9] ASoC: Intel: avs: Power and clock gating policy overriding Cezary Rojewski
2022-10-27  8:23 ` [PATCH v3 9/9] 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=87zgdhmsqa.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --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=pierre-louis.bossart@linux.intel.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.