Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp815895pxb; Tue, 12 Apr 2022 14:14:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEO4q5/Gd1ZpS/ogBZQW8B4gjrO6lTahONtd4m6UeV9f6SADBBB7z9xUwwZtjyyxTKjlmq X-Received: by 2002:a17:90b:1b51:b0:1cb:a2e9:7145 with SMTP id nv17-20020a17090b1b5100b001cba2e97145mr7060421pjb.180.1649798041751; Tue, 12 Apr 2022 14:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649798041; cv=none; d=google.com; s=arc-20160816; b=STMMGW9WTxmFzOlQsShoz2eO5VEE7Ftd5H+3XHa/RQm/rQd+uiQmgMscS0ZkrE6exT nHGFbQtO4FTdJEMSqudmvCLUYoMUqgHzBll8jO7FNQdw4h6Md8Igi6PKfWmTO7zcx3qm 4MJJ7qZdfKBV+IAPINKdoUlNt3RdUGEwA21bfix/scl5sOnu4xyDlCJJAlwTR3JlAeLT oYaCr3ws8F3TACyY8R/pWTdQm4snM2y4W54o5AdPMElQhxWADgUFI/9pcjf0etvec445 hvbjePs/yXNN+YRXykuT/g8x0hELhfTSApTlRcHXJFcDXPZFNtrLO9Z871J7/QlYJa+e /CLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=sEqr5NzmV2oXNmNmssDJtCF3OtxLa8r79e2gV3hq7uM=; b=qJuyvdowqMFxQWvdPb72e+ljFezPC0IPj5tXZFja0uotThhoj7+Ov98dlTWuq8ied8 bhBWBnLV/Dlly0x5IL3+2aP8fhk2hwzhTZ9HFs/foYxal2vGDkXWIy2LAsEZlhLwCKuz eLdV2i3zUr1n6uj3u6ieXMZyHq6YPBbXjl10VT6TN5eWQzM70NzNfQhbJQPN5NPYvFlH jAJZ0+8un2VD8UsHS7ySuEU/GuB+nxa5Qu+MgbPLvy/4vPqm9NyMmztTV08q49f4FodN +F0VYEHHz0TvcUXYlITGK/5JXlNQdqVzYNONkyFzQOAkl4lMOajd4hSXewRLNc40nDwW jj6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=RFevFbGF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x12-20020a1709027c0c00b00153b2d165c4si11920718pll.460.2022.04.12.14.14.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 14:14:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=RFevFbGF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0AAB5ECB05; Tue, 12 Apr 2022 13:29:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346980AbiDKOOa (ORCPT + 99 others); Mon, 11 Apr 2022 10:14:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232828AbiDKOO3 (ORCPT ); Mon, 11 Apr 2022 10:14:29 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07266BE03; Mon, 11 Apr 2022 07:12:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1649686335; x=1681222335; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=sEqr5NzmV2oXNmNmssDJtCF3OtxLa8r79e2gV3hq7uM=; b=RFevFbGFTNB7kVl7u6FEvSYg4i+7y5ryM8DUYfs4NKYnjVLLlhuIfJi/ RJRcJH/amlQYUi5BvbSDy0ga8lygfn36XSj6v4R7P/7BtNHHw+vI2WtKY hjwIjXYECO/9nRV9Qd7uqybbwxjXtzyrvoQ0ce22tQB/Auy1o68A3VQu1 A=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 11 Apr 2022 07:12:15 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2022 07:12:15 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 11 Apr 2022 07:12:14 -0700 Received: from [10.216.15.65] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 11 Apr 2022 07:12:09 -0700 Message-ID: <4dae4e8c-4b77-8fa9-dec3-20f48f84b68e@quicinc.com> Date: Mon, 11 Apr 2022 19:42:06 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v6 3/3] arm64: dts: qcom: sc7280: Add dt nodes for sound card Content-Language: en-US To: Matthias Kaehlcke CC: , , , , , , , , , , Venkata Prasad Potturu , References: <1649157220-29304-1-git-send-email-quic_srivasam@quicinc.com> <1649157220-29304-4-git-send-email-quic_srivasam@quicinc.com> From: Srinivasa Rao Mandadapu Organization: Qualcomm In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/7/2022 2:15 AM, Matthias Kaehlcke wrote: Thanks for your time Matthias!!! > On Tue, Apr 05, 2022 at 04:43:40PM +0530, Srinivasa Rao Mandadapu wrote: >> Add dt nodes for sound card support, which is using WCD938x headset >> playback, capture, I2S speaker playback and DMICs via VA macro. >> >> Signed-off-by: Srinivasa Rao Mandadapu >> Co-developed-by: Venkata Prasad Potturu >> Signed-off-by: Venkata Prasad Potturu >> --- >> arch/arm64/boot/dts/qcom/sc7280-crd.dts | 8 +++ >> arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 93 ++++++++++++++++++++++++++++++++ >> 2 files changed, 101 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/qcom/sc7280-crd.dts b/arch/arm64/boot/dts/qcom/sc7280-crd.dts >> index 224a82d..b1b968a 100644 >> --- a/arch/arm64/boot/dts/qcom/sc7280-crd.dts >> +++ b/arch/arm64/boot/dts/qcom/sc7280-crd.dts >> @@ -90,6 +90,14 @@ ap_ts_pen_1v8: &i2c13 { >> us-euro-gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>; >> }; >> >> +&sound { >> + audio-routing = >> + "VA DMIC0", "MIC BIAS1", >> + "VA DMIC1", "MIC BIAS1", >> + "VA DMIC2", "MIC BIAS3", >> + "VA DMIC3", "MIC BIAS3"; >> +}; >> + >> &tlmm { >> tp_int_odl: tp-int-odl { >> pins = "gpio7"; >> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi >> index e3d8cbf..45e1d82 100644 >> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi >> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi >> @@ -84,6 +84,99 @@ >> pinctrl-names = "default"; >> pinctrl-0 = <&nvme_pwren>; >> }; >> + >> + sound: sound { >> + compatible = "google,sc7280-herobrine"; >> + model = "sc7280-wcd938x-max98360a-1mic"; >> + >> + audio-routing = >> + "IN1_HPHL", "HPHL_OUT", >> + "IN2_HPHR", "HPHR_OUT", >> + "AMIC1", "MIC BIAS1", >> + "AMIC2", "MIC BIAS2", >> + "VA DMIC0", "MIC BIAS3", >> + "VA DMIC1", "MIC BIAS3", >> + "VA DMIC2", "MIC BIAS1", >> + "VA DMIC3", "MIC BIAS1", >> + "TX SWR_ADC0", "ADC1_OUTPUT", >> + "TX SWR_ADC1", "ADC2_OUTPUT", >> + "TX SWR_ADC2", "ADC3_OUTPUT", >> + "TX SWR_DMIC0", "DMIC1_OUTPUT", >> + "TX SWR_DMIC1", "DMIC2_OUTPUT", >> + "TX SWR_DMIC2", "DMIC3_OUTPUT", >> + "TX SWR_DMIC3", "DMIC4_OUTPUT", >> + "TX SWR_DMIC4", "DMIC5_OUTPUT", >> + "TX SWR_DMIC5", "DMIC6_OUTPUT", >> + "TX SWR_DMIC6", "DMIC7_OUTPUT", >> + "TX SWR_DMIC7", "DMIC8_OUTPUT"; >> + >> + qcom,msm-mbhc-hphl-swh = <1>; >> + qcom,msm-mbhc-gnd-swh = <1>; >> + >> + #address-cells = <1>; >> + #size-cells = <0>; >> + #sound-dai-cells = <0>; >> + >> + dai-link@1 { >> + link-name = "Secondary MI2S Playback"; > The other link names provide information about the other end > of the link (DP, WCD, DMIC), while this one describes the SoC side. > Shouldn't this be "MAX98360A"? Not sure about the 'Playback' part, > it seems 'link-name' is used as stream name, judging from a few > samples of peeking into '/proc/asound/pcm' on different devices > it seems that 'Playback' or 'Capture' is ususally not part of the > stream name. Okay. will change accordingly. > >> + reg = ; >> + cpu { >> + sound-dai = <&lpass_cpu MI2S_SECONDARY>; >> + }; >> + >> + codec { >> + sound-dai = <&max98360a>; >> + }; >> + }; >> + >> + dai-link@5 { >> + link-name = "DP Playback"; > See comment above about 'Playback'. Just 'DP' is maybe a bit short, how > about 'DisplayPort'? Okay. Will change accordingly. > >> + reg = ; >> + cpu { >> + sound-dai = <&lpass_cpu LPASS_DP_RX>; >> + }; >> + >> + codec { >> + sound-dai = <&mdss_dp>; >> + }; >> + }; >> + >> + dai-link@6 { >> + link-name = "WCD Playback"; > Most instances I found spell out the codec name. It seems here we need > the 'Playback'/'Capture' info (or something else) to not end up with > duplicate link names. So my suggestion here would be "WCD9385 Playback". Okay. Will  update accordingly. > >> + reg = ; >> + cpu { >> + sound-dai = <&lpass_cpu LPASS_CDC_DMA_RX0>; >> + }; >> + >> + codec { >> + sound-dai = <&wcd938x 0>, <&swr0 0>, <&rxmacro 0>; >> + }; >> + }; >> + >> + dai-link@19 { >> + link-name = "WCD Capture"; > "WCD9385 Capture"? Okay. > >> + reg = ; >> + cpu { >> + sound-dai = <&lpass_cpu LPASS_CDC_DMA_TX3>; >> + }; >> + >> + codec { >> + sound-dai = <&wcd938x 1>, <&swr1 0>, <&txmacro 0>; >> + }; >> + }; >> + >> + dai-link@25 { >> + link-name = "DMIC Capture"; > > just "DMIC"? Okay.