Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3811331ybv; Mon, 10 Feb 2020 06:51:39 -0800 (PST) X-Google-Smtp-Source: APXvYqwrKN0X/GrQ0khXdRvV+C9MsTJM+f9EygHg9JdLoInn6DSmm1h7HAPqdsQtVu1V5D7TlXwi X-Received: by 2002:aca:c646:: with SMTP id w67mr993584oif.171.1581346299683; Mon, 10 Feb 2020 06:51:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581346299; cv=none; d=google.com; s=arc-20160816; b=Gw/uEj3UkHjH1ic7mvdbcC1vsdfp3YdCF3Stkz0Y2o0woqJIJZzviODfU6pp2tbaCB Hg3tyxoKwZlG0/bS4ZQ8Q2m4mppoTbtjeylq+p93Iocblfka+6aZjNHLAt0xarI9Vtql 7x5YOU0CqIuMpcEPDpfvUEw0vYd5CEhkVEzBC7a+OJ9JAwq3pYMzyNZFGVW1k08DX2tH JKyOqeetHlRV+opI123X7UU/XZAK74Fvun3jzC98LyjeUqeBLowZ2rIG0Y3m/rgrwMKI wvwbdVaZaoGSbCjLE3gHzlYfFF373yUjlxrIbhyHiKl33hrbkbUf1p36uyJMVNYmsq0M Kr/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-filter; bh=AM31Nu9OJOn3Ets32wl1am+N+bfHUPcUFazJCovf5Vw=; b=q6rLo9W0tXx4Qy83QLLMZazZJBSRy06shmFgXCbOvciOSOG1bFKEEe34eD02OJQm0+ 6WBFaJx0rr/tM/qNb65U51okUL14svC/ymi4oeugA2xtCelny5ow2/BKVSp4MWMYlP6w pS9ahcu7Ca71a1LZ1hpRUwOCisXPmxX10i+kWM7ltCY3HplojZdmb8vsh2f63clAX98b jbJA1zBQf229AUp+oni64Xe96DkkDDULpihfhpZaVnQmCmLWSlLkOUQKqAJhjYI7gsPq kliWvAOCuAarNmZJJpg3Jm96TaBt1YlMwBFFxx40AY0IhOqimaBYyzGyHTs/uBBCJAlz qGAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@serbinski.com header.s=default header.b=yFuXwYDd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1si275647ota.259.2020.02.10.06.51.28; Mon, 10 Feb 2020 06:51:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@serbinski.com header.s=default header.b=yFuXwYDd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728073AbgBJOuY (ORCPT + 99 others); Mon, 10 Feb 2020 09:50:24 -0500 Received: from mail.serbinski.com ([162.218.126.2]:44398 "EHLO mail.serbinski.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727960AbgBJOuY (ORCPT ); Mon, 10 Feb 2020 09:50:24 -0500 Received: from localhost (unknown [127.0.0.1]) by mail.serbinski.com (Postfix) with ESMTP id 06191D006F9; Mon, 10 Feb 2020 14:50:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at serbinski.com Received: from mail.serbinski.com ([127.0.0.1]) by localhost (mail.serbinski.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4SG34I_usFwg; Mon, 10 Feb 2020 09:50:17 -0500 (EST) Received: from mail.serbinski.com (localhost [127.0.0.1]) by mail.serbinski.com (Postfix) with ESMTP id 4D479D00693; Mon, 10 Feb 2020 09:50:17 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.serbinski.com 4D479D00693 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=serbinski.com; s=default; t=1581346217; bh=AM31Nu9OJOn3Ets32wl1am+N+bfHUPcUFazJCovf5Vw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=yFuXwYDdU7nP2Y6H636YQuCZ0iVIhRD8IXev+Cd1kaanj+pniISRIwhHjXMarSrpD NTzrKINGDWQ3cyAS2G04cXl/akvTvU2Sibu2lyJbBX/dB24cVSSV45r/XPm8ZBc69s i6Vw61cavVG6khsGcgUzp/2Jewf2eF7sj5HM5u4E= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 10 Feb 2020 09:50:17 -0500 From: Adam Serbinski To: Mark Brown Cc: Srini Kandagatla , Rob Herring , Bjorn Andersson , Andy Gross , Mark Rutland , Liam Girdwood , Patrick Lai , Banajit Goswami , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/8] ASoC: qdsp6: q6afe: add support to pcm ports In-Reply-To: <20200210133143.GG7685@sirena.org.uk> References: <20200207205013.12274-1-adam@serbinski.com> <20200209154748.3015-1-adam@serbinski.com> <20200209154748.3015-3-adam@serbinski.com> <20200210133143.GG7685@sirena.org.uk> User-Agent: Roundcube Webmail/1.4-beta Message-ID: <4df03448f7919187a8a056d3f10415ab@serbinski.com> X-Sender: adam@serbinski.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-02-10 08:31, Mark Brown wrote: > On Sun, Feb 09, 2020 at 10:47:42AM -0500, Adam Serbinski wrote: > >> >> +#define AFE_API_VERSION_PCM_CONFIG 0x1 >> +/* Enumeration for the auxiliary PCM synchronization signal >> + * provided by an external source. >> + */ >> + >> +#define AFE_PORT_PCM_SYNC_SRC_EXTERNAL 0x0 >> +/* Enumeration for the auxiliary PCM synchronization signal >> + * provided by an internal source. >> + */ > > This is a *weird* commenting style for these #defines and it's not > consistent within the block, I'm seeing at least 3 different styles. I will clean up the commenting. >> + default: >> + break; >> + } > > Why is this not returning an error on unsupported values? Only to be consistent with the pre-existing implementation for i2s ports. I will add an error return. > >> + >> + switch (cfg->sample_rate) { >> + case 8000: >> + pcfg->pcm_cfg.frame_setting = AFE_PORT_PCM_BITS_PER_FRAME_128; >> + break; >> + case 16000: >> + pcfg->pcm_cfg.frame_setting = AFE_PORT_PCM_BITS_PER_FRAME_64; >> + break; >> + } > > Same here. I will also add the error return here.