From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31725C433DF for ; Thu, 30 Jul 2020 16:56:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0580220829 for ; Thu, 30 Jul 2020 16:56:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730008AbgG3Q4E (ORCPT ); Thu, 30 Jul 2020 12:56:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:40178 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726353AbgG3Q4E (ORCPT ); Thu, 30 Jul 2020 12:56:04 -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 F3F42AD11; Thu, 30 Jul 2020 16:56:15 +0000 (UTC) Date: Thu, 30 Jul 2020 18:56:03 +0200 Message-ID: From: Takashi Iwai To: Pierre-Louis Bossart Cc: "Lu, Brent" , "alsa-devel@alsa-project.org" , Guennadi Liakhovetski , "Rojewski, Cezary" , Kai Vehmanen , Kuninori Morimoto , Jie Yang , Takashi Iwai , "linux-kernel@vger.kernel.org" , Liam Girdwood , Sam McNally , Mark Brown , Ranjani Sridharan , Daniel Stuart , Andy Shevchenko , Yu-Hsuan Hsu , Damian van Soelen Subject: Re: [PATCH 2/2] ASoC: Intel: Add period size constraint on strago board In-Reply-To: References: <1596020585-11517-1-git-send-email-brent.lu@intel.com> <1596020585-11517-3-git-send-email-brent.lu@intel.com> <4fe97f63-e552-3b2f-803c-53894b196bfd@linux.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 Thu, 30 Jul 2020 17:27:58 +0200, Pierre-Louis Bossart wrote: > > > > >> Is this patch required if you've already constrained the period sizes for the > >> platform driver in patch1? > > > > Yes or alsa will select 320 as default period size for it. > > ok, then that's a miss in your patch1. 320 samples is a multiple of > 1ms for 48kHz rates. I think it was valid only for the 16kHz VoIP > paths used in some versions of Android, but that we don't support in > the upstream code. > > To build on Takashi's answer, the real ask here is to require that the > period be a multiple of 1ms, because that's the fundamental > design/limitation of firmware. It doesn't matter if it's 48, 96, 192, > 240, 480, 960 samples. If the 1ms alignment is the condition, it can be better with a different hw_params constraint. We can use snd_pcm_hw_constraint_step() for such a purpose. thanks, Takashi