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 16/19] ASoC: soc-card: add snd_soc_card_set_bias_level()
Date: Tue, 26 May 2020 17:23:16 -0700	[thread overview]
Message-ID: <433bd81e65c32202372b2cd4052f1fba0463bb30.camel@linux.intel.com> (raw)
In-Reply-To: <87tv031ojg.wl-kuninori.morimoto.gx@renesas.com>

On Tue, 2020-05-26 at 10:18 +0900, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Card related function should be implemented at soc-card now.
> This patch adds it.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  include/sound/soc-card.h |  4 ++++
>  sound/soc/soc-card.c     | 12 ++++++++++++
>  sound/soc/soc-dapm.c     |  4 ++--
>  3 files changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/include/sound/soc-card.h b/include/sound/soc-card.h
> index b338bbd08219..4bcdc1d382bf 100644
> --- a/include/sound/soc-card.h
> +++ b/include/sound/soc-card.h
> @@ -28,6 +28,10 @@ int snd_soc_card_probe(struct snd_soc_card *card);
>  int snd_soc_card_late_probe(struct snd_soc_card *card);
>  int snd_soc_card_remove(struct snd_soc_card *card);
>  
> +int snd_soc_card_set_bias_level(struct snd_soc_card *card,
> +				struct snd_soc_dapm_context *dapm,
> +				enum snd_soc_bias_level level);
> +
>  /* device driver data */
>  static inline void snd_soc_card_set_drvdata(struct snd_soc_card
> *card,
>  					    void *data)
> diff --git a/sound/soc/soc-card.c b/sound/soc/soc-card.c
> index 449f6cc86859..a9f25b6a4c67 100644
> --- a/sound/soc/soc-card.c
> +++ b/sound/soc/soc-card.c
> @@ -172,3 +172,15 @@ int snd_soc_card_remove(struct snd_soc_card
> *card)
>  
>  	return soc_card_ret(card, ret);
>  }
> +
> +int snd_soc_card_set_bias_level(struct snd_soc_card *card,
> +				struct snd_soc_dapm_context *dapm,
> +				enum snd_soc_bias_level level)
> +{
> +	int ret = 0;
> +
> +	if (card->set_bias_level)
> +		ret = card->set_bias_level(card, dapm, level);
> +
> +	return soc_card_ret(card, ret);
> +}
> diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
> index a4de3e4bc2ef..add39d24a583 100644
> --- a/sound/soc/soc-dapm.c
> +++ b/sound/soc/soc-dapm.c
> @@ -725,8 +725,8 @@ static int snd_soc_dapm_set_bias_level(struct
> snd_soc_dapm_context *dapm,
>  
>  	trace_snd_soc_bias_level_start(card, level);
>  
> -	if (card && card->set_bias_level)
> -		ret = card->set_bias_level(card, dapm, level);
> +	if (card)
Morimoto-san,

Why not move this check inside snd_soc_card_set_bias_level() and remove
the first parameter from the function?

Thanks,
Ranjani


  reply	other threads:[~2020-05-27  0:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26  1:15 [PATCH 00/19] ASoC: add soc-card Kuninori Morimoto
2020-05-26  1:16 ` [PATCH 01/19] ASoC: soc.h: convert bool to bit field for snd_soc_card Kuninori Morimoto
2020-05-26  1:16 ` [PATCH 02/19] ASoC: add soc-card.c Kuninori Morimoto
2020-05-27  0:26   ` Ranjani Sridharan
2020-05-28  0:03     ` Kuninori Morimoto
2020-05-28  0:35       ` Kuninori Morimoto
2020-05-26  1:16 ` [PATCH 03/19] ASoC: soc-card: move snd_soc_card_get_kcontrol() to soc-card Kuninori Morimoto
2020-05-26  1:16 ` [PATCH 04/19] ASoC: soc-card: move snd_soc_card_jack_new() " Kuninori Morimoto
2020-05-26  1:17 ` [PATCH 05/19] ASoC: soc-card: move snd_soc_card_set/get_drvdata() " Kuninori Morimoto
2020-05-26  1:17 ` [PATCH 06/19] ASoC: soc-card: move snd_soc_card_get_codec_dai() " Kuninori Morimoto
2020-05-26  1:17 ` [PATCH 07/19] ASoC: soc-card: move snd_soc_card_subclass " Kuninori Morimoto
2020-05-26  1:17 ` [PATCH 08/19] ASoC: soc-card: add snd_soc_card_suspend_pre() Kuninori Morimoto
2020-05-26  1:17 ` [PATCH 09/19] ASoC: soc-card: add snd_soc_card_suspend_post() Kuninori Morimoto
2020-05-26  1:17 ` [PATCH 10/19] ASoC: soc-card: add snd_soc_card_resume_pre() Kuninori Morimoto
2020-05-26  1:18 ` [PATCH 11/19] ASoC: soc-card: add snd_soc_card_resume_post() Kuninori Morimoto
2020-05-26  1:18 ` [PATCH 12/19] ASoC: soc-card: add probed bit field to snd_soc_card Kuninori Morimoto
2020-05-26 14:08   ` Pierre-Louis Bossart
2020-05-27 23:58     ` Kuninori Morimoto
2020-05-26  1:18 ` [PATCH 13/19] ASoC: soc-card: add snd_soc_card_probe() Kuninori Morimoto
2020-05-26  1:18 ` [PATCH 14/19] ASoC: soc-card: add snd_soc_card_late_probe() Kuninori Morimoto
2020-05-26  1:18 ` [PATCH 15/19] ASoC: soc-card: add snd_soc_card_remove() Kuninori Morimoto
2020-05-26  1:18 ` [PATCH 16/19] ASoC: soc-card: add snd_soc_card_set_bias_level() Kuninori Morimoto
2020-05-27  0:23   ` Ranjani Sridharan [this message]
2020-05-28  0:02     ` Kuninori Morimoto
2020-05-26  1:19 ` [PATCH 17/19] ASoC: soc-card: add snd_soc_card_set_bias_level_post() Kuninori Morimoto
2020-05-27  0:24   ` Ranjani Sridharan
2020-05-26  1:19 ` [PATCH 18/19] ASoC: soc-card: add snd_soc_card_add_dai_link() Kuninori Morimoto
2020-05-26  1:19 ` [PATCH 19/19] ASoC: soc-card: add snd_soc_card_remove_dai_link() Kuninori Morimoto

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=433bd81e65c32202372b2cd4052f1fba0463bb30.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.