From patchwork Tue Mar 26 16:04:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 784910 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 19AB4C54E67 for ; Tue, 26 Mar 2024 16:10:19 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 666162C01; Tue, 26 Mar 2024 17:10:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 666162C01 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1711469417; bh=fQwkz9pcHM4JWHddRqJbn3Gbw0hCIVSlITvF7FgBPpY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mBRouoZvxg3cBkYZtLQjHdvRMAo/6LiijMxJrrxbmo7ZIybgLtQfjxghs1mWWnwsc WDvWqRY+d6xVSWdL1wQmeVID1i4zHVHI+KnW8QqXXh6uJ/iadTejjUpwNu96oDO18r 7TGX9/RybGb2E8pg8B1UAEvV1xRCXYtbpZqb/vIs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2053AF808C0; Tue, 26 Mar 2024 17:06:44 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6469AF8087B; Tue, 26 Mar 2024 17:06:44 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 38F15F80638; Tue, 26 Mar 2024 17:06:11 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (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 81BB5F8057C for ; Tue, 26 Mar 2024 17:05:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 81BB5F8057C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=AuAWTTyE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711469143; x=1743005143; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fQwkz9pcHM4JWHddRqJbn3Gbw0hCIVSlITvF7FgBPpY=; b=AuAWTTyEvl2ks8XkV8AAwJ1FkSFAuSl7tNhHTwbx0U+m6DZUYqxQkAxr 8ZzKohh6Dz89JGe2Fu+jeuS0kbaQAHE48Qp00mWheEUefyCmhG3cr1SOY dJgTWtk/yA09VGw43w10IuWBM6E0mBg3SGn7YyeYU1CeDkZgycrTg/4HR 89p3iU8zppi5dbuHDVsQ7YfSIlGE+NfJNB4UiXxGLOIXf2GS4+hgGlKVo UMyp29NXH3gpfNy2884RcUGoZzwV218Ey3lKVDpiTA1zbj7YZOvOSJO8C qOIe4w7txufkGDE0rwaDmqNLya1qCPRisOMA+u+ZmHDcQtZa2QAViK5qZ A==; X-CSE-ConnectionGUID: ITvYOTvpS3GIB/zJBIZ+bQ== X-CSE-MsgGUID: Uo1L+I39SiqRrhgQO8n2Bg== X-IronPort-AV: E=McAfee;i="6600,9927,11025"; a="17260440" X-IronPort-AV: E=Sophos;i="6.07,156,1708416000"; d="scan'208";a="17260440" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2024 09:04:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,156,1708416000"; d="scan'208";a="20482275" Received: from bhubbert-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.65.108]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2024 09:04:53 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Charles Keepax , Richard Fitzgerald , Shuming Fan , Jack Yu , Oder Chiou , Bard liao , Pierre-Louis Bossart Subject: [PATCH 16/34] ASoC: Intel: sof_sdw: Remove no longer supported quirk Date: Tue, 26 Mar 2024 11:04:11 -0500 Message-Id: <20240326160429.13560-17-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240326160429.13560-1-pierre-louis.bossart@linux.intel.com> References: <20240326160429.13560-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: PEXU3M3X3OC2ACIHKQJMAVZFOQOCQGEM X-Message-ID-Hash: PEXU3M3X3OC2ACIHKQJMAVZFOQOCQGEM X-MailFrom: pierre-louis.bossart@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Charles Keepax The SOF_SDW_NO_AGGREGATION quirk is mostly for debug and no longer works correctly with the current state of the machine driver. Remove it from the code and add an error message if someone uses it. Reviewed-by: Bard Liao Signed-off-by: Charles Keepax Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw.c | 12 ++++-------- sound/soc/intel/boards/sof_sdw_common.h | 1 + 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 1253a2dc33d2..fdedc32291f0 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -36,7 +36,7 @@ static void log_quirks(struct device *dev) dev_dbg(dev, "SSP port %ld\n", SOF_SSP_GET_PORT(sof_sdw_quirk)); if (sof_sdw_quirk & SOF_SDW_NO_AGGREGATION) - dev_dbg(dev, "quirk SOF_SDW_NO_AGGREGATION enabled\n"); + dev_err(dev, "quirk SOF_SDW_NO_AGGREGATION enabled but no longer supported\n"); } static int sof_sdw_quirk_cb(const struct dmi_system_id *id) @@ -1136,11 +1136,9 @@ static int get_dailink_info(struct device *dev, int *sdw_be_num, int *codecs_num) { bool group_visited[SDW_MAX_GROUPS]; - bool no_aggregation; int i; int j; - no_aggregation = sof_sdw_quirk & SOF_SDW_NO_AGGREGATION; *sdw_be_num = 0; if (!adr_link) @@ -1187,7 +1185,7 @@ static int get_dailink_info(struct device *dev, continue; /* count BE for each non-aggregated slave or group */ - if (!endpoint->aggregated || no_aggregation || + if (!endpoint->aggregated || !group_visited[endpoint->group_id]) (*sdw_be_num)++; } @@ -1393,10 +1391,9 @@ static int get_slave_info(const struct snd_soc_acpi_link_adr *adr_link, int *codec_num, unsigned int *group_id, int adr_index) { - bool no_aggregation = sof_sdw_quirk & SOF_SDW_NO_AGGREGATION; int i; - if (!adr_link->adr_d[adr_index].endpoints->aggregated || no_aggregation) { + if (!adr_link->adr_d[adr_index].endpoints->aggregated) { cpu_dai_id[0] = ffs(adr_link->mask) - 1; *cpu_dai_num = 1; *codec_num = 1; @@ -1758,7 +1755,6 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) struct mc_private *ctx = snd_soc_card_get_drvdata(card); struct snd_soc_acpi_mach_params *mach_params = &mach->mach_params; const struct snd_soc_acpi_link_adr *adr_link = mach_params->links; - bool aggregation = !(sof_sdw_quirk & SOF_SDW_NO_AGGREGATION); struct snd_soc_codec_conf *codec_conf; struct sof_sdw_codec_info *codec_info; struct sof_sdw_codec_info *ssp_info; @@ -1896,7 +1892,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) be_id = current_be_id; } - if (aggregation && endpoint->aggregated) + if (endpoint->aggregated) group_generated[endpoint->group_id] = true; } } diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 1daf98a5849f..e21ef79126b2 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -50,6 +50,7 @@ enum { #define SOF_SDW_PCH_DMIC BIT(6) #define SOF_SSP_PORT(x) (((x) & GENMASK(5, 0)) << 7) #define SOF_SSP_GET_PORT(quirk) (((quirk) >> 7) & GENMASK(5, 0)) +/* Deprecated and no longer supported by the code */ #define SOF_SDW_NO_AGGREGATION BIT(14) /* BT audio offload: reserve 3 bits for future */