Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp386491pjb; Wed, 22 Jul 2020 02:26:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCrfLQMp6vZfrykyM7veE08KK2Bk9m9X7/25ORpSa0QMgvF4MO/pxUxZCI0z25ywm+QxG+ X-Received: by 2002:a17:906:4dcc:: with SMTP id f12mr30175797ejw.401.1595410011406; Wed, 22 Jul 2020 02:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595410011; cv=none; d=google.com; s=arc-20160816; b=x58s2tNiMEXusMJz9vFLTLDdB7+oIktXuquPnw1VOrA7CUEjwKuQEBzOriBEPxXQyv C1qnTZrvjwPKv+TA8MPycm6qghNP9fwZhj8zmCzFpx6kO/LvKtA3evM1yliYesi2mC/V kT4KZu+bxPxd89vQ2MhDe+VpM8Su7RSZcjjYB+7axYLJmtS2chU8yyTzGOsdO0aFSkfh 8mO2Isx4FbruMX4MngC/xD0B2FCpfRP3ukaUmody+cewDV6GOhChJmCR4ZXRvhWaDNMO oSuiuSf8+3z1HmbOSYUMZaPix/TB9aD4qZ4rLJTJI3fm1EqELU7V6TJIew60H0RI1ZyJ DObA== 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=S6Nwi+XiUVd0OOIyZo0IP6xJ55suQgOnuZqnCWRgVZw=; b=O9Ab6sZLwt7O8T+wWxxqVcAJTzRLSxp68qAQjlitLCXdpKeOMdRfU/H2XtcVn49N4o 9Q8MkVzaNaWaKqu8qNZbJJ7L0tP1dC+Xf5MZut88mqRi0Hqw5C3fivbR7UQGqiuABIGo 43cq9UR9R1nk65NQDU0Wt6jUWp4/dq1AZ9g2tciAQ4iFwvDHv0iTvJWwHeyEoLDji7D4 r5NgDweVXhIkjW35RiITeOJgcTPhvyE7UJFMPH7ZWvCbvDqv2JwAlAcZM0IQqJbo89Nt YDDlsk4XsJTC2CJGcK3EQmsh/x91k6aCFnLY1Lzd+IPHNeYwLmy3Apt7RSeiapAhkuJB UfMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g1ZsFxEh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x3si6129612ejw.251.2020.07.22.02.26.29; Wed, 22 Jul 2020 02:26:51 -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; dkim=pass header.i=@linaro.org header.s=google header.b=g1ZsFxEh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731428AbgGVJZ0 (ORCPT + 99 others); Wed, 22 Jul 2020 05:25:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731422AbgGVJZZ (ORCPT ); Wed, 22 Jul 2020 05:25:25 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B9A5C0619DF for ; Wed, 22 Jul 2020 02:25:25 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id f18so1204250wrs.0 for ; Wed, 22 Jul 2020 02:25:25 -0700 (PDT) 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=S6Nwi+XiUVd0OOIyZo0IP6xJ55suQgOnuZqnCWRgVZw=; b=g1ZsFxEhiRXbNG+ztNk0WYGgRisSQvFLGa/yPUpQjUqSBDBtusq0mYFHBpClTnZlfz 56HUtteXZqUm44MRLvY1L9j2rJ6v6PhQxzGnPS7TrogZ8ctKQ0DqEynZRzaZRUANmizK Ou2NqUoa7f7xz03hrMTUnLNpOuAuUUyEsS4MhQ4X0jviUtTffEi60gMVhYrzY8w3tqNV OFeT2GOSmEL/FljwbYGBsndvTZi0Zec9Tf9HUzj9SqZY3nudj2vUHe8Uy/S724+gp5U5 8wXaGZFKnGxOw1Np9U+SUy5OMBrXlJaKsqQCsDkyX1k/Ub/YSrAUI0lwFha/l+QCS/AW kyRA== 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=S6Nwi+XiUVd0OOIyZo0IP6xJ55suQgOnuZqnCWRgVZw=; b=EctkUCHZfMbhadiVBHhMJlYJzWyXuHZgV9FHlDFgrsMVomX+WmAFcehdRKjs6DMDhg OHwjRsJSPyCbrUS6pXiGAAnnmX5elHqh48Rx97GLYk2u4I2OBYQVSpPtWbgXXO3twlqy A+lxdOc9gj3HEPlCwJKtzTMNkXSMumwb9lmbSN19RlTlNW0P3U8WG+Ip75Yzl5GN5Re8 UtFre4+sf3c5JHMbNJaFwmzW7KTALIcYB3hYqkPw6GhQqTvUdJpGyd2gTzGTs9rU+pnl VPHl4mZyUI1bCB03TdNC96Ss3hnH1pebAoZ4Sh7BHcob14WXACBrYpUNEV0h7i/83ekH pHcA== X-Gm-Message-State: AOAM530BBzJhYZqXr/RPXa0TUHnJxZWFYeG/HufopmP/od/jFNNgyxjJ 4cleWb55LaIPTDESvy5L2ZF95Q== X-Received: by 2002:adf:b1cf:: with SMTP id r15mr32484484wra.118.1595409923974; Wed, 22 Jul 2020 02:25:23 -0700 (PDT) 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 x204sm3761989wmg.2.2020.07.22.02.25.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jul 2020 02:25:23 -0700 (PDT) Subject: Re: [PATCH v2 1/2] ASoC: qcom: dt-bindings: Add sc7180 machine bindings To: Cheng-Yi Chiang , linux-kernel@vger.kernel.org Cc: Mark Brown , Taniya Das , Rohit kumar , Banajit Goswami , Patrick Lai , Andy Gross , Bjorn Andersson , Liam Girdwood , Rob Herring , Jaroslav Kysela , Takashi Iwai , dianders@chromium.org, dgreid@chromium.org, tzungbi@chromium.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com References: <20200721104422.369368-1-cychiang@chromium.org> <20200721104422.369368-2-cychiang@chromium.org> From: Srinivas Kandagatla Message-ID: Date: Wed, 22 Jul 2020 10:25:22 +0100 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: <20200721104422.369368-2-cychiang@chromium.org> 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 21/07/2020 11:44, Cheng-Yi Chiang wrote: > Add devicetree bindings documentation file for sc7180 sound card. > > Signed-off-by: Cheng-Yi Chiang > --- > .../bindings/sound/qcom,sc7180.yaml | 130 ++++++++++++++++++ > 1 file changed, 130 insertions(+) > create mode 100644 Documentation/devicetree/bindings/sound/qcom,sc7180.yaml > > diff --git a/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml b/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml > new file mode 100644 > index 000000000000..82f9483276eb > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml > @@ -0,0 +1,130 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/qcom,sc7180.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm Technologies Inc. SC7180 ASoC sound card driver > + > +maintainers: > + - Rohit kumar > + - Cheng-Yi Chiang > + > +description: > + This binding describes the SC7180 sound card which uses LPASS for audio. > + > +definitions: > + > + dai: > + type: object > + properties: > + sound-dai: > + maxItems: 1 > + $ref: /schemas/types.yaml#/definitions/phandle-array > + description: phandle array of the codec or CPU DAI > + > + required: > + - sound-dai > + > +properties: > + compatible: > + contains: > + const: qcom,sc7180-sndcard > + > + audio-routing: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > + description: > + A list of the connections between audio components. Each entry is a > + pair of strings, the first being the connection's sink, the second > + being the connection's source. > + > + model: > + $ref: /schemas/types.yaml#/definitions/string > + description: User specified audio sound card name > + > + aux-dev: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: phandle of the codec for headset detection Why do we need this? You should be able to set the jack for codec snd_soc_component_set_jack()? > + > +patternProperties: > + "^dai-link(@[0-9]+)?$": > + description: > + Each subnode represents a dai link. Subnodes of each dai links would be > + cpu/codec dais. > + > + type: object > + > + properties: > + link-name: > + description: Indicates dai-link name and PCM stream name. > + $ref: /schemas/types.yaml#/definitions/string > + maxItems: 1 > + > + reg: > + description: dai link address. > + $ref: /schemas/types.yaml#/definitions/uint32 > + maxItems: 1 Why do we need this?? I have not seen the parsing code using this. > + > + playback-only: > + description: Specify that the dai link is only for playback. > + $ref: /schemas/types.yaml#/definitions/flag > + > + capture-only: > + description: Specify that the dai link is only for capture. > + $ref: /schemas/types.yaml#/definitions/flag > + Are these because the cpu/codec dais are single directional? If so you can extend snd_soc_dai_link_set_capabilities() and use this function. --srini > + cpu: > + $ref: "#/definitions/dai" > + > + codec: > + $ref: "#/definitions/dai" > + > + required: > + - link-name > + - reg > + - cpu > + - codec > + > + additionalProperties: false > + > +examples: > + > + - | > + sound { > + compatible = "qcom,sc7180-sndcard"; > + model = "sc7180-snd-card"; > + > + audio-routing = > + "Headphone Jack", "HPOL", > + "Headphone Jack", "HPOR"; > + > + aux-dev = <&alc5682>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + dai-link@0 { > + reg = <0>; > + link-name = "MultiMedia0"; > + cpu { > + sound-dai = <&lpass_cpu 0>; > + }; > + > + codec { > + sound-dai = <&alc5682 0>; > + }; > + }; > + > + dai-link@1 { > + reg = <1>; > + link-name = "MultiMedia1"; > + playback-only; > + cpu { > + sound-dai = <&lpass_cpu 1>; > + }; > + > + codec { > + sound-dai = <&max98357a>; > + }; > + }; > + }; >