All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: alsa-devel@alsa-project.org,
	pierre-louis.bossart@linux.intel.com, tiwai@suse.com,
	hdegoede@redhat.com, broonie@kernel.org,
	amadeuszx.slawinski@linux.intel.com
Subject: Re: [PATCH v3 3/9] ALSA: hda: Introduce snd_hdac_stream_wait_drsm()
Date: Thu, 27 Oct 2022 12:21:53 +0200	[thread overview]
Message-ID: <874jvpo9by.wl-tiwai@suse.de> (raw)
In-Reply-To: <20221027082331.1561740-4-cezary.rojewski@intel.com>

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.


Takashi

  reply	other threads:[~2022-10-27 10:22 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 [this message]
2022-10-27 10:29     ` Amadeusz Sławiński
2022-10-27 11:05       ` Takashi Iwai
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=874jvpo9by.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.