From patchwork Sun Aug 27 13:38:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 111078 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp3582257qge; Sun, 27 Aug 2017 06:39:18 -0700 (PDT) X-Received: by 10.223.130.45 with SMTP id 42mr2625488wrb.327.1503841158791; Sun, 27 Aug 2017 06:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503841158; cv=none; d=google.com; s=arc-20160816; b=B4qQNlqSe9LNMiCTr19oYJbkmoh+p/6A+NYL/yLZV0pb84SETlvS8jtI+395oatMW7 MZIQeGm6L9aDg17gjLkAxPTl2XUwqhd/9Eqp75GWw8YsYY/Uga1HpuzvmftC5d5Wy6Oi JjDIX6fDFBbBzlrSGohaF8RHTKfxXop/ehGvSClkwbMnwHaVMmFRKvOa9pJpPYtSsE7h w0MLehZGwe1gTc/08b0OwK4Nk3P0mSZvit3kCEKKxf2pl67fZW1SigS/DlH4MilN9ord mJliWOjo5mg3YIAtQhA0kDi4kQkNd3+spp0yoBk0EgnGBDu+eepLs0QvYpfmxUIYvJcm pfiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=bua99rISNS81YypDv8ZMB5eNIJxb+wTIsN9hq7mIIyM=; b=zdKJr95WlnuMC7Jj7xbTky1Lq3lBtYG0EsPFqvaUwNASZWMzEvNnuedXjrlqD/QoQY Cb3ryqZqkfPYJqxS6sh6S8TeLInYd1YQ9+E+4TFGNebDTEb57EHFCF+s4yqSQooGM1jg 8jubctFvThKMAJk8OlIR5lXjlBZWXoegG6pQ6ClxPIeDU8Os5Lnw/A+yc/pdKd4FKnOq dPZavtz1JC+fSlXTnO1gdm+1rY2wF+jB8mD2VvRJq5ssCbUixfP4PhEDsScFevpYwni9 1uxf0Tl7WY48tj9rb1+It88uefrKzZlTHaI/8bq787HWjGOylV+waBLlAFLozzedQLe1 zW5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=j7lEcPEx; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id 51si8979718wrt.4.2017.08.27.06.39.18; Sun, 27 Aug 2017 06:39:18 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=j7lEcPEx; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4E1322674D5; Sun, 27 Aug 2017 15:39:06 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 27CCB2674C6; Sun, 27 Aug 2017 15:39:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD, SPF_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 9D67526745C for ; Sun, 27 Aug 2017 15:38:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=iWLZOqVh+eR8pISrECf3hONrrCUFg/qu8Q607OG7Ig8=; b=j7lEcPExiON2 MYy9ihc0AnqIFM7VUVP41+97gar+V3RRgXQ6SpekMKQobgOAOZpnERUfdk6AWLve6hk7qOoyogFe2 U8BVdNQyFhvZ9zGJWjzy7WaRuwFnUpthFbLFICKAG5OTW6GdoErqZSURCle1n14gnxISgoccEscdW /6f7I=; Received: from jack.einval.com ([84.45.184.145] helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1dlxlk-0005T3-GK; Sun, 27 Aug 2017 13:38:28 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 209474400E7; Sun, 27 Aug 2017 14:38:28 +0100 (BST) From: Mark Brown To: Jeeja KP In-Reply-To: <20170821084646.6525-8-guneshwor.o.singh@intel.com> Message-Id: <20170827133828.209474400E7@finisterre.ee.mobilebroadband> Date: Sun, 27 Aug 2017 14:38:28 +0100 (BST) Cc: alsa-devel@alsa-project.org, Takashi Iwai , Guneshwor Singh , Liam Girdwood , Patches Audio , Mark Brown , Vinod Koul Subject: [alsa-devel] Applied "ASoC: Intel: Skylake: Update module id in pin connections" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: Intel: Skylake: Update module id in pin connections has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 91fe0e70dbfb1142e17cebaa9186794b51a28cf7 Mon Sep 17 00:00:00 2001 From: Jeeja KP Date: Wed, 23 Aug 2017 19:33:54 +0530 Subject: [PATCH] ASoC: Intel: Skylake: Update module id in pin connections Each module's id comes from the topology and gets updated in the driver. This patch updates the input and output pin connections of each module by matching the uuid for each module. Signed-off-by: Jeeja KP Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown --- sound/soc/intel/skylake/skl-pcm.c | 41 +++++++++++++++++++++++++++++++--- sound/soc/intel/skylake/skl-topology.h | 1 + 2 files changed, 39 insertions(+), 3 deletions(-) -- 2.13.2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index a756882b9029..2b1e513b1680 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -1220,8 +1220,11 @@ static int skl_pcm_new(struct snd_soc_pcm_runtime *rtd) static int skl_get_module_info(struct skl *skl, struct skl_module_cfg *mconfig) { struct skl_sst *ctx = skl->skl_sst; + struct skl_module_inst_id *pin_id; + uuid_le *uuid_mod, *uuid_tplg; + struct skl_module *skl_module; struct uuid_module *module; - uuid_le *uuid_mod; + int i, ret = -EIO; uuid_mod = (uuid_le *)mconfig->guid; @@ -1235,11 +1238,43 @@ static int skl_get_module_info(struct skl *skl, struct skl_module_cfg *mconfig) mconfig->id.module_id = module->id; if (mconfig->module) mconfig->module->loadable = module->is_loadable; - return 0; + ret = 0; + break; } } - return -EIO; + if (ret) + return ret; + + uuid_mod = &module->uuid; + ret = -EIO; + for (i = 0; i < skl->nr_modules; i++) { + skl_module = skl->modules[i]; + uuid_tplg = &skl_module->uuid; + if (!uuid_le_cmp(*uuid_mod, *uuid_tplg)) { + mconfig->module = skl_module; + ret = 0; + break; + } + } + if (skl->nr_modules && ret) + return ret; + + list_for_each_entry(module, &ctx->uuid_list, list) { + for (i = 0; i < MAX_IN_QUEUE; i++) { + pin_id = &mconfig->m_in_pin[i].id; + if (!uuid_le_cmp(pin_id->mod_uuid, module->uuid)) + pin_id->module_id = module->id; + } + + for (i = 0; i < MAX_OUT_QUEUE; i++) { + pin_id = &mconfig->m_out_pin[i].id; + if (!uuid_le_cmp(pin_id->mod_uuid, module->uuid)) + pin_id->module_id = module->id; + } + } + + return 0; } static int skl_populate_modules(struct skl *skl) diff --git a/sound/soc/intel/skylake/skl-topology.h b/sound/soc/intel/skylake/skl-topology.h index 90903a15fa1d..4975904480e9 100644 --- a/sound/soc/intel/skylake/skl-topology.h +++ b/sound/soc/intel/skylake/skl-topology.h @@ -221,6 +221,7 @@ struct skl_kpb_params { }; struct skl_module_inst_id { + uuid_le mod_uuid; int module_id; u32 instance_id; int pvt_id;