From patchwork Fri May 21 09:27:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Vehmanen X-Patchwork-Id: 445931 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8C1AC433B4 for ; Fri, 21 May 2021 09:34:17 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6C5BD613C4 for ; Fri, 21 May 2021 09:34:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C5BD613C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 031E9169D; Fri, 21 May 2021 11:33:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 031E9169D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621589654; bh=T4ixMz6D+t/C0mQAmY/Ugam3j95AyffPbMW/RszBLz4=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PxasVfBiCMSa3tMMF7Q32/F3NRIr6Ya8qWqMhInvL/py+cZNrPZaS91oNioftdKLG X2+gheJA9Wl1Pxp+NlP9db7/CeYUCW9wAEGDswk1iejIj2R1FuB+SN7Vkx5U1cvR5V wSJAHiFyIAWN34a2SbwH7OQIE2wUD/MePg/M6eW0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 627F0F80246; Fri, 21 May 2021 11:33:23 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0058DF80246; Fri, 21 May 2021 11:33:20 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 BB8FAF801DB for ; Fri, 21 May 2021 11:33:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BB8FAF801DB IronPort-SDR: jkQ7V46V2xaqvvowmgzhyrsGzz7B5cDBzOSOBB9cGO/220X/du4yRiJXuhOK6khgHxe8QaeYmh wnsGbqhJsc3g== X-IronPort-AV: E=McAfee;i="6200,9189,9990"; a="262664180" X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="262664180" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2021 02:33:13 -0700 IronPort-SDR: rtsxcAx9KAeTarC82bXzV+hmYMbMBzj85H+a8VEl7sCAQ2MBaulMhyXKZAiEHXajaF8pVMjZIR dDYqkSBgPtlg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="475640851" Received: from eliteleevi.tm.intel.com ([10.237.54.20]) by fmsmga002.fm.intel.com with ESMTP; 21 May 2021 02:33:11 -0700 From: Kai Vehmanen To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 1/7] ASoC: SOF: Check desc->ops directly in acpi/pci/of probe functions Date: Fri, 21 May 2021 12:27:58 +0300 Message-Id: <20210521092804.3721324-2-kai.vehmanen@linux.intel.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> References: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> MIME-Version: 1.0 Cc: kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, Peter Ujfalusi , lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com, ranjani.sridharan@linux.intel.com, Rander Wang , daniel.baluta@nxp.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: Peter Ujfalusi We can check for the desc->ops directly in the probe functions, the ops is not used directly in the functions. Signed-off-by: Peter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen --- sound/soc/sof/sof-acpi-dev.c | 5 +---- sound/soc/sof/sof-of-dev.c | 5 +---- sound/soc/sof/sof-pci-dev.c | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/sound/soc/sof/sof-acpi-dev.c b/sound/soc/sof/sof-acpi-dev.c index 7fbf09f9f17e..74982c04497b 100644 --- a/sound/soc/sof/sof-acpi-dev.c +++ b/sound/soc/sof/sof-acpi-dev.c @@ -60,7 +60,6 @@ int sof_acpi_probe(struct platform_device *pdev, const struct sof_dev_desc *desc { struct device *dev = &pdev->dev; struct snd_sof_pdata *sof_pdata; - const struct snd_sof_dsp_ops *ops; dev_dbg(dev, "ACPI DSP detected"); @@ -68,9 +67,7 @@ int sof_acpi_probe(struct platform_device *pdev, const struct sof_dev_desc *desc if (!sof_pdata) return -ENOMEM; - /* get ops for platform */ - ops = desc->ops; - if (!ops) { + if (!desc->ops) { dev_err(dev, "error: no matching ACPI descriptor ops\n"); return -ENODEV; } diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c index c9c70645b377..d1a21edfa05d 100644 --- a/sound/soc/sof/sof-of-dev.c +++ b/sound/soc/sof/sof-of-dev.c @@ -70,7 +70,6 @@ static int sof_of_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; const struct sof_dev_desc *desc; struct snd_sof_pdata *sof_pdata; - const struct snd_sof_dsp_ops *ops; dev_info(&pdev->dev, "DT DSP detected"); @@ -82,9 +81,7 @@ static int sof_of_probe(struct platform_device *pdev) if (!desc) return -ENODEV; - /* get ops for platform */ - ops = desc->ops; - if (!ops) { + if (!desc->ops) { dev_err(dev, "error: no matching DT descriptor ops\n"); return -ENODEV; } diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index 3489dc1b48f6..a1db973d5673 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -116,14 +116,11 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) const struct sof_dev_desc *desc = (const struct sof_dev_desc *)pci_id->driver_data; struct snd_sof_pdata *sof_pdata; - const struct snd_sof_dsp_ops *ops; int ret; dev_dbg(&pci->dev, "PCI DSP detected"); - /* get ops for platform */ - ops = desc->ops; - if (!ops) { + if (!desc->ops) { dev_err(dev, "error: no matching PCI descriptor ops\n"); return -ENODEV; } From patchwork Fri May 21 09:27:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Vehmanen X-Patchwork-Id: 445930 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80F64C433ED for ; Fri, 21 May 2021 09:35:11 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id EEB296128A for ; Fri, 21 May 2021 09:35:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEB296128A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 7F93616BC; Fri, 21 May 2021 11:34:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7F93616BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621589709; bh=QkN6RjeeVv+ztRZCCpcNHNmVxWU4hM1HUh6vkopiOfg=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=WmaIvEXz0AMHxfnTqcSDBDY5emt89gEy8emVkISCIwTeHs+k+sVAJN42EP5wsRbWt RnY0zPDpxZi98lzXp4weW2XuOYN1STZmzsEijAqBRfCBzQVhcI2PdY69PeNNcTbLbT jNSPAmvGKAvFkVJSYwocBf2IJN56piZpj6oUjOGU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0DB6AF80425; Fri, 21 May 2021 11:33:26 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 29996F8016E; Fri, 21 May 2021 11:33:21 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 B38E9F800C1 for ; Fri, 21 May 2021 11:33:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B38E9F800C1 IronPort-SDR: V0aO9OAOaVUOyiSfRpAS/XBMpIMH5DS8viq02Bvm5cdQFPEx2V1f8+Ay07wxSA3fRAneEexlJH z567XJ4bxzqA== X-IronPort-AV: E=McAfee;i="6200,9189,9990"; a="262664185" X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="262664185" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2021 02:33:15 -0700 IronPort-SDR: TX34NBJE7QCqd3pNMC9nS6o4nobuW1kO+uwmZH4xnF2RW/dGyAwLU9bNTmfawwpiOUx3MT3A2C XLQEsmMxV2xA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="475640861" Received: from eliteleevi.tm.intel.com ([10.237.54.20]) by fmsmga002.fm.intel.com with ESMTP; 21 May 2021 02:33:13 -0700 From: Kai Vehmanen To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 2/7] ASoC: SOF: pci: No need to cast second time to save the desc Date: Fri, 21 May 2021 12:27:59 +0300 Message-Id: <20210521092804.3721324-3-kai.vehmanen@linux.intel.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> References: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> MIME-Version: 1.0 Cc: kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, Peter Ujfalusi , lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com, ranjani.sridharan@linux.intel.com, Rander Wang , daniel.baluta@nxp.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: Peter Ujfalusi At the start of the function we already have the desc, no need to cast it again from pci_id->driver_data to save it to sof_pdata. Signed-off-by: Peter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen --- sound/soc/sof/sof-pci-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index a1db973d5673..03119462f9e2 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -138,7 +138,7 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) return ret; sof_pdata->name = pci_name(pci); - sof_pdata->desc = (struct sof_dev_desc *)pci_id->driver_data; + sof_pdata->desc = desc; sof_pdata->dev = dev; sof_pdata->fw_filename = desc->default_fw_filename; From patchwork Fri May 21 09:28:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Vehmanen X-Patchwork-Id: 444702 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68BC4C433B4 for ; Fri, 21 May 2021 09:35:55 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 814726135A for ; Fri, 21 May 2021 09:35:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 814726135A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 1EE1116B9; Fri, 21 May 2021 11:35:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1EE1116B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621589753; bh=bh7kRNJVXneiaNMrsQBNXr/d+iuvVv5w1DGxkQkhxK8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=duCtEHQppjU1+sfoPGUWfxzRY9MrFPl3gnC3ZWbxyrMBsrXS8/66WWNm8eiaJY9Nt V4rdmSDVC9vnAIE8wxz/52Wfdh+isjaBTPMq2Fybx/C/gmGPB8WAbBNcugk4ZLqzZf 6VIdRy5NoVN3vA5rtf1tDcKTbxqKALpkLxlutp/8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id CFFB5F804AC; Fri, 21 May 2021 11:33:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D0595F80259; Fri, 21 May 2021 11:33:23 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 27AACF800E5 for ; Fri, 21 May 2021 11:33:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 27AACF800E5 IronPort-SDR: MoLzDKF4m/28ktN/suDHwKOXmiB0+iwQfmkGYs9YWYuLXzmvH3rXTn9bpaZVSXZq71ezrwrnS5 4qZ7mYCYjR4w== X-IronPort-AV: E=McAfee;i="6200,9189,9990"; a="262664188" X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="262664188" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2021 02:33:17 -0700 IronPort-SDR: kDR/XFhFF15+uaZ6HcZCK3f0ATAF/KidtFUNasZ4HriXxCtq0ddsNedni+/6cE0lh316O1ZVFY s6QN0MDWXVqA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="475640864" Received: from eliteleevi.tm.intel.com ([10.237.54.20]) by fmsmga002.fm.intel.com with ESMTP; 21 May 2021 02:33:15 -0700 From: Kai Vehmanen To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 3/7] ASoC: SOF: ops: print out the polling register Date: Fri, 21 May 2021 12:28:00 +0300 Message-Id: <20210521092804.3721324-4-kai.vehmanen@linux.intel.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> References: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> MIME-Version: 1.0 Cc: Guennadi Liakhovetski , kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, Keyon Jie , lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com, ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.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: Keyon Jie Print the register offset out to provide more useful information for the register polling debugging. Signed-off-by: Keyon Jie Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen --- sound/soc/sof/ops.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h index 323a0b3f561b..2763059c3d4b 100644 --- a/sound/soc/sof/ops.h +++ b/sound/soc/sof/ops.h @@ -546,14 +546,16 @@ static inline const struct snd_sof_dsp_ops (val) = snd_sof_dsp_read(sdev, bar, offset); \ if (cond) { \ dev_dbg(sdev->dev, \ - "FW Poll Status: reg=%#x successful\n", (val)); \ + "FW Poll Status: reg[%#x]=%#x successful\n", \ + (offset), (val)); \ break; \ } \ if (__timeout_us && \ ktime_compare(ktime_get(), __timeout) > 0) { \ (val) = snd_sof_dsp_read(sdev, bar, offset); \ dev_dbg(sdev->dev, \ - "FW Poll Status: reg=%#x timedout\n", (val)); \ + "FW Poll Status: reg[%#x]=%#x timedout\n", \ + (offset), (val)); \ break; \ } \ if (__sleep_us) \ From patchwork Fri May 21 09:28:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Vehmanen X-Patchwork-Id: 445929 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 147BBC433ED for ; Fri, 21 May 2021 09:36:06 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 748BD613C4 for ; Fri, 21 May 2021 09:36:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 748BD613C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 0D9F716CA; Fri, 21 May 2021 11:35:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0D9F716CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621589764; bh=D9HvSWFpsReoOpQ2dw0WNU1XIrjO951irBsBZmp/uic=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Dw76/ZKxFjpxx1K4cqSQBI1qemFQAvdk/+vZ3yfDThCyxfUdGql/Ih+xvtcfW6wHr XxvcO88vFT775XAg2WdPX1N6Jamw8MC+T+kdpL2JeLsdeflAwj3OlZaXK7r3ZsaclD D+1Oc9Z1NfM1vQcInbxj/hglieZ9xrVPIeEfuBMQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A04FEF804B0; Fri, 21 May 2021 11:33:30 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3C584F80258; Fri, 21 May 2021 11:33:24 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 A0FB8F801DB for ; Fri, 21 May 2021 11:33:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A0FB8F801DB IronPort-SDR: eLfladFry+7Ks3DOQiDlGTTzVFIN3BbGdBZ0z1oZivl0DbZokcBt0WogdAE8Pj6YV8jJDZc6ci Ow1CWBkSBwAw== X-IronPort-AV: E=McAfee;i="6200,9189,9990"; a="262664191" X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="262664191" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2021 02:33:20 -0700 IronPort-SDR: qSK6GVQnQSK2QiIbHiu9cxhShYwIre0HIZwA74y2lPTzDZiKQ/OVutKm1cO+m6LmaQ2NCh8XJF R4awj0Euecqw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="475640870" Received: from eliteleevi.tm.intel.com ([10.237.54.20]) by fmsmga002.fm.intel.com with ESMTP; 21 May 2021 02:33:18 -0700 From: Kai Vehmanen To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 4/7] ASoC: SOF: loader: Use snd_sof_dsp_block_read() instead sof_block_read() Date: Fri, 21 May 2021 12:28:01 +0300 Message-Id: <20210521092804.3721324-5-kai.vehmanen@linux.intel.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> References: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> MIME-Version: 1.0 Cc: Daniel Baluta , kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, Peter Ujfalusi , lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com, ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.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: Peter Ujfalusi SOF core should use the IO functions via callbacks and not directly to ensure that it remains platform independent. Fixes: 83ee7ab1627b7 ("ASoC: SOF: Intel: byt: Refactor fw ready / mem windows creation") Signed-off-by: Peter Ujfalusi Reviewed-by: Daniel Baluta Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen --- sound/soc/sof/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/loader.c b/sound/soc/sof/loader.c index 6efaf766f2ab..2b38a77cd594 100644 --- a/sound/soc/sof/loader.c +++ b/sound/soc/sof/loader.c @@ -517,7 +517,7 @@ int sof_fw_ready(struct snd_sof_dev *sdev, u32 msg_id) return 0; /* copy data from the DSP FW ready offset */ - sof_block_read(sdev, bar, offset, fw_ready, sizeof(*fw_ready)); + snd_sof_dsp_block_read(sdev, bar, offset, fw_ready, sizeof(*fw_ready)); /* make sure ABI version is compatible */ ret = snd_sof_ipc_valid(sdev); From patchwork Fri May 21 09:28:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Vehmanen X-Patchwork-Id: 444701 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEE3AC43460 for ; Fri, 21 May 2021 09:36:36 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 374BB6135A for ; Fri, 21 May 2021 09:36:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 374BB6135A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 BD19D16BD; Fri, 21 May 2021 11:35:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BD19D16BD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621589794; bh=xIglhPS5CK+lWv05HqV5DWH3GrqA6QCsuGJ0OPJ9lx0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rwi9Mw04QoWJzpviinV4lW3bsdgcUxFg6UF/bmrLEOVLkMb82GYWCS4vr3V4v0YJB JuwLX3Y28w3lFMIjKPEC9CT/j8iorrYt24quk4rPOMbEx4eWi0KZX2yVU3dQF6VbcB kmQmzrszQwtMPYWlEqz2pql2bl3yeK9xYpuVx2G8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4F53CF804BD; Fri, 21 May 2021 11:33:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C6353F80475; Fri, 21 May 2021 11:33:27 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 DFFA1F80258 for ; Fri, 21 May 2021 11:33:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DFFA1F80258 IronPort-SDR: tFhxKjUlaOJh6jlRHXWAY7BiWqCXgwQdBzhs7Y9+3OuiHS5/r8ZS6BG2mIKx3feuFtajjvi1K1 Og+UA8WaK7KA== X-IronPort-AV: E=McAfee;i="6200,9189,9990"; a="262664200" X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="262664200" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2021 02:33:22 -0700 IronPort-SDR: QIC41XbNBK9KOP0gFCUQ5jUZYy9EU1hDz5R3tcmjo/NChFezjoFr5tkWfJR1W8+ZSHPHL1fcaI XWGLhPmjfOCA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="475640885" Received: from eliteleevi.tm.intel.com ([10.237.54.20]) by fmsmga002.fm.intel.com with ESMTP; 21 May 2021 02:33:20 -0700 From: Kai Vehmanen To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 5/7] ASoC: SOF: topology: fix assignment to use le32_to_cpu Date: Fri, 21 May 2021 12:28:02 +0300 Message-Id: <20210521092804.3721324-6-kai.vehmanen@linux.intel.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> References: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> MIME-Version: 1.0 Cc: kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com, ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.com, Jaska Uimonen 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: Jaska Uimonen Fix sparse warning by using le32_to_cpu. Signed-off-by: Jaska Uimonen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen --- 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 92d346bbd357..cc9585bfa4e9 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -3338,7 +3338,7 @@ static int sof_link_load(struct snd_soc_component *scomp, int index, /* Copy common data to all config ipc structs */ for (i = 0; i < num_conf; i++) { config[i].hdr.cmd = SOF_IPC_GLB_DAI_MSG | SOF_IPC_DAI_CONFIG; - config[i].format = hw_config[i].fmt; + config[i].format = le32_to_cpu(hw_config[i].fmt); config[i].type = common_config.type; config[i].dai_index = common_config.dai_index; } From patchwork Fri May 21 09:28:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Vehmanen X-Patchwork-Id: 445928 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C665C433B4 for ; Fri, 21 May 2021 09:36:50 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C27556128A for ; Fri, 21 May 2021 09:36:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C27556128A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 5A5FB169E; Fri, 21 May 2021 11:35:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5A5FB169E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621589808; bh=MvxlhhIZifUqC5B1+4VKKJ4fDuqGkmJQ69gE77ogDJE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=h7qMiOc0Mr8szog85WxQy2+rgMFpClkVQmS8gDss5HNeglHbuIzHduAVk0zK2d/3P MlivDWBzmNzxY18toG/rXadyvX2VEoMnBFHR/3ko4mknjVH58uzYoX5FJoqCiYLeP5 xWa8rMrjz4w2OQp/loAmez89amzpr23XpkztOnLU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 206AFF80475; Fri, 21 May 2021 11:33:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 01F7CF80430; Fri, 21 May 2021 11:33:32 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 16B5AF80430 for ; Fri, 21 May 2021 11:33:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 16B5AF80430 IronPort-SDR: 4z6wjGiCein5cMagsc3B75OR/L9Giy/LIOFFj6M8TIbZzOnPZYdp+qe25Fk96R8Fp//QB0lGfx eONP8fQnsSvA== X-IronPort-AV: E=McAfee;i="6200,9189,9990"; a="262664202" X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="262664202" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2021 02:33:24 -0700 IronPort-SDR: a6sB6Zf5zAhQM1PFiXf/Zi5EVFVSj5jcrKE5F9xeW0olQ4gfpBZ67twqFSbRPHTk+jLp+32UR2 WUuAk9bsszYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="475640896" Received: from eliteleevi.tm.intel.com ([10.237.54.20]) by fmsmga002.fm.intel.com with ESMTP; 21 May 2021 02:33:22 -0700 From: Kai Vehmanen To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 6/7] ASoC: SOF: ops: don't return void value Date: Fri, 21 May 2021 12:28:03 +0300 Message-Id: <20210521092804.3721324-7-kai.vehmanen@linux.intel.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> References: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> MIME-Version: 1.0 Cc: Guennadi Liakhovetski , kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com, ranjani.sridharan@linux.intel.com, Paul Olaru , Rander Wang , daniel.baluta@nxp.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: Pierre-Louis Bossart Sparse throws the following warning: sound/soc/sof/ops.h:247:17: error: returning void-valued expression Remove the useless returns. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Paul Olaru Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Kai Vehmanen --- sound/soc/sof/ops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h index 2763059c3d4b..4a5d6e497f05 100644 --- a/sound/soc/sof/ops.h +++ b/sound/soc/sof/ops.h @@ -244,13 +244,13 @@ snd_sof_dsp_set_power_state(struct snd_sof_dev *sdev, static inline void snd_sof_dsp_dbg_dump(struct snd_sof_dev *sdev, u32 flags) { if (sof_ops(sdev)->dbg_dump) - return sof_ops(sdev)->dbg_dump(sdev, flags); + sof_ops(sdev)->dbg_dump(sdev, flags); } static inline void snd_sof_ipc_dump(struct snd_sof_dev *sdev) { if (sof_ops(sdev)->ipc_dump) - return sof_ops(sdev)->ipc_dump(sdev); + sof_ops(sdev)->ipc_dump(sdev); } /* register IO */ From patchwork Fri May 21 09:28:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Vehmanen X-Patchwork-Id: 444700 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 226D6C433B4 for ; Fri, 21 May 2021 09:37:21 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 791F76135A for ; Fri, 21 May 2021 09:37:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 791F76135A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 00F9116C7; Fri, 21 May 2021 11:36:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 00F9116C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621589839; bh=aCGksCZMzrWs8SiWNO8x8q74PYNytQMmT0egNG9SQfg=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Qf33VhWbHgLRaY3yV+B352clJlM72uZjrtVJmVrsSpl8HC48Ezpa5J0Jm/hmC4ktp ARJQSNYUANmREL+DVQuK4k6ztszAusUAJlCk/ghORdEQ4G8YbdyCGZzR3a/IJVci+d 05abrPIioxrpfk57Lfr0ui/6rCZPoigrj0Ug/t94= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 035D2F804D1; Fri, 21 May 2021 11:33:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1A0D7F804D8; Fri, 21 May 2021 11:33:34 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 2872EF80475 for ; Fri, 21 May 2021 11:33:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2872EF80475 IronPort-SDR: 6Iz2lwAelwj9JQBVacVC8WEzEZZX2NcR8ko4MXA/WgGTblP1j3ptEEOAzthNnylhZVCa/blGG5 JseRx5oXbSsw== X-IronPort-AV: E=McAfee;i="6200,9189,9990"; a="262664204" X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="262664204" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2021 02:33:26 -0700 IronPort-SDR: HduTgqXVj7abXYP6uONxio2YsvUx7oSgkfYy9iP7YJsRPDTxidZgTgGTfOLEpj1Jk9buXpTUdc 1m4Y60PWO+xw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="475640897" Received: from eliteleevi.tm.intel.com ([10.237.54.20]) by fmsmga002.fm.intel.com with ESMTP; 21 May 2021 02:33:24 -0700 From: Kai Vehmanen To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 7/7] ASoC: SOF: Intel: hda: Remove conditions against CONFIG_PCI Date: Fri, 21 May 2021 12:28:04 +0300 Message-Id: <20210521092804.3721324-8-kai.vehmanen@linux.intel.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> References: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com> MIME-Version: 1.0 Cc: kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, Peter Ujfalusi , lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com, ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.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: Peter Ujfalusi The HDA support can only be compiled when SND_SOC_SOF_PCI is enabled which depends on CONFIG_PCI. This makes the IS_ENABLED(CONFIG_PCI) checks redundant in the code, they will resolve to true all the time. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen --- sound/soc/sof/intel/hda.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 5658e4b6273d..126232a76a10 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -277,10 +277,12 @@ struct hda_dsp_msg_code { const char *msg; }; -static bool hda_use_msi = IS_ENABLED(CONFIG_PCI); #if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG) +static bool hda_use_msi = true; module_param_named(use_msi, hda_use_msi, bool, 0444); MODULE_PARM_DESC(use_msi, "SOF HDA use PCI MSI mode"); +#else +#define hda_use_msi (1) #endif static char *hda_model; @@ -485,9 +487,7 @@ static int hda_init(struct snd_sof_dev *sdev) /* initialise hdac bus */ bus->addr = pci_resource_start(pci, 0); -#if IS_ENABLED(CONFIG_PCI) bus->remap_addr = pci_ioremap_bar(pci, 0); -#endif if (!bus->remap_addr) { dev_err(bus->dev, "error: ioremap error\n"); return -ENXIO; @@ -799,9 +799,7 @@ int hda_dsp_probe(struct snd_sof_dev *sdev) goto hdac_bus_unmap; /* DSP base */ -#if IS_ENABLED(CONFIG_PCI) sdev->bar[HDA_DSP_BAR] = pci_ioremap_bar(pci, HDA_DSP_BAR); -#endif if (!sdev->bar[HDA_DSP_BAR]) { dev_err(sdev->dev, "error: ioremap error\n"); ret = -ENXIO;