Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4392955pxa; Mon, 10 Aug 2020 08:06:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLWlCrA/qtjpPZZ8jeSJuRPxQu0HwnOwE9FI3g3F41nTD+flXY5HLouZ3lrVtjQ5fJt+XD X-Received: by 2002:a50:af83:: with SMTP id h3mr3667024edd.139.1597071987541; Mon, 10 Aug 2020 08:06:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597071987; cv=none; d=google.com; s=arc-20160816; b=thgUiHRJcJ/UarkjdXHrSSzw0XNM0itZ0+PyJUIozCyVFDBpKh66rtBZP7gD5wsoKa jYah8auHPZgd4zWhxOiXfhiJ0mFO/szxaJgVO9+FKyHmP/loTB2UWwdo727CliFyTsvh 5ZOuypVamf2L6jLeLaXr2lQebnFFi6oPY8kvmgOO7CY1bW4qo4V2kImk9tKJ6SBkabk7 KdBYBNf5Ra8/5YtVtJ40UrY2J8K4Qqb5laQLuaF02xpWgLX1wQ3ZGwHTlZO4zIbsNPaS 0eyW4lgiWZZsQxJ2NvhKTT4d6JZruN2y9dR+VYHwWq9gqBQweEqldEX7SjOXB6tV005m 1rrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=3PnEYeZEujeOzBS21yNU9ye/DhSZMHvtxxyVsdUxIgU=; b=kJYfowhyl+SoECN6TFRKLV6GKbWGZlgxVp2Z+ThF/62GP3fAxixp5QPA7W4EjzcQfH TgkTmn1VKoZoBJcEMmO2LbWua3Z5dfASIJmLSwjyn+sRvorHdKMeKfPkaXIh0HYkO5Rc D7xkjXBVlbUaO9Ew7XGD/+W6bkrOm/3sn0F+LZZ4s4UyyyHVWnwQesbfILQjroDK4q8K Akvh0bXiubmfy3gGkGRHTq/xmo2TMdBs34FTL3wvOvROuUp+0fMLJ3q3WDApeW8oJ7fx BEyw6nSw5gcuI5TXJCitHQBTshX3pyrlFO7P+pF2Fe7MdDGQOStAsbs20qgnfvjm58fO 01yQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b16si10496056edw.147.2020.08.10.08.06.03; Mon, 10 Aug 2020 08:06: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727003AbgHJPDL (ORCPT + 99 others); Mon, 10 Aug 2020 11:03:11 -0400 Received: from mga14.intel.com ([192.55.52.115]:38032 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726499AbgHJPDK (ORCPT ); Mon, 10 Aug 2020 11:03:10 -0400 IronPort-SDR: wWHoqf6ltRmFMz3QjQMdD1POQtu2tal+juHHNOJfckx7BgmxbCBEruqYTZJQXP9Bdc/PkIjjm6 Pp5FyHYZYilw== X-IronPort-AV: E=McAfee;i="6000,8403,9708"; a="152760447" X-IronPort-AV: E=Sophos;i="5.75,457,1589266800"; d="scan'208";a="152760447" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2020 08:03:09 -0700 IronPort-SDR: 12GPmA8BCeQKGz3X7oWrHdalm2jYaMpo7RLVvb4zhfL6Ek6UshgXWdDmlDGRZyMjLYfytOv4Ny v8l1ys7ZGACg== X-IronPort-AV: E=Sophos;i="5.75,457,1589266800"; d="scan'208";a="438722426" Received: from schen8-mobl.amr.corp.intel.com (HELO [10.212.235.58]) ([10.212.235.58]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2020 08:03:07 -0700 Subject: Re: [PATCH v3 2/2] ASoC: Intel: Add period size constraint on strago board To: "Lu, Brent" , Takashi Iwai Cc: Guennadi Liakhovetski , "alsa-devel@alsa-project.org" , Kai Vehmanen , Kuninori Morimoto , "Rojewski, Cezary" , Takashi Iwai , Jie Yang , "linux-kernel@vger.kernel.org" , "yuhsuan@google.com" , Liam Girdwood , Sam McNally , Mark Brown , Ranjani Sridharan , Daniel Stuart , Andy Shevchenko , Yu-Hsuan Hsu , Damian van Soelen 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> <63bca214-3434-16c6-1b60-adf323aec554@linux.intel.com> <6466847a-8aae-24f7-d727-36ba75e95f98@linux.intel.com> From: Pierre-Louis Bossart Message-ID: <3f3baf5e-f73d-9cd6-cbfb-36746071e126@linux.intel.com> Date: Mon, 10 Aug 2020 10:03:06 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/6/20 11:41 AM, Lu, Brent wrote: >> >> I don't get this. If the platform driver already stated 240 and 960 samples why >> would 432 be chosen? Doesn't this mean the constraint is not applied? > > Hi Pierre, > > Sorry for late reply. I used following constraints in V3 patch so any period which > aligns 1ms would be accepted. > > + /* > + * Make sure the period to be multiple of 1ms to align the > + * design of firmware. Apply same rule to buffer size to make > + * sure alsa could always find a value for period size > + * regardless the buffer size given by user space. > + */ > + snd_pcm_hw_constraint_step(substream->runtime, 0, > + SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 48); > + snd_pcm_hw_constraint_step(substream->runtime, 0, > + SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 48); 432 samples is 9ms, I don't have a clue why/how CRAS might ask for this value. It'd be a bit odd to add constraints just for the purpose of letting userspace select a sensible value.