Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp62624pxa; Fri, 31 Jul 2020 06:37:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze5C+S5wjyyMvMQZts9bfCe8pO83Gyk68KPatTtGhbcwmPk3A7na99Vn097fkBfPLdeaEt X-Received: by 2002:a05:6402:22d9:: with SMTP id dm25mr3900481edb.2.1596202647217; Fri, 31 Jul 2020 06:37:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596202647; cv=none; d=google.com; s=arc-20160816; b=m5S52uW215OMUzVC8vt/u1ikKMDuf6NwzkwHLSAlipE62sJvofzx3FCL2VQsmZdB86 ws86mOg2l3IEHHBbZAf1k+HChDDYUpVxBqSwGm2//vOXVLy4nYlpe0wfBRCQAJ5Yod/R mCK7nq9bUtEjrWaP/37kv3bATbjc8JheiKhjPFLLJK2lXA1wZ1P2SLb95t3kbV4UyLSe 5AR8iUEg2oSBGVCrSmJVX7d4ikAD75OwwgjxhGfBku6gztbDr+J8gl2npfGaOOHBDQQx Z/uLI3TtxYnxh9i2Y2NgLZ7Q+u2V9WJvkRn8WnYJFBCIZTJovrosPCFYGcH0JmMZUMyg ahYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date; bh=wZ9EoExZJpaWgDc2mwA9/00X5BrzHoTKOeOf0dOrYE8=; b=lRpxfaodCbo6xDmM7FEan9uPwlIWEvPdowtrgcjhXY7FZKYfqYGHwszIpQcT2skwo5 r0MHBuPKPJ+rR72xjDkC4fXmHVBHBIT6jxs1qi7JC2fPq1j7XT4RL4rPXfdB7/elPWcB gntG2FPPr2Bxffz4xez9VAhUKpfC5QehBWFuRCAtLeFcaN4PCKJdsBBIUtFA3U2txz+b ZTQGkwb/e1lVlq6ratNFJgfcbkLtB0MGCF4eCXbpXgEjWdtQQYBd2JnZwzcKFt1ZZxjk rJ1odoNylv4ARWr7oTBVNLHnCF7fzZym0CshgHoDZUJWXY5GamvixcPjBuGsCgJ9yGmK 4FHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id va2si5132694ejb.14.2020.07.31.06.37.04; Fri, 31 Jul 2020 06:37:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732524AbgGaNef (ORCPT + 99 others); Fri, 31 Jul 2020 09:34:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:37388 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731388AbgGaNee (ORCPT ); Fri, 31 Jul 2020 09:34:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1DF9CAC5E; Fri, 31 Jul 2020 13:34:46 +0000 (UTC) Date: Fri, 31 Jul 2020 15:34:32 +0200 Message-ID: From: Takashi Iwai To: Brent Lu Cc: alsa-devel@alsa-project.org, Guennadi Liakhovetski , Cezary Rojewski , Kai Vehmanen , Kuninori Morimoto , linux-kernel@vger.kernel.org, Takashi Iwai , Jie Yang , Pierre-Louis Bossart , Liam Girdwood , Sam McNally , Mark Brown , Ranjani Sridharan , Yu-Hsuan Hsu , Daniel Stuart , Andy Shevchenko , Damian van Soelen Subject: Re: [PATCH v3 2/2] ASoC: Intel: Add period size constraint on strago board In-Reply-To: <1596198365-10105-3-git-send-email-brent.lu@intel.com> References: <1596020585-11517-1-git-send-email-brent.lu@intel.com> <1596198365-10105-1-git-send-email-brent.lu@intel.com> <1596198365-10105-3-git-send-email-brent.lu@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 31 Jul 2020 14:26:05 +0200, Brent Lu wrote: > > From: Yu-Hsuan Hsu > > The CRAS server does not set the period size in hw_param so ALSA will > calculate a value for period size which is based on the buffer size > and other parameters. The value may not always be aligned with Atom's > dsp design so a constraint is added to make sure the board always has > a good value. > > Cyan uses chtmax98090 and others(banon, celes, edgar, kefka...) use > rt5650. > > Signed-off-by: Yu-Hsuan Hsu > Signed-off-by: Brent Lu > --- > sound/soc/intel/boards/cht_bsw_max98090_ti.c | 14 +++++++++++++- > sound/soc/intel/boards/cht_bsw_rt5645.c | 14 +++++++++++++- > 2 files changed, 26 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c > index 835e9bd..bf67254 100644 > --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c > +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c > @@ -283,8 +283,20 @@ static int cht_codec_fixup(struct snd_soc_pcm_runtime *rtd, > > static int cht_aif1_startup(struct snd_pcm_substream *substream) > { > - return snd_pcm_hw_constraint_single(substream->runtime, > + int err; > + > + /* Set period size to 240 to align with Atom design */ > + err = snd_pcm_hw_constraint_minmax(substream->runtime, > + SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 240, 240); > + if (err < 0) > + return err; Again, is this fixed 240 is a must? Or is this also an alignment issue? thanks, Takashi