Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp207385pxk; Wed, 9 Sep 2020 03:21:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcRhCBX5EFkbUlT84Lqj707ODFfPPty0Xt/Y68ruORfPXM4EPIijmM6C4BaNcLEg8Q+lsB X-Received: by 2002:aa7:d606:: with SMTP id c6mr3418998edr.370.1599646899043; Wed, 09 Sep 2020 03:21:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599646899; cv=none; d=google.com; s=arc-20160816; b=LcsogjU1wuO3DL2v3xZ4JSsGyquSySnvN+46IknGjp6s3SYkKj/xZO0w7OIWzbrYR6 ldL98fIUAz+RKoYZfNZjnEuCW6oneIq7Q8S029j2G9KS+v9xcE4t2vb0UvyvRADK4o3I ykYP3m73xgPPgYmwB1a6J3G5tSDO8a/RBmOSY8kZ4xdwHwWNGyzoTZv1SmQuvHnZpuGt xnJv6x9d1+MsqBI+Z84ngUYprHK0oNfPB02sc9aRnZnNPM81Zgpyr+DSbH3FrB1L09l9 G6sEQfCJ+ajADGHjBmnPlmCQQEXCVLgx1wM6mp9MMheqwJQ67/ZIX6Ajl0zS30g+PQex bbOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MYtyV9sjpexCNQizdjqRW/SdiWDHf0KUeZqsLzbBBXw=; b=M3y5dYn6BIxLTlnYCVOpVBine5TqTjnBgma5K952Stja39R1dPG1IsLzNbGCDniKKr Q+YcRPHLyvSIrTDxvYR50pY0r3sSPE9bbkrG7x/KgNumFZZ0yCjB8Az/B72h28XjVJnf aDU8TS/TJySAPSwTE2x52Omv8RLXYhnhpXEEcgGjNlU4qQBU1uyemkt78N8Vnzg0GfcP U3/bHqaWQwhnG4yrW6ousumoGVS2Exa81c9M+so7tE+RhfsBWIrNfwAe4R0ILIWLrU+T rkje6UN1i+JTpJ1oXlq0OLdtxHwy/eCtmqjJyYAT/3f8GRUy+YuJyZR8oPsUA5Ts9oZ4 SH8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nvSB7U1Y; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si1227921ejb.204.2020.09.09.03.21.15; Wed, 09 Sep 2020 03:21:39 -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=@chromium.org header.s=google header.b=nvSB7U1Y; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727113AbgIIKTt (ORCPT + 99 others); Wed, 9 Sep 2020 06:19:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725877AbgIIKTp (ORCPT ); Wed, 9 Sep 2020 06:19:45 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE623C061755 for ; Wed, 9 Sep 2020 03:19:44 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id e11so1506466wme.0 for ; Wed, 09 Sep 2020 03:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MYtyV9sjpexCNQizdjqRW/SdiWDHf0KUeZqsLzbBBXw=; b=nvSB7U1YSQLRXpNDcMP9RUL4PGdEF8Pp4cI2ebpoYmMzEcjiDJLpG6b3HJObeEVAxL cijYVLuZEmfuyeKiiZN8Q6lt2h87SXNCljv8Xm5odSlNFG3IzsWZMaKBsHIF8GcmTvzX tAKWudAP91pOakcxDjcrP8IsABvDDWwVina9w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MYtyV9sjpexCNQizdjqRW/SdiWDHf0KUeZqsLzbBBXw=; b=k5+MTa4A5hGXaODKhuuPBUxXDNp8qSef8ZUfcCfW0yas4T5+4UWUFYF2JYYRO3OgvU OqmztR916aXC47YHKTQNSyUkL8UaAVTYmqc45MPDmJxdpxb5GuhjaJDhdsCyvBehc4aJ UAy4ay5fBcBBsML4hMzYKxidOaBsr04oUspKGVQnXCAatThwJdUMEUKt2ZHz4y0/EYCM d7PwHR1DKTn6OD6Dz6ZJfI4wn5GfKmuMn/RN78g2eEuBwD96uaWTD1wDUJ1Fm3sJ2m5n ofM+IWU9K32tgamsVOQBZJj3J00PgkIn7XfaPz2suUMYACXn5y9WaKAWrRtD58sd+Zkx Ebzw== X-Gm-Message-State: AOAM530TdFnijnuyx7tCYd1fiuPG6jpJOZrZN3oLx62UocB/gHOx9/Wi hGVLaewJVLLhMuT6+yqqXZHyqrUL65PtnKSC+4bVYA== X-Received: by 2002:a7b:c3c8:: with SMTP id t8mr2821349wmj.101.1599646782754; Wed, 09 Sep 2020 03:19:42 -0700 (PDT) MIME-Version: 1.0 References: <20200907100039.1731457-1-cychiang@chromium.org> <20200907100039.1731457-3-cychiang@chromium.org> <20200908203357.GA861143@bogus> In-Reply-To: From: Cheng-yi Chiang Date: Wed, 9 Sep 2020 18:19:16 +0800 Message-ID: Subject: Re: [PATCH v7 2/3] ASoC: qcom: dt-bindings: Add sc7180 machine bindings To: Rob Herring Cc: linux-kernel , Mark Brown , Taniya Das , Rohit kumar , Banajit Goswami , Patrick Lai , Andy Gross , Bjorn Andersson , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Srini Kandagatla , Stephan Gerhold , Matthias Brugger , Heiko Stuebner , Doug Anderson , Dylan Reid , Tzung-Bi Shih , Linux ARM , linux-arm-msm , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 9, 2020 at 5:23 PM Cheng-yi Chiang wrote: > > On Wed, Sep 9, 2020 at 4:34 AM Rob Herring wrote: > > > > On Mon, Sep 07, 2020 at 06:00:38PM +0800, Cheng-Yi Chiang wrote: > > > Add devicetree bindings documentation file for sc7180 sound card. > > > > > > Signed-off-by: Cheng-Yi Chiang > > > --- > > > .../bindings/sound/qcom,sc7180.yaml | 143 ++++++++++++++++++ > > > 1 file changed, 143 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..ae809346ca80 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml > > > @@ -0,0 +1,143 @@ > > > +# 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. > > > + > > > +properties: > > > + compatible: > > > + 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 > > > + > > > + headset-jack: > > > + $ref: /schemas/types.yaml#/definitions/phandle > > > + description: phandle of the codec for headset detection > > > + > > > + hdmi-jack: > > > + $ref: /schemas/types.yaml#/definitions/phandle > > > + description: phandle of the codec for hdmi jack detection > > > > You already have links to these devices. Why duplicate it here? > > > > What if you had 2 headsets? This doesn't scale. > > > Hi Rob, thanks for reviewing. > There was some discussion in > https://patchwork.kernel.org/patch/11737905/#23571643 about how to > specify the dailink that has a headset jack. > I would like to pass the information of headset jack and hdmi jack to > the machine driver so the machine driver can call > snd_soc_component_set_jack to set jack when init the corresponding link. > Headset jack and hdmi jack will be treated differently for button and > event type. > Because of this, we can not just set a property "jack" in the link. > > As for the 2 headsets case (I guess you mean hp jack and mic jack), on > this board we will not have this use case. > If someone really wants to build hp jack and mic jack on the board > based on this machine driver, we can add two more property hp-jack and > mic-jack to specify that, > as the machine driver will need to know the different jack types > anyway. What do you think ? > > Or could you please suggest a proper way to pass such information ? > > Thanks! > > Alternatively we can probably do dai-link@0 { link-name = "MultiMedia0"; reg = <0>; cpu { sound-dai = <&lpass_cpu 0>; }; headset_jack; codec { sound-dai = <&alc5682 0>; }; }; dai-link@2 { link-name = "MultiMedia2"; reg = <2>; cpu { sound-dai = <&lpass_hdmi 0>; }; hdmi_jack; codec { sound-dai = <&msm_dp>; }; }; Or even put the flag into codec {}. Please let me know if you feel this is a better way. I think it will make the driver code a little more complicated, but the interface on dts might looks cleaner. Thanks! > > Rob