From patchwork Mon May 16 10:11:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 573465 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 89758C433EF for ; Mon, 16 May 2022 10:05:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C46FE169A; Mon, 16 May 2022 12:04:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C46FE169A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1652695529; bh=Roci/Ld+P6cEXh6JcQrkI/gmeigQ41mdYu/uLQ4ho6Y=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HL354NZ3Bi3cn/sTSSOKzMTQWbiuEMypUVZMruP5oQbHAbyj+a0Y+TkB14JU7GRfN ghTsLz3L1qwxDp0Ohv8EUxzgFd6rSxr5lTehbSt/wJ/I+i5QDIoxmHjaSs0eCWWrUh sNnJSoDmaLQRIex+eQyXk4GMVz4kFI64wmlEE19E= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F19F6F80548; Mon, 16 May 2022 12:02:23 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F390BF8052F; Mon, 16 May 2022 12:02:19 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6E1C3F8052D for ; Mon, 16 May 2022 12:02:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6E1C3F8052D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VlJLdAiT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652695337; x=1684231337; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Roci/Ld+P6cEXh6JcQrkI/gmeigQ41mdYu/uLQ4ho6Y=; b=VlJLdAiT8ZiROrFNRqZ6yYyzKrH6uknNvQu6wvsmTGrmiS+zgzLFo5Cz Or+l4UHH4u9WxiGLTf8RnkPhur1p0xNEMsbcZcHDyuXzxoIQpuC1GN2KS ekPoE2t/xj/HMOY3OkgIfUE/U/67JC7gFMS4eIfpOEtckoV7v5llP7G1m YdayBrrS3XtXP7cZL8iImKJpcLG+gNPfXaGQ+LVkdHXh6SdLKNmKL6oWK rX5+fELueFpVpDzt9irEk+4YIh7YATn6exKdD7CFpg4CUi+K7J7Z+cgsr cn2quf8Iz3Q/kT+PooMSWUVJcdIi0o+dvvkC1Ge9qAd+GlYtMH7jY/s+m A==; X-IronPort-AV: E=McAfee;i="6400,9594,10348"; a="333846346" X-IronPort-AV: E=Sophos;i="5.91,229,1647327600"; d="scan'208";a="333846346" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2022 03:02:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,229,1647327600"; d="scan'208";a="522382657" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by orsmga003.jf.intel.com with ESMTP; 16 May 2022 03:02:12 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH v3 10/15] ASoC: Intel: avs: Replace link_mask usage with i2s_link_mask Date: Mon, 16 May 2022 12:11:11 +0200 Message-Id: <20220516101116.190192-11-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220516101116.190192-1-cezary.rojewski@intel.com> References: <20220516101116.190192-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , upstream@semihalf.com, rad@semihalf.com, pierre-louis.bossart@linux.intel.com, tiwai@suse.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.com, Piotr Maziarz , cujomalainey@chromium.org, lma@semihalf.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Piotr Maziarz 'link_mask' field is intended for SoundWire, I2S should use 'i2s_link_mask' instead. Signed-off-by: Piotr Maziarz Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/topology.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/intel/avs/topology.c b/sound/soc/intel/avs/topology.c index 4ea799658ed9..0d11cc8aab0b 100644 --- a/sound/soc/intel/avs/topology.c +++ b/sound/soc/intel/avs/topology.c @@ -381,11 +381,11 @@ static int parse_link_formatted_string(struct snd_soc_component *comp, void *ele * Dynamic naming - string formats, e.g.: ssp%d - supported only for * topologies describing single device e.g.: an I2S codec on SSP0. */ - if (hweight_long(mach->link_mask) != 1) + if (hweight_long(mach->mach_params.i2s_link_mask) != 1) return avs_parse_string_token(comp, elem, object, offset); snprintf(val, SNDRV_CTL_ELEM_ID_NAME_MAXLEN, tuple->string, - __ffs(mach->link_mask)); + __ffs(mach->mach_params.i2s_link_mask)); return 0; } @@ -1350,8 +1350,8 @@ static int avs_route_load(struct snd_soc_component *comp, int index, u32 port; /* See parse_link_formatted_string() for dynamic naming when(s). */ - if (hweight_long(mach->link_mask) == 1) { - port = __ffs(mach->link_mask); + if (hweight_long(mach->mach_params.i2s_link_mask) == 1) { + port = __ffs(mach->mach_params.i2s_link_mask); snprintf(buf, len, route->source, port); strncpy((char *)route->source, buf, len); @@ -1382,10 +1382,10 @@ static int avs_widget_load(struct snd_soc_component *comp, int index, mach = dev_get_platdata(comp->card->dev); /* See parse_link_formatted_string() for dynamic naming when(s). */ - if (hweight_long(mach->link_mask) == 1) { + if (hweight_long(mach->mach_params.i2s_link_mask) == 1) { kfree(w->name); /* w->name is freed later by soc_tplg_dapm_widget_create() */ - w->name = kasprintf(GFP_KERNEL, dw->name, __ffs(mach->link_mask)); + w->name = kasprintf(GFP_KERNEL, dw->name, __ffs(mach->mach_params.i2s_link_mask)); if (!w->name) return -ENOMEM; }