Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3941672ybv; Mon, 10 Feb 2020 09:14:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxK2xhXRGCBQHi1MwXVPuwU+h2/PXuTjoVU1yHYB2f1w9cPtsZiHqzubQZYaDqcUOLYOIOM X-Received: by 2002:aca:cf12:: with SMTP id f18mr40179oig.81.1581354847747; Mon, 10 Feb 2020 09:14:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581354847; cv=none; d=google.com; s=arc-20160816; b=F43kC8O/0VrNwOYPrSUsw6vtFsT6M3dZRLFc39dlik+fhicIEMJIlGtonefykuo1H/ Hu2qFHSfmQB+sqQoBYLJv+grASNGjDi3oUwy2o9km0UGwXaQEz3TB0CXJIcXQf3YDixU 7qxFJ4R7qKQ2YDuaMn877FJFSXjztJ8zD5Y0Z8CnwndEz7sYAPsoSCaDxvqoutuB0NDx mQAhNLkHo9H6HAlIOFtcBGqbMEBrAzIpqDJDH2dzk+rlQcxG96Ee7+39Ssemq+LOlx+Y Qycu4s96zlalCpMbpgWo/lYIZKjL+X2TJrtIamtUbW4QmScbt2+hwZlpPjgpKtnFmXQo 8geg== 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:dkim-signature; bh=DSU+tE7/gI2emqC2rIzadepHX0f2kKadx71NAW+DB9c=; b=Sf9r9pB5kW2n81emrc7faEdn+rzZqdGBC14yItHmHYX25SFGZ9Kby/MHOjO/8QO7pW //oK8COaFvml7O0qA2g+KiuitQC9NSH2zQzt/eJ7hyNw0yVWNg8kOP8tHXDwuhPYert3 YOsSUYUosdF0lYrYBL8dsjMdsoHv5C/xkNr0juz5zt3mIydc0PF3KB7Qye1ThKlRsqNN J/hfUSM/D23942rVdmShnoEn+I6NAv6mQHCOK6AF2D0WfLWVkgvDRFtjweimJSGBfBVn ecbb5pQiFWgzkr89Vc53c+jXAVEu77B/II1Tvz3RHh9P+1/IxNTTSr604g0jiyfaPr7T H+dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mJ2x+0R0; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9si432213ota.103.2020.02.10.09.13.55; Mon, 10 Feb 2020 09:14:07 -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=@linaro.org header.s=google header.b=mJ2x+0R0; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727963AbgBJRNi (ORCPT + 99 others); Mon, 10 Feb 2020 12:13:38 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39668 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727628AbgBJRNi (ORCPT ); Mon, 10 Feb 2020 12:13:38 -0500 Received: by mail-wr1-f67.google.com with SMTP id y11so8753759wrt.6 for ; Mon, 10 Feb 2020 09:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=DSU+tE7/gI2emqC2rIzadepHX0f2kKadx71NAW+DB9c=; b=mJ2x+0R0KG/zW9mIk2M541OD92fCUzci3ZA329+8cFqWKkKoiYinhkyd1Jrxr6rS6o XzAdYkfUKOg8fLKFIuQLVAtDlVky8uxBVPPeEZVK1N4BX2ybShGvTRvZtumVm6OHfrIq XOyc0/kGBjxkdPEt41xI+CVY3WQM0UQtYwmrQNC4kp/zAVMslhWKnjTJJnInArcQwtls fY1X5FX7K14iEp44Q/RVA8efFh5NjzSaBfQwNJHRMeMzB57wlDqxplKrCv/I8BdpZTyG XZlOO4zgEJC4kThvpMC/eudPXsSHKe0GwibyEQECmv0IJxekTVidJ9XRo8VGQxZmcClm /FZg== 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-language :content-transfer-encoding; bh=DSU+tE7/gI2emqC2rIzadepHX0f2kKadx71NAW+DB9c=; b=NqPDcdDyeRsYoCXb9lr389uHpsv5Y9RK+ok2g227zWI525bkn0oPqy3TTALSFxTCbR AiEhLt6NMBUlN+4iIt6tDqNJ+hblazJY+OXArUKvfmkzYylEGPviln7TtQqJctUcuF+k JQFSUgDTpta8hgiGdERThw+vYynsjmJAGaQs7pRVVu1sug0XxQBx5Tza0NdfHlU32DNP eYppehfkKrKDbX8v/96p8/EU1qs+f9FVXETGPFv7c1nRwZGGFMDoTzS1s5eGrIsAxBHm KzRQaE4JZoATC14AJL/uDUtozL4wTQtafHpdO4q0SH1EuhQmcSM0U3n2uxJ7jsyTg6Kd wBFw== X-Gm-Message-State: APjAAAXcKdJ8BdE8xSbzjYKvPd5dbbJdiSF//Zff2oHFzA28QyN2EiPM jVC++FJ53MfYLTCN5pZHUSD5cWf7keY= X-Received: by 2002:adf:dfc8:: with SMTP id q8mr3005070wrn.135.1581354814017; Mon, 10 Feb 2020 09:13:34 -0800 (PST) Received: from [192.168.86.34] (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.googlemail.com with ESMTPSA id d22sm1344739wmd.39.2020.02.10.09.13.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Feb 2020 09:13:33 -0800 (PST) Subject: Re: [PATCH v2 3/8] ASoC: qdsp6: q6afe-dai: add support to pcm port dais To: Adam Serbinski , Mark Brown , Rob Herring , Bjorn Andersson Cc: 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 References: <20200207205013.12274-1-adam@serbinski.com> <20200209154748.3015-1-adam@serbinski.com> <20200209154748.3015-4-adam@serbinski.com> From: Srinivas Kandagatla Message-ID: Date: Mon, 10 Feb 2020 17:13:32 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20200209154748.3015-4-adam@serbinski.com> 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 Few minor comments On 09/02/2020 15:47, Adam Serbinski wrote: > This patch adds support of AFE DAI for PCM port. > > Signed-off-by: Adam Serbinski > CC: Andy Gross > CC: Mark Rutland > CC: Liam Girdwood > CC: Patrick Lai > CC: Banajit Goswami > CC: Jaroslav Kysela > CC: Takashi Iwai > CC: alsa-devel@alsa-project.org > CC: linux-arm-msm@vger.kernel.org > CC: devicetree@vger.kernel.org > CC: linux-kernel@vger.kernel.org > --- > sound/soc/qcom/qdsp6/q6afe-dai.c | 198 ++++++++++++++++++++++++++++++- > 1 file changed, 197 insertions(+), 1 deletion(-) > > diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c > index c1a7624eaf17..23b29591ef47 100644 > --- a/sound/soc/qcom/qdsp6/q6afe-dai.c > +++ b/sound/soc/qcom/qdsp6/q6afe-dai.c ... > +static int q6afe_tdm_set_sysclk(struct snd_soc_dai *dai, > + int clk_id, unsigned int freq, int dir) > +{ Why are we adding exactly duplicate function of q6afe_mi2s_set_sysclk here? > + struct q6afe_dai_data *dai_data = dev_get_drvdata(dai->dev); > + struct q6afe_port *port = dai_data->port[dai->id]; > + > + switch (clk_id) { > + case LPAIF_DIG_CLK: > + return q6afe_port_set_sysclk(port, clk_id, 0, 5, freq, dir); > + case LPAIF_BIT_CLK: > + case LPAIF_OSR_CLK: > + return q6afe_port_set_sysclk(port, clk_id, > + Q6AFE_LPASS_CLK_SRC_INTERNAL, > + Q6AFE_LPASS_CLK_ROOT_DEFAULT, > + freq, dir); > case Q6AFE_LPASS_CLK_ID_PRI_TDM_IBIT ... Q6AFE_LPASS_CLK_ID_QUIN_TDM_EBIT: > return q6afe_port_set_sysclk(port, clk_id, > Q6AFE_LPASS_CLK_ATTRIBUTE_INVERT_COUPLE_NO, > @@ -468,6 +520,11 @@ static const struct snd_soc_dapm_route q6afe_dapm_routes[] = { > {"Tertiary MI2S Playback", NULL, "TERT_MI2S_RX"}, > {"Quaternary MI2S Playback", NULL, "QUAT_MI2S_RX"}, > > + {"Primary PCM Playback", NULL, "PRI_PCM_RX"}, > + {"Secondary PCM Playback", NULL, "SEC_PCM_RX"}, > + {"Tertiary PCM Playback", NULL, "TERT_PCM_RX"}, > + {"Quaternary PCM Playback", NULL, "QUAT_PCM_RX"}, > + > {"Primary TDM0 Playback", NULL, "PRIMARY_TDM_RX_0"}, > {"Primary TDM1 Playback", NULL, "PRIMARY_TDM_RX_1"}, > {"Primary TDM2 Playback", NULL, "PRIMARY_TDM_RX_2"}, > @@ -562,6 +619,11 @@ static const struct snd_soc_dapm_route q6afe_dapm_routes[] = { > {"PRI_MI2S_TX", NULL, "Primary MI2S Capture"}, > {"SEC_MI2S_TX", NULL, "Secondary MI2S Capture"}, > {"QUAT_MI2S_TX", NULL, "Quaternary MI2S Capture"}, > + > + {"PRI_PCM_TX", NULL, "Primary PCM Capture"}, > + {"SEC_PCM_TX", NULL, "Secondary PCM Capture"}, > + {"TERT_PCM_TX", NULL, "Tertiary PCM Capture"}, > + {"QUAT_PCM_TX", NULL, "Quaternary PCM Capture"}, > }; > ... > > + SND_SOC_DAPM_AIF_IN("QUAT_PCM_RX", NULL, > + 0, 0, 0, 0), This can be in single line, same for below > + SND_SOC_DAPM_AIF_OUT("QUAT_PCM_TX", NULL, > + 0, 0, 0, 0), > + SND_SOC_DAPM_AIF_IN("TERT_PCM_RX", NULL, > + 0, 0, 0, 0), > + SND_SOC_DAPM_AIF_OUT("TERT_PCM_TX", NULL, > + 0, 0, 0, 0), > + SND_SOC_DAPM_AIF_IN("SEC_PCM_RX", NULL, > + 0, 0, 0, 0), > + SND_SOC_DAPM_AIF_OUT("SEC_PCM_TX", NULL, > + 0, 0, 0, 0), > + SND_SOC_DAPM_AIF_IN("PRI_PCM_RX", NULL, > + 0, 0, 0, 0), > + SND_SOC_DAPM_AIF_OUT("PRI_PCM_TX", NULL, > + 0, 0, 0, 0), > +