From patchwork Tue Jun 6 22:25:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 689760 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 3812FC7EE2F for ; Tue, 6 Jun 2023 22:27:50 +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 7AF5B84C; Wed, 7 Jun 2023 00:26:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7AF5B84C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1686090467; bh=VkeqlGB3wXPwI5ihVJgjWYgOfSLYxnrXiEN/hdvVQbM=; 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=lBF5Ffaf4WaAFdshz9JZzWdJQ0VbAbZPpXAsuo1cO1lRfT0QyVmTqDWg9fXbdIoFD WPkEpZzF7X4MdrO9DV4eypezha1Xa3OSZMnbXsojDy0iL1BFKAA0COy9HAE3edvUaH zmfPQfS9lKpijdhFZAV81r/SuRe7aC9Ju80+b8wE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2F577F8057D; Wed, 7 Jun 2023 00:26:02 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D2B36F8057B; Wed, 7 Jun 2023 00:26:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4B956F8016C; Wed, 7 Jun 2023 00:25:57 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 83EE5F8016C for ; Wed, 7 Jun 2023 00:25:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 83EE5F8016C 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=mGMGl95a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686090348; x=1717626348; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VkeqlGB3wXPwI5ihVJgjWYgOfSLYxnrXiEN/hdvVQbM=; b=mGMGl95afnu8iUA/RNXesN7i18mTw/noN30FJ6soyZgTWm3CtmyrqflL VEec1BJlB7cgEc22oH15k/QLc4Z51yMlSAMU6tY0Ejm8Wl9E8AxsBvIcf B470OojuO/LESQSxyPM+JR+uI35U5U7jmaW1U7xsjVkCX9QjagAS6Kg36 lp44HPBUBvHroII76soSQOxQu0LCUc0opfDjSN5WavM2JhXhdAzNiKwEg jXn2RMhtndHNCANlLCHqM0tKcOtCUl6IWKpJZSQc89+pnFiNwkCq0Yv2d SVL6DbiQbNh604LAs8DNu2+QUgwHli/ArKtPBr0grqZhdPaLAYDAKEceJ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10733"; a="341465403" X-IronPort-AV: E=Sophos;i="6.00,222,1681196400"; d="scan'208";a="341465403" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 15:25:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10733"; a="712356551" X-IronPort-AV: E=Sophos;i="6.00,222,1681196400"; d="scan'208";a="712356551" Received: from jrmonard-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.150.10]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 15:25:37 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, Pierre-Louis Bossart , Bard Liao , Ranjani Sridharan Subject: [PATCH 1/2] ASoC: SOF: Intel: fix SoundWire/HDaudio mutual exclusion Date: Tue, 6 Jun 2023 17:25:28 -0500 Message-Id: <20230606222529.57156-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230606222529.57156-1-pierre-louis.bossart@linux.intel.com> References: <20230606222529.57156-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: SRGJO5NMZ3Z76VXUHIX2P6A2GBSUIIDI X-Message-ID-Hash: SRGJO5NMZ3Z76VXUHIX2P6A2GBSUIIDI 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.8 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: The functionality described in Commit 61bef9e68dca ("ASoC: SOF: Intel: hda: enforce exclusion between HDaudio and SoundWire") does not seem to be properly implemented with two issues that need to be corrected. a) The test used is incorrect when DisplayAudio codecs are not supported. b) Conversely when only Display Audio codecs can be found, we do want to start the SoundWire links, if any. That will help add the relevant topologies and machine descriptors, and identify cases where the SoundWire information in ACPI needs to be modified with a quirk. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan --- sound/soc/sof/intel/hda.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index b1db940f9f25..64bebe1a72bb 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -1391,12 +1391,22 @@ static void hda_generic_machine_select(struct snd_sof_dev *sdev, hda_mach->mach_params.dmic_num = dmic_num; pdata->tplg_filename = tplg_filename; - if (codec_num == 2) { + if (codec_num == 2 || + (codec_num == 1 && !HDA_IDISP_CODEC(bus->codec_mask))) { /* * Prevent SoundWire links from starting when an external * HDaudio codec is used */ hda_mach->mach_params.link_mask = 0; + } else { + /* + * Allow SoundWire links to start when no external HDaudio codec + * was detected. This will not create a SoundWire card but + * will help detect if any SoundWire codec reports as ATTACHED. + */ + struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; + + hda_mach->mach_params.link_mask = hdev->info.link_mask; } *mach = hda_mach; From patchwork Tue Jun 6 22:25:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 690556 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 11147C77B7A for ; Tue, 6 Jun 2023 22:27:42 +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 C781F82C; Wed, 7 Jun 2023 00:26:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C781F82C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1686090459; bh=7dGq1MYkZEc/hW7p0dKXAEXmhH2v1xre7ZvIXkC+ZHA=; 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=Jm+OE0XOGdfTatT+3NezkIt2mxWZTrBJav3gLNIphZcZMKB2EjqOWeWlAPeWVuNI7 SLzBrxh1RY4KVBUWLtTp/mQvGjMIBrJO+AZtU/dagrLPDnYL+HWNtnOM378Qh104qn 4e4bNhypUQvZ5zwUsxD8FGEjnKPK6s5bWUs2JlJQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BAC2AF80199; Wed, 7 Jun 2023 00:25:58 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F133FF80552; Wed, 7 Jun 2023 00:25:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9CB39F80254; Wed, 7 Jun 2023 00:25:54 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 C56E4F800C8 for ; Wed, 7 Jun 2023 00:25:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C56E4F800C8 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=EwU8nrLj DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686090347; x=1717626347; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7dGq1MYkZEc/hW7p0dKXAEXmhH2v1xre7ZvIXkC+ZHA=; b=EwU8nrLjSz0RmwgbH3UxSQZihRefWmkNCg2pfU930zOR28sD2MYxMRLn Alq14Dx236XW2hPlFfQwwuZ9cJbmiaZKGeGhjvKVMZHlO++J4L2ea3BxT BWhS811L7U2Y3An6sHAOcIfpkGwE2JPfdxEt8ENHrKp+IbDfm5be3fa5I 25ZIrRRMS9lNLe+irwOy2mP0A9YLXr3CnditMTjFOpJUElqUHtInmxXpS pqW5nkDclUm+iYwZPE4UgsjhR97QiH6ObJyYcNH/60+k87PIe4bLKpspA dVzx5XB4q6wpaZklTImvM/vfy/iMkKVM4rbHXEGkWyO3SEmaUrE+lV2i4 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10733"; a="341465401" X-IronPort-AV: E=Sophos;i="6.00,222,1681196400"; d="scan'208";a="341465401" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 15:25:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10733"; a="712356553" X-IronPort-AV: E=Sophos;i="6.00,222,1681196400"; d="scan'208";a="712356553" Received: from jrmonard-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.150.10]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 15:25:37 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, Pierre-Louis Bossart , Ranjani Sridharan , Bard Liao , =?utf-8?q?P=C3=A9ter_Ujfalusi?= Subject: [PATCH 2/2] ASoC: SOF: Intel: hda-pcm: remove kernel parameter init Date: Tue, 6 Jun 2023 17:25:29 -0500 Message-Id: <20230606222529.57156-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230606222529.57156-1-pierre-louis.bossart@linux.intel.com> References: <20230606222529.57156-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: 7BCGANISX5JMD4MLRG5TC2XEQ5CZODUB X-Message-ID-Hash: 7BCGANISX5JMD4MLRG5TC2XEQ5CZODUB 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.8 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: The 'hda_disable_rewinds' kernel parameter is initialized with a non-existent CONFIG_SND_SOC_SOF_HDA_DISABLE_REWINDS. We probably forgot to clean this up when this Kconfig option was removed when upstreaming in 2021. Reported-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/sof/intel/hda-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/intel/hda-pcm.c b/sound/soc/sof/intel/hda-pcm.c index 981e7b699bdb..f23c72cdff48 100644 --- a/sound/soc/sof/intel/hda-pcm.c +++ b/sound/soc/sof/intel/hda-pcm.c @@ -33,7 +33,7 @@ static bool hda_always_enable_dmi_l1; module_param_named(always_enable_dmi_l1, hda_always_enable_dmi_l1, bool, 0444); MODULE_PARM_DESC(always_enable_dmi_l1, "SOF HDA always enable DMI l1"); -static bool hda_disable_rewinds = IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_DISABLE_REWINDS); +static bool hda_disable_rewinds; module_param_named(disable_rewinds, hda_disable_rewinds, bool, 0444); MODULE_PARM_DESC(disable_rewinds, "SOF HDA disable rewinds");