Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7618017rwi; Mon, 24 Oct 2022 17:45:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5f/9j0z0wOTMpzJgupQcDQTGip/MD0RX89xYQAXBcBDiSyv6NjEDxQRJ8cWHyFNncRiupI X-Received: by 2002:aa7:cb09:0:b0:461:e6b6:4bad with SMTP id s9-20020aa7cb09000000b00461e6b64badmr4603423edt.27.1666658742535; Mon, 24 Oct 2022 17:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666658742; cv=none; d=google.com; s=arc-20160816; b=qju70SMdmM2NfczHYyusFAGNBZo2ESK3aTPBkCdaS/a1IX+RdvRJSg7NtWQYF6Cq+a tX31yZPH/aYu1lOPB34vSarQfEtNp64MAgllKz1fZdfN0WzO6FNDLhDE36RL6336Zm5h jJKMKrGwlKKsXqr6ZfM/zlMKmgnVvyFguRhRiKx0GUpEMxoXPtgR5UbhQ7nM06hf5Dxt 535gJvoLMAbRyVrd7QSsbthObaOeRO6mAMO4MgVv7l0167PS25d6DlXa4iJZzRfO1WAm 0oQGL77mSVE0AeG4UXUm67S9qddu1VHSIFCoqimbBgtQf/8sx4VDKCDzziIsMmL49rM4 blAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:references:dkim-signature; bh=KaoGSotGAFceXqyyQYu9XCTEP8cta6cn87AncWEkKJY=; b=qwV1yByoAGBzuUXa3cDCxRl+DB5jMs7ONCW9GXJx2iflM5c/x8yoLlzOMOuShGXXRr oLYn0/kRfPC4QtLqOqeLyhn/VWbSgHM1dytx9k4KKsgNEQ2IweqfUTHZDGDlFfgR0iER H8C8oP5Wy3rUQOVV9TcQnDoEnWEeGbTaehjiy9GN/v3+7uyyzkp5OiS9KdH0di3Dpsf6 q74xUE8dh0KYRNlaL+dcn2uZLYFK1pYl1a0WLN6VoWQQgWhFQ19dNgSv/C+7B/FP8aSD esfV/4ai5rrTQALEt+WCEusi7YCaZxOr68OT4zD1RLpEpOwc+T7+nUYIf2VUE8BFMyM9 Csew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IV2RWjSs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i19-20020a05640242d300b00461a9ddbda7si670653edc.90.2022.10.24.17.45.17; Mon, 24 Oct 2022 17:45:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IV2RWjSs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229707AbiJYAgP (ORCPT + 99 others); Mon, 24 Oct 2022 20:36:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230188AbiJYAfv (ORCPT ); Mon, 24 Oct 2022 20:35:51 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D121EE1A; Mon, 24 Oct 2022 16:02:15 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id l14so11044335wrw.2; Mon, 24 Oct 2022 16:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :references:from:to:cc:subject:date:message-id:reply-to; bh=KaoGSotGAFceXqyyQYu9XCTEP8cta6cn87AncWEkKJY=; b=IV2RWjSsTpxEczaXY2qgq5ATQ4pPYPFWTulRqg14h2wu3f4harvqBv1HOrabkiZ+0C 6uqhrFrj6umwZTfzAtlLbL+oI2y7aydQdeBU1Tec9XtdwZshkL8s7FHKYJv6mpJgI/OC hOAg1uByJ1ku79XAe1A9ku/XwkitmNY39TeANEY6lcMm0oFzOuHaZvAu98RNcogZFv8m X3Gc/5TB3MOtiAiJjJZFd3S2iDCrSMF2+r3nINt1MjurFsaZSG2xsCZ+s+3M4tXEbOch 7NgXLOLGU35Yo4tZfQN2b6wfGYlEBbrSOpYo5F0/gwiRNvb6OQvLoFm5ZU6LYXAWZq68 vHLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :references:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KaoGSotGAFceXqyyQYu9XCTEP8cta6cn87AncWEkKJY=; b=7ONuPf/eprJafoLG0su1MnXL4wAbfwRrREM/vEdM1X4pHJYJ2MPX6Z37irKLJaYtYo 7UAFMTBIsh0cAHU1Vms/nqq11fvckmrOsFFbH0riGKZiOo8PTH9RhGqCRTytIFn9xjFY OgMDPGN5CuM6/fniw3QWCqkxMZFOAqEBgB/GhFjwXnriPWDz4YB+rVXt80aRdCsPdH8R Lvq08LOFYYF17Ek/anUvSZwtrdFv+Wbz7VsxjrJkXbAtBvoXCtuZ5cDpMBrbFayF/M6b zoo3eAFNkdK3fW++wAFI080yFluUBVL+SaFcn6B+duWqjNn47L4sRvZIXeA5vueRPAxR OAQw== X-Gm-Message-State: ACrzQf2YLJYmeMPjDgjfcfAsA20cqW3Hecnuz6sM1NrdDxx3+EOK04AM fteZklXsAXltv4j4sJQ8A6o= X-Received: by 2002:a5d:64e9:0:b0:22e:7631:bcab with SMTP id g9-20020a5d64e9000000b0022e7631bcabmr24146249wri.36.1666652534115; Mon, 24 Oct 2022 16:02:14 -0700 (PDT) Received: from localhost (94.197.2.59.threembb.co.uk. [94.197.2.59]) by smtp.gmail.com with ESMTPSA id t7-20020adfe107000000b0022da3977ec5sm742225wrz.113.2022.10.24.16.02.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 16:02:13 -0700 (PDT) References: <20221022162742.21671-1-aidanmacdonald.0x0@gmail.com> <87fsfem6zd.wl-kuninori.morimoto.gx@renesas.com> From: Aidan MacDonald To: Kuninori Morimoto Cc: broonie@kernel.org, lgirdwood@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/2] ASoC: simple-card: Support custom DAI system clock IDs Date: Mon, 24 Oct 2022 10:18:15 +0100 In-reply-to: <87fsfem6zd.wl-kuninori.morimoto.gx@renesas.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DATE_IN_PAST_12_24, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=no 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 Kuninori Morimoto writes: > Hi Aidan > > Thank you for your patch > >> Some DAIs have multiple system clock sources, which can be chosen >> using the "clk_id" argument to snd_soc_dai_set_sysclk(). Currently >> this is hardcoded to 0 when using simple cards, but that choice is >> not always suitable. >> >> Add the "system-clock-id" property to allow selecting a different >> clock ID on a per-DAI basis. >> >> To simplify the logic on DPCM cards, add a dummy "asoc_simple_dai" >> instance and use that for the dummy components on DPCM links. This >> ensures that when we're iterating over DAIs in the PCM runtime there >> is always a matching "asoc_simple_dai" we can dereference. >> >> Signed-off-by: Aidan MacDonald >> --- > > I think adding "system-clock-id" and adding "dummy asoc_simple_dai" are > different topics. This patch should be separated into 2 patches. Sounds good to me. > And I couldn't understand the reason why we need to add dummy asoc_simple_dai. > In my understanding, we don't parse DT for dummy connection. > Which process are you talking about specifically here? > > This ensures that when we're iterating over DAIs in the PCM runtime there > is always a matching "asoc_simple_dai" we can dereference. > - > Thank you for your help !! > > Best regards > --- > Kuninori Morimoto DPCM DAI links have some real DAIs and one dummy DAI. Each real DAI has an asoc_simple_dai associated with it to contain the information parsed from the DT. The dummy DAI does not have an asoc_simple_dai. I'm adding a dummy asoc_simple_dai for these dummy DAIs to make the mapping of snd_soc_dai to asoc_simple_dai 1-to-1. The non 1-to-1 mapping is problematic, because if I have a snd_soc_dai and want to look up a simple-card property I would need to check if the matching asoc_simple_dai exists first, and have a special case for DPCM dummy DAIs. With a 1-to-1 mapping I can handle all DAIs the same way. Regards, Aidan