From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 067ECC433E8 for ; Wed, 22 Jul 2020 09:25:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D6EC42080D for ; Wed, 22 Jul 2020 09:25:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="g1ZsFxEh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731424AbgGVJZ0 (ORCPT ); Wed, 22 Jul 2020 05:25:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731419AbgGVJZZ (ORCPT ); Wed, 22 Jul 2020 05:25:25 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62309C0619DC for ; Wed, 22 Jul 2020 02:25:25 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id 88so1194019wrh.3 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=NWoBmB3C9Xm+YrLEyXQLMIPBUVlXev0fqJ4kV7lkJc6u8p/9oDJkqlcikIKJ+t1FsD cuIZRsKn0nPg6oOyMQa3E3PkVngLdIVI17JMRMde15elIaHg7zBGXYog2LEJBgR7hgqQ Q8tfptEB0tqe9zxLOSL0N7/6ciE06x4iK5v4h67CNSqCG8OZlYq6U6xsa68HzdQxf8lx 1IU3aC0C0AxdZpiKvFixWSjsMwLG8z8yMkk5dGVUoWxX9Q5/WbbEb3e4LZiPnwYCD300 dO2vulR2h1w/3ok0pQSWVNFJGwYWLIu2jhaD0i0Qm4upPm42PPmCumn9CtoT/amGPd5R junA== X-Gm-Message-State: AOAM531LqEhGqYhdAheP3CQpgYrl7K9SnbYdbVM6kOfGAK/zpJvcV4QK k9biezovcROIl6piJ62hf3bKbsx6N1o= X-Google-Smtp-Source: ABdhPJxa2U+7moUvkrSiQntHeegnCBrblh3LM+LX5eVN9hCBMBrL1WonkQ67UXjlNdOw+x5Ykmp2fA== 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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>; > + }; > + }; > + }; > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 712C5C433E0 for ; Wed, 22 Jul 2020 09:27:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EBD23206D7 for ; Wed, 22 Jul 2020 09:27:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="GY0K47dB"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="g1ZsFxEh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBD23206D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5CA131607; Wed, 22 Jul 2020 11:26:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5CA131607 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595410033; bh=xQWvDdTTV18G1hTc+M9D2ew67gcMK6dRwR660J+wuyk=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=GY0K47dBpOfBAaXXieGF17GyJZTbsWAonUz08EHPeXfKkU/CpChBjuWgnCt5ImAW/ eVnI+YJqpPqPqIZ5Wxo79UAGzIAddn/zjLiF25yCMPxk4pzpSFJD/yiHjlpUsw5WFY Ad7+VqS6bsrvVoHadOWbvzxsiJl7hF3wAaAaYF7o= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 57AB4F80150; Wed, 22 Jul 2020 11:25:39 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0E660F80161; Wed, 22 Jul 2020 11:25:34 +0200 (CEST) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C8C66F80087 for ; Wed, 22 Jul 2020 11:25:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C8C66F80087 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="g1ZsFxEh" Received: by mail-wr1-x444.google.com with SMTP id r12so1157557wrj.13 for ; Wed, 22 Jul 2020 02:25:24 -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=oJVSqkrQ0qvmG4JnNGnVronukcKrsVc8XgOio+sDwjYElUbHJ2qpuKAPk81cbfLNgY WBbwiW1HliO74hV0Ehh9j2HkDwWAMkpaJXH3IBfVvY0T4jS7DN+KiFGOsl2zxVywk9V+ tnjYqhVAyYGM8gyHH1CL8ZhH/wnnhQlNJtm/HceckpOHJEVqt1X0ANdNPNCAkYInATPE C65QxubMD09iMLKroP8axRxzy4JxOqqbqAN/bgykrmGcHJ2ERSSc7enKLjgB5dJeKHir AGQ4r6IMvf+GH3mRp5tdOeOFMCZMSMbbWXlaw/ubsLxZ4gBsIV9JCyajXahnjnOiuIoD ptZw== X-Gm-Message-State: AOAM530cCfssebttqASF9az/OzgDStjsnp+2bkITiI9tWcfUwVzGVroQ eN9D+0nVCh4zLpmOqz6rYVxQzQ== X-Google-Smtp-Source: ABdhPJxa2U+7moUvkrSiQntHeegnCBrblh3LM+LX5eVN9hCBMBrL1WonkQ67UXjlNdOw+x5Ykmp2fA== 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 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 Cc: Taniya Das , devicetree@vger.kernel.org, tzungbi@chromium.org, Banajit Goswami , alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, Patrick Lai , Takashi Iwai , Liam Girdwood , Rob Herring , Bjorn Andersson , Andy Gross , Rohit kumar , Mark Brown , dianders@chromium.org, dgreid@chromium.org, pierre-louis.bossart@linux.intel.com, linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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>; > + }; > + }; > + }; > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84CA6C433E4 for ; Wed, 22 Jul 2020 09:26:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 52D0120729 for ; Wed, 22 Jul 2020 09:26:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KQzmOlcS"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="g1ZsFxEh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52D0120729 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NL3w5AulMVshMh0zhBrKAtBu+08H6tJUCQJ8DLf1azw=; b=KQzmOlcS7sbU47UxD1RfBbAI1 DiBnQCNt3/M8wy4UCcdcUhptQxuy2h41lK29Mkg0F1S85cJxOHkXiTuowxz/U0Vn5Hgks7TnTA7iE o8ln9/xevtFAZbZFPg2hRpfhPwXvhl5gfE1t8BckT2219w4S3y6qGfFZDfAwQRtaESFjueqyHL1l6 +aElOdq+2XcJ/tMYZCxuTh5McfzDaTEKRpXoI8y6X9etJVYJYK1RRLyo/usgBqheOSs1sa4yPfrfc yPmRYrea57BlSM8CICNzir0AH7WDh/nbv3bUMFaopNkJRu6esyRQvzDepGYjw6QzIFGAJRSrIAli3 Ax3iGAI5Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyB0D-0001Nj-9s; Wed, 22 Jul 2020 09:25:29 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyB09-0001Mi-8G for linux-arm-kernel@lists.infradead.org; Wed, 22 Jul 2020 09:25:26 +0000 Received: by mail-wr1-x441.google.com with SMTP id q5so1183529wru.6 for ; Wed, 22 Jul 2020 02:25:24 -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=gCEnsx6Qtn7y1amKyeX/Ux5Gg8CZd3FZFAPT19FwT5GKJsKnM0sq8DnyOP+pHfJQh9 07ruhdYcvxxGLippz89KgMYFpCt7bnQXuWqPq0heBIQjUaZyCAuUk8jqqI3ztV68POBz 0dOm9SKagki8OJYAH5dHosOEYFiljAGhtGyebbuHLpfaQ1v+OqwzkBh1ODDFdHBWtJIF TRsa2Dqp989eMqc+Fi9bCGj5b1XVvJyZ9gjYaEqkiCIXHJEzN8/mW7hE5dxg+e3o0sTH z5YojnvreRpeP1GtYSMq6AizLRUecHJBAmA+lvNNhUI92MNL7fXpOy2Z+mNJqN3Ef442 F6kA== X-Gm-Message-State: AOAM531hSSi0H16RaAJJKzNr22yfJ3NjgDyOL7cRlnZ40MVuIo0nLpXj rBH+dGON+HLmiJ90uaJA8NFuMA== X-Google-Smtp-Source: ABdhPJxa2U+7moUvkrSiQntHeegnCBrblh3LM+LX5eVN9hCBMBrL1WonkQ67UXjlNdOw+x5Ykmp2fA== 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 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-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200722_052525_468995_9AD5FBC4 X-CRM114-Status: GOOD ( 21.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Taniya Das , devicetree@vger.kernel.org, tzungbi@chromium.org, Banajit Goswami , alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, Patrick Lai , Takashi Iwai , Liam Girdwood , Rob Herring , Bjorn Andersson , Andy Gross , Rohit kumar , Mark Brown , dianders@chromium.org, dgreid@chromium.org, Jaroslav Kysela , pierre-louis.bossart@linux.intel.com, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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>; > + }; > + }; > + }; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel