Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1941247rwd; Fri, 2 Jun 2023 02:22:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5yVT0Sk7KqGNNTdtUCHuBH2foRi8CzxJz3a/DZTV1oHJXsSBqvfaTrUBA0jRtRPQ3lyweB X-Received: by 2002:a05:6a20:244e:b0:113:fd97:d470 with SMTP id t14-20020a056a20244e00b00113fd97d470mr797749pzc.17.1685697758279; Fri, 02 Jun 2023 02:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685697758; cv=none; d=google.com; s=arc-20160816; b=nMph3MCy5DzzMbjt+Uk/UCsPPwLubwLMuzU/qHkQtNFyG+n72X46beuEmypb/vo4tX FoSilIdqlBl+FA7EiANI3cJLQQUBcm93RWxiEIuBbxNqrHQ/5WD5w0yB56bfZMFuqaJs dqvan0RwizUt+OCqbVjyK6eGeCzI3CtdpW9vEG33ZEXAQQAXHNZs1iZoGGiPystUkPbi +lOnosufbCL0/i3jQqh9fi0Ab05JYGXw0qeC6q3+p2qGfWU4n7L/JU0AIRaTViZM+tkd ZHJoJPcQxE3LaVr5DezKO34VDFUK+DmiG3hymh6UIh3XzKbd2TKqLdKj0oKauTvyYBrl /XkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FMKaght3EZRcwtR4hLhGpGozkma4rbwmuu+0lxvlO3A=; b=T2/ToXgbur6hI2G0iDaL6jPmGleV5cqy354/4AaiEJaPNP7Lix607kazDEg14rbTCd 9lDnKKTl0oYmpalJPFr1cSWvgG4U/7J0sQdAq1ErYhr1FHME7vy/swmRfEM2yS+kzq/u wn9hnznbzJsoK1QG2aKEJlZP2+M7qvISm1FiYgXRXIgA28nkco2QvNj6wPQUYBqJQBRZ lwaIMl82YFfZRv3+bNB60jrODFvdtBqC6bFIQqeMx8p/4Vj2si3sF2vsOm8VK9NHHRvd bxO5ci2OC2VvCqLySFsJN7/sBqTJ75Rpq0bQzkpgODsHFSmNtm3kdFTzvhlta2l+wWcq XmUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pqrs.dk header.s=google header.b=aG3Fb8X3; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q16-20020a631f50000000b0051b48085aaasi644840pgm.858.2023.06.02.02.22.23; Fri, 02 Jun 2023 02:22:38 -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=@pqrs.dk header.s=google header.b=aG3Fb8X3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234386AbjFBJFQ (ORCPT + 99 others); Fri, 2 Jun 2023 05:05:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjFBJEN (ORCPT ); Fri, 2 Jun 2023 05:04:13 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A2DD10D2 for ; Fri, 2 Jun 2023 02:03:51 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-97460240863so75007166b.0 for ; Fri, 02 Jun 2023 02:03:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pqrs.dk; s=google; t=1685696629; x=1688288629; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FMKaght3EZRcwtR4hLhGpGozkma4rbwmuu+0lxvlO3A=; b=aG3Fb8X3K9WKKxNliXyqCzqEZZLOAoC6+28JL4RDvnce9WPai1yKdx0ChsOA6lzB7y sgOHuV1st30My66XqPWbpZNBLehHxsHl9kFZRb4hR8CuRGTZfAUA8pTLXzixnF/cixb5 jPt1Pdg3POHJ5A2WTe56XJ2P0GNmJmOCmrvIIQUviHJgSY5tVV5CvfpKte6P6z/3oh4l PSHUkwTIQqidY85LpUOWYubwIctytCIgg7cbqb6ySfLJr/0Jw9w1RQU2wNtJGYmfrmaS RZyfs8UuR7zTmy/p6b+RZIJkHQg+dM/aGHLTvzNl2PD0I6gI2Ldpn2M+nbY4iTKv7H4X d5Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685696629; x=1688288629; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FMKaght3EZRcwtR4hLhGpGozkma4rbwmuu+0lxvlO3A=; b=h1XSIrra4ZWJHgx8Rgr9Je71Zd0czzyZnDiIh93ul/COcxn3vp3SiQiM54hj9pJUja dZ3ImXErdO3iC+IN2aB9a+HU8J1SEcT6sUomE7vE+t0Im9xFUOH22CkYRNI0i6r5hp4O FhV7k2udz6wExnSjpHU8dQiO//WWdvVGkuzy/3qHYpE0xwt1Q3FJdzItLdYsH3hnB8Rc HxoBW71NtvF9wmFDEI8W96eNOH47UFEUUBQR5vsHZl3iFq5t5kdlQLRPqW1PffXd7Qdo 3YPxTh5Dv0C9BYzaAyuiXy/6wD4O3l1zDO9uVH35b9yT0+v01EM8c1xOJMp6Q0PlrDti gBMQ== X-Gm-Message-State: AC+VfDx+MZxTv8uqLqHCMDtC+9BWohvcthnCcOc77XAgAux8qvQDvrpj ivaoVMVlt/1CpemA1KSdDVyb3Q== X-Received: by 2002:a17:906:d550:b0:974:6334:f6b2 with SMTP id cr16-20020a170906d55000b009746334f6b2mr806371ejc.22.1685696629567; Fri, 02 Jun 2023 02:03:49 -0700 (PDT) Received: from localhost.localdomain (80.71.142.18.ipv4.parknet.dk. [80.71.142.18]) by smtp.gmail.com with ESMTPSA id w23-20020a170906385700b009707fa1c316sm488031ejc.213.2023.06.02.02.03.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 02:03:49 -0700 (PDT) From: =?UTF-8?q?Alvin=20=C5=A0ipraga?= To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jaroslav Kysela , Takashi Iwai , Kuninori Morimoto Cc: =?UTF-8?q?Alvin=20=C5=A0ipraga?= , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] ASoC: simple-card: parse symmetric-clock-roles property Date: Fri, 2 Jun 2023 11:03:21 +0200 Message-Id: <20230602090322.1876359-5-alvin@pqrs.dk> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230602090322.1876359-1-alvin@pqrs.dk> References: <20230602090322.1876359-1-alvin@pqrs.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 From: Alvin Šipraga The property, when set, specifies that both ends of the dai-link should have the same clock consumer/provider roles. As with other simple-card properties, a prefix can be specified. Signed-off-by: Alvin Šipraga --- sound/soc/generic/simple-card.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 5a5e4ecd0f61..4513e30948b7 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -181,6 +181,7 @@ static int simple_link_init(struct asoc_simple_priv *priv, { struct device *dev = simple_priv_to_dev(priv); struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); + char prop[128]; int ret; ret = asoc_simple_parse_daifmt(dev, node, codec, @@ -188,6 +189,9 @@ static int simple_link_init(struct asoc_simple_priv *priv, if (ret < 0) return 0; + snprintf(prop, sizeof(prop), "%ssymmetric-clock-roles", prefix); + dai_link->symmetric_clock_roles = of_property_read_bool(node, prop); + dai_link->init = asoc_simple_dai_init; dai_link->ops = &simple_ops; -- 2.40.0