From patchwork Wed Feb 1 11:28:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 649203 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 08602C636D3 for ; Wed, 1 Feb 2023 11:30:39 +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 E1C5084C; Wed, 1 Feb 2023 12:29:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E1C5084C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1675251036; bh=f/IuMQXWQgsvip32dGWCsB0+gTrfk/NU8TOVayzClK0=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=J+8gzfGfh7ZKd3mWOtRQSartYeqgNzPT7qAw8Ppfps7lWrRg2aHtrNPe450EHWVbq j9tBVXRKeDT+NrMmEj4OgKkEoCitYACMtKkKyC/nMhYCgVGql/mtsVd4BA/8kKmnFP ZyRVfkUSMwsL4JOjeKEZr01z27m3pg8S15S5iSa8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 56226F80543; Wed, 1 Feb 2023 12:28:57 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4DA2DF80423; Wed, 1 Feb 2023 12:28:52 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 B48C3F80155 for ; Wed, 1 Feb 2023 12:28:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B48C3F80155 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=VrDBZeU2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675250925; x=1706786925; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=f/IuMQXWQgsvip32dGWCsB0+gTrfk/NU8TOVayzClK0=; b=VrDBZeU2EeUqqhMhP6sdblFqSbGoHESPp4KxYQTzhz2Lf4huLhQlCm0l HG03Ka+vYQwNoK2svBEz++G6fNB8WFuYv0EHbqfngVkjjNVwZOzBNJp9l n821bYcyjCM7+11TBS3dtl1+c1Ol2MWTaaSIHM6GhxGZ3grrfXtFZ6YP2 BmsUpH2u4vcIl8Gwc7FR42kk3Z+x2kWYLRnnNhg1l97NFKWY6lQX1hedW eoP21b4LrQdzGPMTMO3k268GiN6+EtQPUccjr7UdFlZKEMh0ar3fhczs2 Qpsl5c9r954oHKZWFxAjkQqVxmFn94RhwPa93gflr6H4l/8iW7+nremLH A==; X-IronPort-AV: E=McAfee;i="6500,9779,10607"; a="329409377" X-IronPort-AV: E=Sophos;i="5.97,263,1669104000"; d="scan'208";a="329409377" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2023 03:28:42 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10607"; a="642374223" X-IronPort-AV: E=Sophos;i="5.97,263,1669104000"; d="scan'208";a="642374223" Received: from jehdildi-mobl.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.31.67]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2023 03:28:39 -0800 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org, kuninori.morimoto.gx@renesas.com, amadeuszx.slawinski@linux.intel.com Subject: [PATCH 1/2] ASoC: SOF: topology: Add missed "else" in sof_connect_dai_widget Date: Wed, 1 Feb 2023 13:28:45 +0200 Message-Id: <20230201112846.27707-2-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230201112846.27707-1-peter.ujfalusi@linux.intel.com> References: <20230201112846.27707-1-peter.ujfalusi@linux.intel.com> MIME-Version: 1.0 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: pierre-louis.bossart@linux.intel.com, cezary.rojewski@intel.com, kai.vehmanen@linux.intel.com, alsa-devel@alsa-project.org, tiwai@suse.com, ranjani.sridharan@linux.intel.com Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The conversion to use generic helpers missed the else for the dai direction check which leads to failure when loading playback widgets Fixes: 323f09a61d43 ("ASoC: sof: use helper function") Signed-off-by: Peter Ujfalusi Acked-by: Kuninori Morimoto --- sound/soc/sof/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index 3cfdf782afca..4a62ccc71fcb 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -1065,7 +1065,7 @@ static int sof_connect_dai_widget(struct snd_soc_component *scomp, if (w->id == snd_soc_dapm_dai_out) stream = SNDRV_PCM_STREAM_CAPTURE; - if (w->id == snd_soc_dapm_dai_in) + else if (w->id == snd_soc_dapm_dai_in) stream = SNDRV_PCM_STREAM_PLAYBACK; else goto end; From patchwork Wed Feb 1 11:28:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 650159 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 E8405C636D3 for ; Wed, 1 Feb 2023 11:30:14 +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 0F190844; Wed, 1 Feb 2023 12:29:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0F190844 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1675251013; bh=Vl2HJSwfSR5lkLqCRdv6CFEeu+SEaD2DT5NE+KA+YG4=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=brEWV10PeCjJbj/dTc75zrlaFidtPtUgkTU02mVEP+USRnX6rs8YRy9cLv3t38edr pgcR3eWL4WyTg7nEvXgGrzsKZOkbYNaPJ5TLPTXPXXr+q4TmnhYu5tL0VYYo8QfW0D VWoLBAgsBmDZgeIQ2vC0Anq6KRNOfxEWyeW6c8wA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 92F01F8045D; Wed, 1 Feb 2023 12:28:56 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A6427F8045D; Wed, 1 Feb 2023 12:28:51 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 C0268F80423 for ; Wed, 1 Feb 2023 12:28:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C0268F80423 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=Vgl6wYnX DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675250928; x=1706786928; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Vl2HJSwfSR5lkLqCRdv6CFEeu+SEaD2DT5NE+KA+YG4=; b=Vgl6wYnXjh9xKcnvAE/qOBm8LBh4F2ZlHnTJRYMsrJcQUBIEka46hfVT 6ItYyEIxZzAE2O8TFkrZJlqLxgi4iCGKKZvk1evjD7HJHjLWUsh5j4dru LPd4Ghxn9WU18Vg0izc9vh3s3MpwIq6rTeB0w62/aBWvX0NN/s589cSjr xu2KSblyzDqDcBRZNF2lwq8FHGiP3Rz7EFmwTRCd3sjjGP7YaPnsTQknm Bbwtny+xK/wJQDN66hO20roIHzCNXAACHWSdNzqMnO2Tn8htsJ7yeLLdc tWAGW6NrnqPoKtFlx5GEh33iE/iOloW5MBR3qXFDmX929wQ8ACQw5sHmU g==; X-IronPort-AV: E=McAfee;i="6500,9779,10607"; a="329409388" X-IronPort-AV: E=Sophos;i="5.97,263,1669104000"; d="scan'208";a="329409388" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2023 03:28:46 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10607"; a="642374246" X-IronPort-AV: E=Sophos;i="5.97,263,1669104000"; d="scan'208";a="642374246" Received: from jehdildi-mobl.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.31.67]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2023 03:28:42 -0800 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org, kuninori.morimoto.gx@renesas.com, amadeuszx.slawinski@linux.intel.com Subject: [PATCH 2/2] ASoC: topology: Set correct unload callback for graph type Date: Wed, 1 Feb 2023 13:28:46 +0200 Message-Id: <20230201112846.27707-3-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230201112846.27707-1-peter.ujfalusi@linux.intel.com> References: <20230201112846.27707-1-peter.ujfalusi@linux.intel.com> MIME-Version: 1.0 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: pierre-louis.bossart@linux.intel.com, cezary.rojewski@intel.com, kai.vehmanen@linux.intel.com, alsa-devel@alsa-project.org, tiwai@suse.com, ranjani.sridharan@linux.intel.com Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Using the control_unload for graph type of elem will lead surprises on module unload. The correct callback to use is the dapm_route_unload. Fixes: 31e9273912bf ("ASoC: topology: Use unload() op directly") Signed-off-by: Peter Ujfalusi --- sound/soc/soc-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index caf547816ea7..78223603088e 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -1081,7 +1081,7 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg, /* add route dobj to dobj_list */ route->dobj.type = SND_SOC_DOBJ_GRAPH; if (tplg->ops) - route->dobj.unload = tplg->ops->control_unload; + route->dobj.unload = tplg->ops->dapm_route_unload; route->dobj.index = tplg->index; list_add(&route->dobj.list, &tplg->comp->dobj_list);