Received: by 10.223.185.116 with SMTP id b49csp909027wrg; Tue, 20 Feb 2018 09:46:00 -0800 (PST) X-Google-Smtp-Source: AH8x227YmVJCkuJx67zUZkmq3WMSn7vDYv1PLhaMAB/wbpHJAhpsWMHa5QExVkFEXvBq+qCPBNmD X-Received: by 10.99.146.3 with SMTP id o3mr313333pgd.309.1519148759998; Tue, 20 Feb 2018 09:45:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519148759; cv=none; d=google.com; s=arc-20160816; b=0XDe2xiViwaowo7+9ZQ+cUyh5ZHwl8FTyLgEAq0RlAxjnpNmWXmbUlMqvjGZ4v59Sl lZk4UFGOK5sl9XZMmHz3gaPsUZd72W2rrrEsehmSLm1rQGsfWENgXrey4MyO01nEZFLt oQVAOg2OMKHFjOLa0LRNrkX1zivMq0jNgTw6DEgFlnBzA6I27LGEs1twYnAqb4nPrH3M j3aNH4toIG1z4owkB86SvsIuKsuJO0K47p2W9NPhkmg9pEOTO7/ZojXi9VjHTH+Z4TIw O+rQAnWaxQEjUiVHaaIFeY+205Xn5ImyVbcUeiaY7IejF30egOXsRuhrxnr4tu1iatsc 1DBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=ECv7tvgU/MfPZCQHOYhi+Aca6KoQhJL8M8uaDyFWLCg=; b=mbpzR+fiNVYcUu9ljHU4pZV2nFxE3nGD3jms8Ts0vLee5I9nSBpfXZDaNtG4LF6pZJ GWgBLsVJRxWQ/x8NJxMUXeawktN+FpjEp9LERxUv5UYQYo7k8aBmXsmeKTfdngfIFfdO DQrbMZFDofn5koo5XTDX3PebsKbIWOIrxyZ9Mgn3EzV/OS/cVz/gB+olUt+4UP95FfiB kYPLpbDxbj6PFUL8AlDcwoIwMinS0PeZg0oMd/Cey7AD9NShb6OrcrdYWZimUcbT1oko 6GYor53PFj7vYRMmoGzUIudOa5WE0/+rSCnuqDE72riesTKykudHBFmq7G4IVOTkWeUc s6sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Nbe+SDN/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2-v6si1389840plh.499.2018.02.20.09.45.45; Tue, 20 Feb 2018 09:45:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Nbe+SDN/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1753291AbeBTRoq (ORCPT + 99 others); Tue, 20 Feb 2018 12:44:46 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:38889 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752372AbeBTRoo (ORCPT ); Tue, 20 Feb 2018 12:44:44 -0500 Received: by mail-wr0-f193.google.com with SMTP id n7so16789385wrn.5 for ; Tue, 20 Feb 2018 09:44:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ECv7tvgU/MfPZCQHOYhi+Aca6KoQhJL8M8uaDyFWLCg=; b=Nbe+SDN//Xmt0OvWRfG2c3TijZS2kScNyHcAQDcr5OdoiadMCEVCWHJDXZsH/bPWMS FDTuLCOFtdRCCgO3DUYaskzXHmtfFCg0B3YJ7U/msreQ69G3May83w7EPh8MI9aH+5fV xsBQxDN5d9a/LU4Yh0OWiLKn5U/UetsHBrwo1SOcy6p50fHxt1s0YGZwqMyYOoxXIjGu S5zO6dGNSvGNgjoPFXccxowV7JHMY7nfoHZLMJXAokUAowrG7j9Q6J5MhdpmiEkqfZ7C 9ur4oSuH3jUyn1UP879tB73iXntxeFnEVnm9rLsecTKKzzW5w2dmyiIXwF4Q9bVoo7Qd FW8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ECv7tvgU/MfPZCQHOYhi+Aca6KoQhJL8M8uaDyFWLCg=; b=f6pcc9SNfpYkfUZlOqZizo/JTXyK5jKKn0RTIKkhQviTswmLPU1VDbKmZ67sLuCs5+ vnr8Adcse/KlSvLgm/UtqH8RJAlQa48dcUHLsdZDyAZNO80/DcFlTx61mUZ68/waf8D6 1oEk1q7Vu6mqwo4ZrGw1BL4ghUUqzECPcqiYb7vI4Pr0KwRE76uxLbeOv1thFzcc2iSN Q6/KbUsq9SZRD58f1HbaFsvUoE2W9umBnGX5LvtVhAHsXiocbXcZpUN6aoyZGyd7zq9B npSo58F5As4Sfzf/FGXUI0jhZdZe7rrZ+bbMs8R+RA94b5YDAoPI36bM5ipb38dxJUF5 smmg== X-Gm-Message-State: APf1xPAIg00551IOOJaFxr4FVsXxX81tyN5Pw2jHdwTLbTcgWQEK3HC5 BrPwGzgsqxg6eOsvhPM+ly+5kr+5 X-Received: by 10.28.245.25 with SMTP id t25mr821094wmh.77.1519148682692; Tue, 20 Feb 2018 09:44:42 -0800 (PST) Received: from gentoo0.localdomain (x4dbc326f.dyn.telefonica.de. [77.188.50.111]) by smtp.gmail.com with ESMTPSA id o94sm9353780wrc.7.2018.02.20.09.44.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 09:44:41 -0800 (PST) From: Kirill Marinushkin To: linux-kernel@vger.kernel.org Cc: Kirill Marinushkin , Mark Brown , Takashi Sakamoto , Takashi Iwai , Jaroslav Kysela , Liam Girdwood , alsa-devel@alsa-project.org Subject: [RESEND PATCH v2 1/2] ASoC: topology: Add defines for snd_soc_tplg_hw_config.clock_gated Date: Tue, 20 Feb 2018 18:44:45 +0100 Message-Id: <20180220174446.7784-2-k.marinushkin@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180220174446.7784-1-k.marinushkin@gmail.com> References: <20180220174446.7784-1-k.marinushkin@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In kernel `soc-dai.h`, DAI clock gating is defined as following: ~~~~ \#define SND_SOC_DAIFMT_CONT (1 << 4) /* continuous clock */ \#define SND_SOC_DAIFMT_GATED (0 << 4) /* clock is gated */ ~~~~ The corresponding field of struct snd_soc_tplg_hw_config cannot be used as bool values due to the inverted logic. Therefore this commit adds the defines for this field. snd_soc_tplg_hw_config.clock_gated = 0 => no effect snd_soc_tplg_hw_config.clock_gated = 1 => SND_SOC_DAIFMT_GATED snd_soc_tplg_hw_config.clock_gated = 2 => SND_SOC_DAIFMT_CONT Signed-off-by: Kirill Marinushkin Cc: Mark Brown Cc: Takashi Sakamoto Cc: Takashi Iwai Cc: Jaroslav Kysela Cc: Liam Girdwood Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org --- include/uapi/sound/asoc.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h index 69c37ecbff7e..86d0599a6f13 100644 --- a/include/uapi/sound/asoc.h +++ b/include/uapi/sound/asoc.h @@ -139,6 +139,11 @@ #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS (1 << 1) #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2) +/* DAI clock gating */ +#define SND_SOC_TPLG_DAI_CLK_GATE_UNDEFINED 0 +#define SND_SOC_TPLG_DAI_CLK_GATE_GATED 1 +#define SND_SOC_TPLG_DAI_CLK_GATE_CONT 2 + /* DAI physical PCM data formats. * Add new formats to the end of the list. */ @@ -312,7 +317,7 @@ struct snd_soc_tplg_hw_config { __le32 size; /* in bytes of this structure */ __le32 id; /* unique ID - - used to match */ __le32 fmt; /* SND_SOC_DAI_FORMAT_ format value */ - __u8 clock_gated; /* 1 if clock can be gated to save power */ + __u8 clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */ __u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */ __u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */ __u8 bclk_master; /* 1 for master of BCLK, 0 for slave */ -- 2.13.6