Received: by 10.213.65.68 with SMTP id h4csp3125549imn; Mon, 2 Apr 2018 22:21:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx48IRPm+RrOim7UNic14L9bXr/UTF532ms0LovPaNurpYPjJj+H9d7scv2A5OjHsjtCCStpn X-Received: by 2002:a17:902:85:: with SMTP id a5-v6mr12437228pla.99.1522732915757; Mon, 02 Apr 2018 22:21:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522732915; cv=none; d=google.com; s=arc-20160816; b=OXXxC/65u3x8RLKIeAao15w6wdHz1TIR7xz30zHuSu7I1yC1y18b92vFMojE2Fx1Yd kMX9B1QgfKONcn4FA9Dxj1OLnOMlYjsoIdS0Pnp/iJRj4jqRleN7RYzyDBYr9SJ2equs d63dSFVu1bIjWET5B7JF/FXpvOE2rHWrva2WTj1iRK8mGH+OeFF9IDXJ0Xt2+hKFwU2T 0gSrt6S19wQkBxYC4HqT6pyBV6qQhk3+eXpmqft3v/4rsmOIn2yXS4kaL2+oM0ilKvlP vAgjSjvGm/JDPt68erSaFVSVGFvld268W0uYSJEU2WKIVLXMMaTxMe0STxFfIsTyi51d qOBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=jPPQSwEWGADTFHQqHRaCWbYWlKcqtz1COUCbI2ZOQ6k=; b=W7xLaHbUtqE4gZGFj8Z7454qgZZJsYRWSIpIvt2xBHiclUGfSJDZN8Vsa4YTt/AJEX hZJRRoAFEaOXN+YQuaoOJKgNYFdusnu2SzGDRCu4gnPtfh0K2x4Ymj/ZW65q1gvOFOwc t96iozPp3f/Nn5YA/sTkqTvE/vZrVWxBqYTKkCci98xroPLoOZqr+cVDW8pREZevMwmm WVRnoDuHBAYCw2+mb2texi2lFfAQndEcvM2bCLsoRtXU2QK13ra7xnKRko//+LVFt3GP jmypaNy89qIg3R9jnXms7YJjPwhk2+DQImx1NAj9xKbfVXLmoYGN6Zs7/hJEkMK47U99 jzSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JSoddX/H; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r25si1352503pge.759.2018.04.02.22.21.06; Mon, 02 Apr 2018 22:21:55 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=JSoddX/H; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754358AbeDCFPD (ORCPT + 99 others); Tue, 3 Apr 2018 01:15:03 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:51030 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752675AbeDCFPC (ORCPT ); Tue, 3 Apr 2018 01:15:02 -0400 Received: by mail-wm0-f65.google.com with SMTP id t67so10459874wmt.0 for ; Mon, 02 Apr 2018 22:15:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=jPPQSwEWGADTFHQqHRaCWbYWlKcqtz1COUCbI2ZOQ6k=; b=JSoddX/HkEUcTvkgFzFWCUOU2Nx77zYISk8mJ0Cq3F5c7MYMVKc4A1wGdqWHnCroEW khFceCB7VipQi7OmS7CLlrx4t3F08SyCwyylROttv0zHHQhOZW+hZKWnLmCdtDUEFG4i SSU+ki94zcirWn+kjADAGycL6vgJYPtOmfRzLZgC4bT1lL5MkNQX8r2tRnIOm/ir+7mM UXN+7sW+/JTYMRCQih9L7Cqn5Tr1wzM3B3KEzpg/Q8gjIMJTJA1naN/7bTFkXjXh5Agf WAKQRxvKxhSPUOtsifHWp/zfVg0Gm/qVIaRJ/sufXaLDGsc6N0EvvXrLiHsDZg7YSmP0 86zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=jPPQSwEWGADTFHQqHRaCWbYWlKcqtz1COUCbI2ZOQ6k=; b=pCR1BJZVzm4JvshZYCMAc78QcosRDIEG4HqGcrs8OfRIDJsyBTVi4/vvV6X3C9+jUH c0Kjy28bkkGEP7RnKjJE7r/rMJnEyDt1uT2v6P1qsSRa6v7LLZxs3da5RFeitREKuQ+U C/nCr/yhqoS/0OIgpxNiLBEKD/+nY/T3MvbwbSAacLZlNpfjvjT2ILyuACFqJySAEEoy kkglxFi6vUceS21oXy4Vra0kkiGaWGRRcCyX6jg/WYNnqwQiDODSz1TFv7DYNACa/hL5 tzx/OPDuhMO5/eSQsJulxKDVKHo+mF8S4dJ1xCaHuWigNuGRRmmcjURkh5eR5U7B7trt DDng== X-Gm-Message-State: AElRT7E0MSfMCAOl3o8hVNVtQZPc7FXrIEXlSYIRP7OWjf7GKp+g0E7L jKr+go/86U9xwK1rKYai9fc= X-Received: by 10.80.250.13 with SMTP id b13mr14943066edq.290.1522732500718; Mon, 02 Apr 2018 22:15:00 -0700 (PDT) Received: from [192.168.1.3] (x4dba8717.dyn.telefonica.de. [77.186.135.23]) by smtp.gmail.com with ESMTPSA id w1sm1139559edk.82.2018.04.02.22.14.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Apr 2018 22:14:59 -0700 (PDT) Subject: Re: [PATCH v3 0/2] ASoC: topology: Improve parsing hw_configs To: Pierre-Louis Bossart Cc: Jaroslav Kysela , Takashi Iwai , Mark Brown , Pan Xiuli , Liam Girdwood , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org References: <20180327205632.3677-1-k.marinushkin@gmail.com> <17f0767a-2dea-92dd-a88e-a3f3e670d0d2@gmail.com> <461bbabf-7c36-1361-8f66-5abbe3c7f4d8@linux.intel.com> From: Kirill Marinushkin Message-ID: Date: Tue, 3 Apr 2018 07:15:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <461bbabf-7c36-1361-8f66-5abbe3c7f4d8@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/03/18 02:57, Pierre-Louis Bossart wrote: > > > On 04/02/2018 04:17 PM, Kirill Marinushkin wrote: >> Hello Pierre-Louis, >> >> I explicitly clarified with Takashi: to have this patch series merged, we need a >> tag "Reviewed-by" from you. > I am fine with the changes, but maybe while we are at it, we should clarify > what mclk_direction means? That's a good idea to have it solved within this patch series. > >     __u8 mclk_direction;    /* 0 for input, 1 for output */ > > This is really awful and might benefit for additional clarity using > codec-centric conventions. > I agree that having a clear naming will avoid confusion for future usage. I see from the code, that this variable is ignored. So we have no technical restriction on how to interpret this. I suggest to do similar to what we did for bclk_master: /* DAI mclk_direction */ #define SND_SOC_TPLG_MCLK_CO        0 /* for codec, mclk is output */ #define SND_SOC_TPLG_MCLK_CI          1 /* for codec, mclk is input */ > We also had a discussion internally and can't figure out why the strings are > different from the fields in the structure, I feel it'd be simpler to align > config and code to avoid issues but keep existing notation for backwards > compatibility, e.g. > > if (strcmp(id, "mclk_freq") == 0) || strcmp(id, "mclk_rate") == 0) { >         if (snd_config_get_string(n, &val) < 0) >                 return -EINVAL; > >             hw_cfg->mclk_rate = atoi(val); >             continue; > } I agree with this. I will also do the same (keeping backwards-compatibility) for: "format" => "fmt" "bclk" => "bclk_master" "bclk_freq" => "bclk_rate" "bclk_invert" => "invert_bclk" "fsync" => "fsync_master" "fsync_invert" => "invert_fsync" "fsync_freq" => "fsync_rate" "mclk_freq" => "mclk_rate" "mclk" => "mclk_direction" "pm_gate_clocks" => "clock_gated" If you agree with both proposals, I will add patches to this patch series, and re-send as patch v4. Or can we handle it in a better way? >> >> Patches [2] and [5]: >> You already tested them. May I put a tag "Reviewed-by" with your name into them? >> >> Patches [3] and [6]: >> Those are new for you; I added them to this patch series, because they are >> logically similar to [2] and [5]. >> Could you please review these patches? >> >> Best Regards, >> Kirill >> >> [1] [PATCH v3 0/2] ASoC: topology: Improve parsing hw_configs >> [2] [PATCH v3 1/2] ASoC: topology: Fix bclk and fsync inversion in >> set_link_hw_format() >> [3] [PATCH v3 2/2] ASoC: topology: Add missing clock gating parameter when >> parsing hw_configs >> [4] [PATCH, alsa-lib, v3 0/2] alsa-lib: ASoC: topology: Improve parsing >> hw_configs >> [5] [PATCH, alsa-lib, v3 1/2] ASoC: topology: Fix bclk and fsync inversion in >> set_link_hw_format() >> [6] [PATCH, alsa-lib, v3 2/2] ASoC: topology: Add missing clock gating >> parameter when parsing hw_configs >> >> >> On 03/27/18 22:56, Kirill Marinushkin wrote: >>> Hello Jaroslav, Takashi, Mark, >>> >>> This patch series is a resend of [1] and [2], rebased on top of the latest >>> head. It was logical to resend them together. >>> >>> It includes 2 patches for linux + 2 patches for alsa-lib. >>> >>> Please have a look. >>> >>> Best Regards, >>> Kirill >>> >>> [1] https://patchwork.kernel.org/patch/10250485/ >>> [2] https://patchwork.kernel.org/patch/10230611/ >>> >>> Kirill Marinushkin (2): >>>    ASoC: topology: Fix bclk and fsync inversion in set_link_hw_format() >>>    ASoC: topology: Add missing clock gating parameter when parsing >>>      hw_configs >>> >>>   include/uapi/sound/asoc.h | 23 ++++++++++++++++++++--- >>>   sound/soc/soc-topology.c  | 19 ++++++++++++++----- >>>   2 files changed, 34 insertions(+), 8 deletions(-) >>> >