All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Linux-ALSA <alsa-devel@alsa-project.org>
Subject: Re: [PATCH 3/8] ASoC: soc-pcm: direct copy at snd_soc_set_runtime_hwparams()
Date: Fri, 5 Mar 2021 10:11:37 -0600	[thread overview]
Message-ID: <1993e30a-ea8c-8eba-dbad-8ab17380b2eb@linux.intel.com> (raw)
In-Reply-To: <87pn0epg8r.wl-kuninori.morimoto.gx@renesas.com>



On 3/4/21 6:59 PM, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> snd_soc_set_runtime_hwparams() is called from each driver
> to initialize hw parameters,
> but coping each parameters one-by-one.
> 
> Current code is not copying all parameters, but no big effect
> if we do it. This patch copies all parameters by simple code.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>   sound/soc/soc-pcm.c | 11 ++---------
>   1 file changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> index 60e688b103d8..6f2de27cf18f 100644
> --- a/sound/soc/soc-pcm.c
> +++ b/sound/soc/soc-pcm.c
> @@ -300,15 +300,8 @@ bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd)
>   int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
>   	const struct snd_pcm_hardware *hw)
>   {
> -	struct snd_pcm_runtime *runtime = substream->runtime;
> -	runtime->hw.info = hw->info;
> -	runtime->hw.formats = hw->formats;
> -	runtime->hw.period_bytes_min = hw->period_bytes_min;
> -	runtime->hw.period_bytes_max = hw->period_bytes_max;
> -	runtime->hw.periods_min = hw->periods_min;
> -	runtime->hw.periods_max = hw->periods_max;
> -	runtime->hw.buffer_bytes_max = hw->buffer_bytes_max;
> -	runtime->hw.fifo_size = hw->fifo_size;
> +	substream->runtime->hw = *hw;

This dates from commit db2a416556af0 in 2006 :-)

what was specifically excluded is the information on rates and channels.

Liam, any memories if this was intentional?

  reply	other threads:[~2021-03-05 16:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05  0:59 [PATCH v2 0/8] ASoC: soc-pcm: cleanup each functions Kuninori Morimoto
2021-03-05  0:59 ` [PATCH 1/8] ASoC: soc-pcm: check DAI activity under soc_pcm_apply_symmetry() Kuninori Morimoto
2021-03-05  0:59 ` [PATCH 2/8] ASoC: soc-pcm: add soc_cpu/codec_dai_name() macro Kuninori Morimoto
2021-03-05  0:59 ` [PATCH 3/8] ASoC: soc-pcm: direct copy at snd_soc_set_runtime_hwparams() Kuninori Morimoto
2021-03-05 16:11   ` Pierre-Louis Bossart [this message]
2021-03-05  0:59 ` [PATCH 4/8] ASoC: soc-pcm: add soc_pcm_update_symmetry() Kuninori Morimoto
2021-03-05  1:00 ` [PATCH 5/8] ASoC: soc-pcm: add soc_hw_sanity_check() Kuninori Morimoto
2021-03-05  1:00 ` [PATCH 6/8] ASoC: soc-pcm: fixup dpcm_be_dai_startup() user count Kuninori Morimoto
2021-03-05 16:14   ` Pierre-Louis Bossart
2021-03-07 22:37     ` Kuninori Morimoto
2021-03-08 13:32       ` Mark Brown
2021-03-05  1:00 ` [PATCH 7/8] ASoC: soc-pcm: remove unneeded !rtd->dai_link check Kuninori Morimoto
2021-03-05  1:00 ` [PATCH 8/8] ASoC: soc-pcm: share DPCM BE DAI stop operation Kuninori Morimoto
  -- strict thread matches above, loose matches on Subject: below --
2021-03-02  1:47 [PATCH 0/8] ASoC: soc-pcm: cleanup each functions Kuninori Morimoto
2021-03-02  1:48 ` [PATCH 3/8] ASoC: soc-pcm: direct copy at snd_soc_set_runtime_hwparams() 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=1993e30a-ea8c-8eba-dbad-8ab17380b2eb@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=liam.r.girdwood@linux.intel.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.