All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: Re: [PATCH 03/17] ASoC: soc-dai: add snd_soc_component_activity()
Date: Mon, 11 May 2020 15:47:48 -0700	[thread overview]
Message-ID: <fca796666d656c06b7cf28a3a74b2a444f082cc1.camel@linux.intel.com> (raw)
In-Reply-To: <871rnr9fq5.wl-kuninori.morimoto.gx@renesas.com>

On Mon, 2020-05-11 at 14:56 +0900, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  include/sound/soc-component.h | 1 +
>  sound/soc/soc-pcm.c           | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/sound/soc-component.h b/include/sound/soc-
> component.h
> index 864983b09846..29b0c2c1d2db 100644
> --- a/include/sound/soc-component.h
> +++ b/include/sound/soc-component.h
> @@ -358,6 +358,7 @@ int snd_soc_component_stream_event(struct
> snd_soc_component *component,
>  				   int event);
>  int snd_soc_component_set_bias_level(struct snd_soc_component
> *component,
>  				     enum snd_soc_bias_level level);
> +#define snd_soc_component_activity(component)	((component)-
> >active)
>  
>  #ifdef CONFIG_REGMAP
>  void snd_soc_component_init_regmap(struct snd_soc_component
> *component,
> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> index e923e3746fec..420595356111 100644
> --- a/sound/soc/soc-pcm.c
> +++ b/sound/soc/soc-pcm.c
> @@ -267,7 +267,7 @@ static void snd_soc_runtime_action(struct
> snd_soc_pcm_runtime *rtd,
>  	for_each_rtd_dais(rtd, i, dai) {
>  		dai->stream_active[stream] += action;
>  		dai->active += action;
> -		dai->component->active += action;
> +		snd_soc_component_activity(dai->component) += action;

This is not very easy to comprehend. Maybe we could introduce another
macro for updating the usage count for the component and use that
instead? something like, snd_soc_component_update_usage_count(dai-
>component, action)?
Thanks,
Ranjani


  parent reply	other threads:[~2020-05-12  1:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11  5:55 [PATCH 00/17] ASoC: cleanup DAI/Component activity Kuninori Morimoto
2020-05-11  5:56 ` [PATCH 01/17] ASoC: soc-dai: add snd_soc_dai_activity() Kuninori Morimoto
2020-05-11 22:37   ` Ranjani Sridharan
2020-05-11 22:42   ` Ranjani Sridharan
2020-05-11  5:56 ` [PATCH 02/17] ASoC: use snd_soc_dai/component_activity() Kuninori Morimoto
2020-05-11 22:44   ` Ranjani Sridharan
2020-05-11 23:53     ` Kuninori Morimoto
2020-05-12  0:55       ` Ranjani Sridharan
2020-05-12  4:06         ` Kuninori Morimoto
2020-05-11  5:56 ` [PATCH 03/17] ASoC: soc-dai: add snd_soc_component_activity() Kuninori Morimoto
2020-05-11 19:07   ` Pierre-Louis Bossart
2020-05-11 22:47   ` Ranjani Sridharan [this message]
2020-05-11  5:56 ` [PATCH 04/17] ASoC: atomel: use snd_soc_dai/component_activity() Kuninori Morimoto
2020-05-11  5:56 ` [PATCH 05/17] ASoC: bcm: " Kuninori Morimoto
2020-05-11  5:57 ` [PATCH 06/17] ASoC: cirrus: " Kuninori Morimoto
2020-05-11  5:57 ` [PATCH 07/17] ASoC: codecs: " Kuninori Morimoto
2020-05-11  5:57 ` [PATCH 08/17] ASoC: fsl: " Kuninori Morimoto
2020-05-11  5:57 ` [PATCH 09/17] ASoC: intel: " Kuninori Morimoto
2020-05-11  5:57 ` [PATCH 10/17] ASoC: jz4740: " Kuninori Morimoto
2020-05-11  5:57 ` [PATCH 11/17] ASoC: mediatek: " Kuninori Morimoto
2020-05-11  5:57 ` [PATCH 12/17] ASoC: meson: " Kuninori Morimoto
2020-05-11  5:57 ` [PATCH 13/17] ASoC: pxa: " Kuninori Morimoto
2020-05-11  5:57 ` [PATCH 14/17] ASoC: ti: " Kuninori Morimoto
2020-05-11  5:57 ` [PATCH 15/17] ASoC: uniphier: " Kuninori Morimoto
2020-05-11  5:57 ` [PATCH 16/17] ASoC: cleanup dai / component active code Kuninori Morimoto
2020-05-11  5:58 ` [PATCH 17/17] ASoC: soc-dai: add snd_soc_dai_stream_activity() Kuninori Morimoto
2020-05-11  8:12   ` kbuild test robot
2020-05-11  8:12   ` kbuild 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=fca796666d656c06b7cf28a3a74b2a444f082cc1.camel@linux.intel.com \
    --to=ranjani.sridharan@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.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.