Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp321320pxu; Fri, 23 Oct 2020 01:22:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2gSBsKd6yqag7Iml/gjmS7fZCAboDnmSCc0jMPJPx12cKNyfuTON2McGqyCaBiFQq5CMy X-Received: by 2002:a17:906:742:: with SMTP id z2mr848602ejb.57.1603441342316; Fri, 23 Oct 2020 01:22:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603441342; cv=none; d=google.com; s=arc-20160816; b=E8rdUxn6fmG7V1i459HREEssT1g6HR4UUAI5V/vIbDV58BLrqzw2rR9gCPgCIQ0vAD WQaJsAU0jite3nBVJSgNFdY8BvLUMVV1cnXSmO3DUsSEycOt3Tg13xlpFwfWsrp9+J+6 o8VEePvpZkPT2h3Lg6YtUesGBVV3pl1kM2H/yZg5OH+/kHWanq1J67HAV87WMGSdtRBi SCN5eDU/4hoxKR70eF5a9eC4xcArAXjDqAIZa80wRXNpqGUymW1RMZ1soMlz90pgZ3w9 0u1cZBJb8/fxmZhk41coEY4PaNG8V7Me1aHWlQZG+oQVLcQB8qNgU2lN+aIGLysC9+be 7FCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/SNcQNTo06eYbWggxW6UOAFjPQ1H0tu2qDw1XijNeRw=; b=Yc3lHRS6jBYc0JaPU2xkylLWpp64HAewAI0Whu3Y80TrVaqpsWlm802ywEI1F5YoAD O6/yjrypiwKFV57MvvOVf4C2Fc9z4t2aY17Lo0vodCu7QfjHydmuU2JUZR8H4085Svq4 pTXpE8yfkpbUV+RmcbjsxDum0xHCcaV6aU9b1Zf1LSIMHipKVczde8qflLSqdP4H8FpB P/WSbSh+Sn2/3NPWaOyHM9WAt+YEPhwaKJCpEridAdVcAVB9VPJ3JUBqzg+U2FZx5G0s jZW0XFcymnuwgVuO4CHQF+lU3KquGC0QevvphbUFhqvXPE00cGKtcO4Ip/FBftlHMnZY PtLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CVl+ZUvJ; 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 y11si415809ejd.641.2020.10.23.01.21.58; Fri, 23 Oct 2020 01:22:22 -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=CVl+ZUvJ; 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 S376027AbgJWH4H (ORCPT + 99 others); Fri, 23 Oct 2020 03:56:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S376020AbgJWH4D (ORCPT ); Fri, 23 Oct 2020 03:56:03 -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 71AD8C0613CE for ; Fri, 23 Oct 2020 00:56:03 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id s9so699213wro.8 for ; Fri, 23 Oct 2020 00:56:03 -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=/SNcQNTo06eYbWggxW6UOAFjPQ1H0tu2qDw1XijNeRw=; b=CVl+ZUvJNSTelmJgD2DdCIA/kwY4nJMHESm/5iLIkcQJXVj2rijeq3MuB8Zsz5zx/T VahW0LE5kLAYZmr0iD9M7kSzSNf/C93dJqTZt/+xXU4TukOpH/8L/GuA/HXY6OnHfGZh m3QSbS6iZXqxC4LY9xvfNEs5aWu6Bio7vR7eI= 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=/SNcQNTo06eYbWggxW6UOAFjPQ1H0tu2qDw1XijNeRw=; b=cVj1fkqyQgIxaWIEzqXfVZk1NvgpZwqUo55yYHK/vH5x8KQ6YglxwNiTMZYg7XvMGa gVBb71ZxKJ/NH43Vj/V287WGGXSlSNirA+9X8NXZ/NdhXhnyK1DbmQkuF8jGrwgRql8m wnn9G4aAxaZd5zCW79IUvm+/r4PQDg6ZmZa2ax7XgcUPTo86+KKGcO1sbnr8JHlhyiSZ efeXXhu7DW8vuN/byVcb3kBInzQFJ0pzEFwIBvjMkjDPv+0Y8KHntkn5IQnZHX2ed3te 5cev2kvKMBwQcomyP6/L9wff5e8rmPr2Rgfbx88ge2jmWaK+/SH3K0FR+EUWvb7XZlMi jBBw== X-Gm-Message-State: AOAM531q6VkyDzBwI+M53gHgZx5hm5QLPCGK8Chjj3324OWX+8b+X/wz dKVeb+2xrAk4n4lmYnLXGpEkEFy/zQDtaWGOarcrqQ== X-Received: by 2002:adf:f78d:: with SMTP id q13mr1183396wrp.258.1603439761801; Fri, 23 Oct 2020 00:56:01 -0700 (PDT) MIME-Version: 1.0 References: <20200914080619.4178587-1-cychiang@chromium.org> <20200914080619.4178587-3-cychiang@chromium.org> <7bdc0d63-27b1-f99e-c5f8-65f880733d16@linaro.org> <20201015161251.GF4390@sirena.org.uk> <20201020143711.GC9448@sirena.org.uk> <63f1a29c-0758-97b8-ce80-fe43d91630fa@linaro.org> <20201021123913.GD4497@sirena.org.uk> <14e7db29-4825-6e9d-22a0-5121bb7006e2@linaro.org> In-Reply-To: <14e7db29-4825-6e9d-22a0-5121bb7006e2@linaro.org> From: Cheng-yi Chiang Date: Fri, 23 Oct 2020 15:55:35 +0800 Message-ID: Subject: Re: [PATCH v11 2/3] ASoC: qcom: dt-bindings: Add sc7180 machine bindings To: Srinivas Kandagatla Cc: Tzung-Bi Shih , Mark Brown , linux-kernel , Taniya Das , Rohit kumar , Banajit Goswami , Patrick Lai , Andy Gross , Bjorn Andersson , Liam Girdwood , Rob Herring , Jaroslav Kysela , Takashi Iwai , Stephan Gerhold , Matthias Brugger , Heiko Stuebner , Srinivasa Rao , Doug Anderson , Dylan Reid , Tzung-Bi Shih , Linux ARM , linux-arm-msm , Kuninori Morimoto , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , "moderated list:ARM/Mediatek SoC support" , "open list:ARM/Rockchip SoC..." , Ajye Huang , xuyuqing@huaqin.corp-partner.google.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry for resending this mail. I forgot to use plain text mode in the previous mail. On Thu, Oct 22, 2020 at 6:12 PM Srinivas Kandagatla wrote: > > > > On 22/10/2020 04:29, Tzung-Bi Shih wrote: > > Hi, sorry for jumping into your discussion but I am trying to > > summarize them to make sure we are on the same page. Pardon me to > > manually copy-and-paste partial sentences to quote. > > > > ACK: > > - Don't expose DAI connections in compatible strings. > > - Use "model" DT property to make the card more UCM2-friendly. > > - Expose new DT properties to distinguish different DMIC models. > > > > NACK: > > - All the board variations using exactly the same compatible string. > > => This is less realistic. Although the CODECS information can be > > retrieved from DT, it is inevitable to have some custom code for each > > CODEC. > > > > Per Mark's words: > >> a different CODEC is something that often justifies a separate compatible > > I think we should use different compatible strings for new CODECS > > combinations. And we should try to reuse the machine driver if they > > share the most code. In the worst case, introduce a new machine > > driver for the new CODECS combinations. > > > > - Srinivas's suggestion to set driver_name. > > e.g. card->driver_name = "SM8250"; > > => This sounds like a new DT property should be parsed in > > sound/soc/qcom/common.c. For example: "qcom,family"? But as we do > > less care about UCM2 for now, I would prefer to just leave it as is. > > > No, you can just hardcode this driver_name in your machine driver rather > than getting it from DT, this is how everyone does!. > So need of adding anything to common.c > ACK > The thing that I suggested to add to common.c is setting card->long_name > from "model" property. > NACK I found that I don't need to set card->long_name in common.c because soc-core.c already sets longname using card->name if card->long_name is NULL. soc_setup_card_name(card->snd_card->longname, card->long_name, card->name, 0); So we can leave common.c as it is and still get long name. > > > > I would expect the following variants in DTS (just for example): > > > > sound { > > compatible = "qcom,sc7180-trogdor"; > Make sure that vendor name is correct here, am not sure if trogdor is > qcom board or Google own board! ACK I should use "google,sc7180-trogdor" because google is the vendor. > > > model = "sc7180-rt5682-max98357a-1mic"; > > } > > > > sound { > > compatible = "qcom,sc7180-trogdor"; > > model = "sc7180-rt5682-max98357a-2mic"; > > dmic-gpio = ... > > } > > > > sound { > > compatible = "qcom,sc7180-pompom"; > > model = "sc7180-adau7002-max98357a"; > > } > > > > > > Please correct me if there is any misunderstanding. > > Looks good to me! > thanks for doing this! Thank you. I will collect the discussion result to send a v12, and sync with variant board partners to submit following machine driver changes. We will make sure future projects follow this approach > > --srini > >