From patchwork Mon Jun 20 10:13:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 583291 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 C0467C433EF for ; Mon, 20 Jun 2022 10:05:20 +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 D6C2118B9; Mon, 20 Jun 2022 12:04:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D6C2118B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655719518; bh=6VvB/TlWpsJQa652pZrSZHJbablnDYdsutOy9NV5/cQ=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=WN4F2Rflus+hGaryGmPnx0DoT2kV9vnb4VfLJcpDEQmRDtSWkdgSbphxLt4wq6HPY 2FQ58JdmEdTS6mTYQpRtlQ7CQzCF7mYC2JecJ6Em3zRLEirgHxSC0JuNfOvETNE2S3 VAl150SIcx+BXq48Cio7qVyqqcN5h+OTo+crrz9g= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3B57CF804E7; Mon, 20 Jun 2022 12:03:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A17B6F804D8; Mon, 20 Jun 2022 12:03:55 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 B277EF804CF for ; Mon, 20 Jun 2022 12:03:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B277EF804CF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lqM01RU0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655719433; x=1687255433; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6VvB/TlWpsJQa652pZrSZHJbablnDYdsutOy9NV5/cQ=; b=lqM01RU0Z/kjyZqjY0HN5Y4QM1bvWuqUDY3eQ4OWLk0ogOvBauCTJX0f 9lpAduyyscBSLVWvAUEnbuXcAD0YxuLozbshPYLy0z1Th+8v3KT/PQnr1 Z8bO/9y/owRAV4bb/SieIj21h0cU20J9lbUbTJX9uw/e+JBI1DaBUItwa Iv+RBKFyc8P/Z/HFvVqMjO9tum2V96nKv5mwX2pOIJ+3inHhN896UorvO Q7nBcyN7DNtQZNJt6rVxoxtM1lG4L7dpnO90etFRiAdyc5mdQmWaQyBkY 1jOk/eGhGoNPj5o1Lke80qObET+Qibky5eoWq3So096HwkFC/Hbjn721N A==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="366180643" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="366180643" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 03:03:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="643046252" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga008.fm.intel.com with ESMTP; 20 Jun 2022 03:03:47 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH v4 01/17] ASoC: Intel: Rename haswell source file to hsw_rt5640 Date: Mon, 20 Jun 2022 12:13:46 +0200 Message-Id: <20220620101402.2684366-2-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620101402.2684366-1-cezary.rojewski@intel.com> References: <20220620101402.2684366-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , pierre-louis.bossart@linux.intel.com, tiwai@suse.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.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" Rename source file to drop any ambiguity. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński --- sound/soc/intel/boards/Makefile | 2 +- sound/soc/intel/boards/{haswell.c => hsw_rt5640.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename sound/soc/intel/boards/{haswell.c => hsw_rt5640.c} (100%) diff --git a/sound/soc/intel/boards/Makefile b/sound/soc/intel/boards/Makefile index 40c0c3d1c500..e479546a3d4b 100644 --- a/sound/soc/intel/boards/Makefile +++ b/sound/soc/intel/boards/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only -snd-soc-sst-haswell-objs := haswell.o +snd-soc-sst-haswell-objs := hsw_rt5640.o snd-soc-sst-bdw-rt5650-mach-objs := bdw-rt5650.o snd-soc-sst-bdw-rt5677-mach-objs := bdw-rt5677.o snd-soc-sst-broadwell-objs := broadwell.o diff --git a/sound/soc/intel/boards/haswell.c b/sound/soc/intel/boards/hsw_rt5640.c similarity index 100% rename from sound/soc/intel/boards/haswell.c rename to sound/soc/intel/boards/hsw_rt5640.c From patchwork Mon Jun 20 10:13:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 583290 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 05157C43334 for ; Mon, 20 Jun 2022 10:05:48 +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 F158218E2; Mon, 20 Jun 2022 12:04:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F158218E2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655719546; bh=6JtxhdVF68FxjUQnyy4IHfIL6UuGS31kUjgIV/EBCks=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aT/ggPnQ0gJlztoq0BTmZ8rz6ho+3Mphig33RCXvHgPdcqg617Zpwl5A2vSgWrIMc npt/Hp8WJ8vdlXqMJEje8f6qq+PTiPEwRMeYnrANPloMjX8ZYQBtNs0mipdB56uaAT ZJ/dFzBWkxQZfb7dx6Nrz6AQbNAFizOmYR/iA/Zs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D44FEF8053A; Mon, 20 Jun 2022 12:04:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 05742F80538; Mon, 20 Jun 2022 12:03:59 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 A1FB2F8052E for ; Mon, 20 Jun 2022 12:03:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A1FB2F8052E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="iUHlCfc1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655719437; x=1687255437; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6JtxhdVF68FxjUQnyy4IHfIL6UuGS31kUjgIV/EBCks=; b=iUHlCfc1AA7Gbw1VzJWEgRnE8hSz/lvgCvpAqsbL2/pSSgUCDPWCelBo Cs8zccHqaeO8/jvZxzyJdHzfLm3Cmzk+rMicboArxkw41oaDoMXDAjwVb wlTT2MMTGxXOXySLQtwq8FDpWxIneX4owUrAOdRdU/VdV7Ogl4aI/GUmN dc3ZSJtLRAxHgLr/56KwIhjhGG9ucfIouQ78qlo+s5AY0nCi0L2gOjOjm 7l7CREQ4IGe9+eUR9t/CLwafV8eZZ6KaFsshSVucdY2OeoenI60h184uR bqztnJDSN2aTyvLn02iwD0/ZVbjl49OCIJiQ37bFubA0Ep/Hl1eg5toK6 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="366180662" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="366180662" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 03:03:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="643046267" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga008.fm.intel.com with ESMTP; 20 Jun 2022 03:03:51 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH v4 03/17] ASoC: Intel: hsw_rt5640: Reword driver name Date: Mon, 20 Jun 2022 12:13:48 +0200 Message-Id: <20220620101402.2684366-4-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620101402.2684366-1-cezary.rojewski@intel.com> References: <20220620101402.2684366-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , pierre-louis.bossart@linux.intel.com, tiwai@suse.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.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" Align with other Intel boards naming convention and let the name explicitly state which components are being connected. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński --- sound/soc/intel/boards/hsw_rt5640.c | 4 ++-- sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/intel/boards/hsw_rt5640.c b/sound/soc/intel/boards/hsw_rt5640.c index b51ce8d0ca22..a096453bf1df 100644 --- a/sound/soc/intel/boards/hsw_rt5640.c +++ b/sound/soc/intel/boards/hsw_rt5640.c @@ -188,7 +188,7 @@ static int hsw_rt5640_probe(struct platform_device *pdev) static struct platform_driver hsw_rt5640_driver = { .probe = hsw_rt5640_probe, .driver = { - .name = "haswell-audio", + .name = "hsw_rt5640", .pm = &snd_soc_pm_ops, }, }; @@ -199,4 +199,4 @@ module_platform_driver(hsw_rt5640_driver) MODULE_AUTHOR("Liam Girdwood, Xingchao Wang"); MODULE_DESCRIPTION("Intel SST Audio for Haswell Lynxpoint"); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("platform:haswell-audio"); +MODULE_ALIAS("platform:hsw_rt5640"); diff --git a/sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c b/sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c index 0441df97b260..4e00f8f6c521 100644 --- a/sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c @@ -12,7 +12,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_haswell_machines[] = { { .id = "INT33CA", - .drv_name = "haswell-audio", + .drv_name = "hsw_rt5640", .fw_filename = "intel/IntcSST1.bin", .sof_tplg_filename = "sof-hsw.tplg", }, @@ -41,7 +41,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_broadwell_machines[] = { }, { .id = "INT33CA", - .drv_name = "haswell-audio", + .drv_name = "hsw_rt5640", .fw_filename = "intel/IntcSST2.bin", .sof_tplg_filename = "sof-bdw-rt5640.tplg", }, From patchwork Mon Jun 20 10:13:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 583289 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 287F8C43334 for ; Mon, 20 Jun 2022 10:06:21 +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 5967C18BB; Mon, 20 Jun 2022 12:05:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5967C18BB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655719579; bh=OOacUxvRRrGGYEJB1AD2BU2NHaEu2rv6h6lR9tsOpQs=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vj57XfNZUZrrEKcNxm+O5IqIPKNrJNuTS0bA1t0pXivVzeY+1S1liEr9FBCDvvfI2 io5h3agrH7+e1pNZWd1Qp7P5GG+Y7IZKpULaQtinEvJ0z+rXAEIPeUjF+7Beh/XHwe 0XTU4bINevlwc0/8mi+5ByDySVEn+Cw7GYn5cOEY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 68E5CF80543; Mon, 20 Jun 2022 12:04:07 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E4840F8053D; Mon, 20 Jun 2022 12:04:04 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 1FF07F80535 for ; Mon, 20 Jun 2022 12:03:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1FF07F80535 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="UGXgfhN0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655719440; x=1687255440; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OOacUxvRRrGGYEJB1AD2BU2NHaEu2rv6h6lR9tsOpQs=; b=UGXgfhN0u6E8p95GU18K7P7jptiOlxVYNhxLwRz4GeZCvTTIQ6u76F8J zpTpEWo+ZuUi0i6dG4TDR7yJg8/+1W47pHX5h07i/ESF47sIycTOTb7gU knN640DlY2wK3q3ECvPGdVxHePOOJhhGfKHP2jFEhS9PFzyHN1LWhzrRJ +93NGfCuBP2cXNt0Dh/XVdlnUm/MbMifhb2GlbvwtghrqvoKO4W/9Yoo8 ZGDEJutdowyMP4HYFe9OUl5otIwZLrkIi6XnkYXH8XWEG38Y1/nELgJN8 nuwiXlJ1YF5J7BFpHEZdZ86cTrbtuqteBfHspzh7m5shCe1X/SVD15ICy g==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="366180682" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="366180682" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 03:03:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="643046288" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga008.fm.intel.com with ESMTP; 20 Jun 2022 03:03:55 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH v4 05/17] ASoC: Intel: hsw_rt5640: Update file comments Date: Mon, 20 Jun 2022 12:13:50 +0200 Message-Id: <20220620101402.2684366-6-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620101402.2684366-1-cezary.rojewski@intel.com> References: <20220620101402.2684366-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , pierre-louis.bossart@linux.intel.com, tiwai@suse.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.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" Drop redundant and update valuable comments within the file to increase readability. This patch also revisits module information and kconfig help strings. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński --- sound/soc/intel/boards/Kconfig | 2 +- sound/soc/intel/boards/hsw_rt5640.c | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig index 4b4c1e1e4808..817b4c04bf6a 100644 --- a/sound/soc/intel/boards/Kconfig +++ b/sound/soc/intel/boards/Kconfig @@ -41,7 +41,7 @@ config SND_SOC_INTEL_SOF_CIRRUS_COMMON if SND_SOC_INTEL_CATPT config SND_SOC_INTEL_HASWELL_MACH - tristate "Haswell Lynxpoint" + tristate "Haswell with RT5640 I2S codec" depends on I2C depends on I2C_DESIGNWARE_PLATFORM || COMPILE_TEST depends on X86_INTEL_LPSS || COMPILE_TEST diff --git a/sound/soc/intel/boards/hsw_rt5640.c b/sound/soc/intel/boards/hsw_rt5640.c index da31b011b495..f843ba5f4718 100644 --- a/sound/soc/intel/boards/hsw_rt5640.c +++ b/sound/soc/intel/boards/hsw_rt5640.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Intel Haswell Lynxpoint SST Audio + * Sound card driver for Intel Haswell Lynx Point with Realtek 5640 * * Copyright (C) 2013, Intel Corporation. All rights reserved. */ @@ -14,7 +14,6 @@ #include #include "../../codecs/rt5640.h" -/* Haswell ULT platforms have a Headphone and Mic jack */ static const struct snd_soc_dapm_widget card_widgets[] = { SND_SOC_DAPM_HP("Headphones", NULL), SND_SOC_DAPM_MIC("Mic", NULL), @@ -36,10 +35,10 @@ static int codec_link_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); - /* The ADSP will covert the FE rate to 48k, stereo */ + /* The ADSP will convert the FE rate to 48k, stereo. */ rate->min = rate->max = 48000; channels->min = channels->max = 2; - /* set SSP0 to 16 bit */ + /* Set SSP0 to 16 bit. */ params_set_format(params, SNDRV_PCM_FORMAT_S16_LE); return 0; @@ -58,7 +57,7 @@ static int codec_link_hw_params(struct snd_pcm_substream *substream, return ret; } - /* set correct codec filter for DAI format and clock config */ + /* Set correct codec filter for DAI format and clock config. */ snd_soc_component_update_bits(codec_dai->component, 0x83, 0xffff, 0x8000); return ret; @@ -133,7 +132,6 @@ static struct snd_soc_dai_link card_dai_links[] = { }, }; -/* audio machine driver for Haswell Lynxpoint DSP + RT5640 */ static struct snd_soc_card hsw_rt5640_card = { .name = "haswell-rt5640", .owner = THIS_MODULE, @@ -152,7 +150,6 @@ static int hsw_rt5640_probe(struct platform_device *pdev) int ret; hsw_rt5640_card.dev = &pdev->dev; - /* override platform name, if required */ mach = pdev->dev.platform_data; ret = snd_soc_fixup_dai_links_platform_name(&hsw_rt5640_card, mach->mach_params.platform); @@ -172,8 +169,7 @@ static struct platform_driver hsw_rt5640_driver = { module_platform_driver(hsw_rt5640_driver) -/* Module information */ MODULE_AUTHOR("Liam Girdwood, Xingchao Wang"); -MODULE_DESCRIPTION("Intel SST Audio for Haswell Lynxpoint"); -MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("Sound card driver for Intel Haswell Lynx Point with Realtek 5640"); +MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:hsw_rt5640"); From patchwork Mon Jun 20 10:13:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 583288 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 855B1C433EF for ; Mon, 20 Jun 2022 10:06:54 +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 D155B190B; Mon, 20 Jun 2022 12:06:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D155B190B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655719612; bh=caF6uMwN6uVQ02UDhQ8rgZeuZsctMB4Rc9h8B0yK7gw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=YG4jdsWzu0pcU3p0oOlazWO0F9fnSwziwV93COpxFJhWlhwgGuHPMJMZaRp0OWj5I eMs8SiedxtO9jcOJVeVINYwOHUFCWkNSWml1qJI71AZ28pRn8Ube4VEhBdiLDjkW8R SVVI7fLNQi5J7H6CIVSF1BOiaH+vjIg8s30Mghww= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E9E8EF8055C; Mon, 20 Jun 2022 12:04:09 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A3B92F80549; Mon, 20 Jun 2022 12:04:07 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 1B1F7F804EB for ; Mon, 20 Jun 2022 12:04:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1B1F7F804EB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="E+i64BsH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655719445; x=1687255445; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=caF6uMwN6uVQ02UDhQ8rgZeuZsctMB4Rc9h8B0yK7gw=; b=E+i64BsH3IjR9Bgr3Nat3Oy/F7Nx2JSWbtVEJQ2QasBu5mI+pkRkVnyL XkZVJ2PcJs4U9m70A1pMy09y1woL9O6XTOcMTuRuZtlEjMtl5tBZ1pURf qkOUqzOv+fYvRTyoVeZ2tOECHl0JexmbjoDb7tVRB6o533+ocTonOccW0 MJ20pADem6uF08EGIIW+bQoCpNlDpyzJuFGkEsNZK6uNyJVREr8OFAzi7 7Sodz54lY1hakH7g/06o9fgN3qysL3d77/04nYl4D4lAIpYN++j1KZzz0 ffDHz11/TStgFQ4ZvpVZ6lwK8bvmyH4tCEiaE09940Nq8VPhPMEm3QMdO Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="366180691" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="366180691" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 03:04:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="643046307" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga008.fm.intel.com with ESMTP; 20 Jun 2022 03:03:59 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH v4 07/17] ASoC: Intel: hsw_rt5640: Improve hw_params() debug-ability Date: Mon, 20 Jun 2022 12:13:52 +0200 Message-Id: <20220620101402.2684366-8-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620101402.2684366-1-cezary.rojewski@intel.com> References: <20220620101402.2684366-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , pierre-louis.bossart@linux.intel.com, tiwai@suse.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.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" Print status if setting sysclk fails. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński --- sound/soc/intel/boards/hsw_rt5640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/hsw_rt5640.c b/sound/soc/intel/boards/hsw_rt5640.c index 273c8e274d25..ad747363d112 100644 --- a/sound/soc/intel/boards/hsw_rt5640.c +++ b/sound/soc/intel/boards/hsw_rt5640.c @@ -53,7 +53,7 @@ static int codec_link_hw_params(struct snd_pcm_substream *substream, ret = snd_soc_dai_set_sysclk(codec_dai, RT5640_SCLK_S_MCLK, 12288000, SND_SOC_CLOCK_IN); if (ret < 0) { - dev_err(rtd->dev, "can't set codec sysclk configuration\n"); + dev_err(rtd->dev, "set codec sysclk failed: %d\n", ret); return ret; } From patchwork Mon Jun 20 10:13:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 583287 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 CBB43C433EF for ; Mon, 20 Jun 2022 10:07:27 +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 1907318DC; Mon, 20 Jun 2022 12:06:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1907318DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655719646; bh=T2h+s71B1563L64v1UJRdMF3t5Ci6iyfmKwA7Y7EDQE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ce4vE3extzt6cLhyNsYufi1LFYwJ8apkmjUl17nrJYpTz4d/yiaGrIR9mbLnACo4K aGJMxUD7agxG/A1alehqy3wid2inNumnFdbOLDUIV9lQtsHHCoLzWSnHZrgOjzSZn5 u8kaId+YX/chLq5Vio4TDgaJ/QwyWxTdAGUukk8Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7145EF80571; Mon, 20 Jun 2022 12:04:16 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2DF7DF80571; Mon, 20 Jun 2022 12:04:15 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 5F735F80568 for ; Mon, 20 Jun 2022 12:04:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5F735F80568 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BJm2ulnH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655719453; x=1687255453; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=T2h+s71B1563L64v1UJRdMF3t5Ci6iyfmKwA7Y7EDQE=; b=BJm2ulnHINMTMfpTR1rDnYF19Qrqv1C4Fjrk7preGJLnve/vRpH/WSg2 /EavgaZHWtwaBBy7+yn5FNRUwtK7Z1r+J+16GUX4SKSZH7NeIvT6qd4t4 UJVbnlxusoRq/fzbAosCmZno7xIHlKeRxv6hOwmgf0Xm63xZAIX8oqiC1 h6CglaY1S0KLcyK39bFCHJmc+PazTC7mM8uP9OONiqxQYGPHcooJ2H3Pz +BILAsAt9xJ2egSiVi84zvm9iyFC9xYmlJ/LudMY1pVXfKBm8B+7LYNTz P3tBzBUBJaKH/WfVvTNlFbLI9EB7eUZsTWPLyxRIFCbybJ9lCdZmf/BEr A==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="366180714" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="366180714" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 03:04:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="643046361" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga008.fm.intel.com with ESMTP; 20 Jun 2022 03:04:05 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH v4 10/17] ASoC: Intel: bdw_rt286: Reword driver name Date: Mon, 20 Jun 2022 12:13:55 +0200 Message-Id: <20220620101402.2684366-11-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620101402.2684366-1-cezary.rojewski@intel.com> References: <20220620101402.2684366-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , pierre-louis.bossart@linux.intel.com, tiwai@suse.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.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" Align with other Intel boards naming convention and let the name explicitly state which components are being connected. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński --- sound/soc/intel/boards/bdw_rt286.c | 4 ++-- sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/boards/bdw_rt286.c b/sound/soc/intel/boards/bdw_rt286.c index f28341ec8eb3..26ec671a5a52 100644 --- a/sound/soc/intel/boards/bdw_rt286.c +++ b/sound/soc/intel/boards/bdw_rt286.c @@ -324,7 +324,7 @@ static struct platform_driver bdw_rt286_driver = { .probe = bdw_rt286_probe, .remove = bdw_rt286_remove, .driver = { - .name = "broadwell-audio", + .name = "bdw_rt286", .pm = &snd_soc_pm_ops }, }; @@ -335,4 +335,4 @@ module_platform_driver(bdw_rt286_driver) MODULE_AUTHOR("Liam Girdwood, Xingchao Wang"); MODULE_DESCRIPTION("Intel SST Audio for WPT/Broadwell"); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("platform:broadwell-audio"); +MODULE_ALIAS("platform:bdw_rt286"); diff --git a/sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c b/sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c index 4e00f8f6c521..cbcb649604e5 100644 --- a/sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c @@ -23,7 +23,7 @@ EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_haswell_machines); struct snd_soc_acpi_mach snd_soc_acpi_intel_broadwell_machines[] = { { .id = "INT343A", - .drv_name = "broadwell-audio", + .drv_name = "bdw_rt286", .fw_filename = "intel/IntcSST2.bin", .sof_tplg_filename = "sof-bdw-rt286.tplg", }, From patchwork Mon Jun 20 10:13:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 583286 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 0DF64C43334 for ; Mon, 20 Jun 2022 10:07:55 +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 5BAA418FC; Mon, 20 Jun 2022 12:07:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5BAA418FC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655719673; bh=ksVf2AFaHE40QroBGXJIQnCoo3/l/xJZpADUJf1WVu8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kFCCXdbnenN793d96o/uFpSkazbKOHmju2rtdcJ2bjNFemxui0zBh6pqfGAJ2rVhY oo2k2DXj9jUygTcfo4tWeP7LYue7IhbmlU1HVqaCH5clFjFowVc0Fmyflo4vJv4SsW Adf2SXn759qXQl3iEpk83dUJGH8I1gFUqiGS/7lI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 31EE8F80588; Mon, 20 Jun 2022 12:04:20 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 38E36F8057A; Mon, 20 Jun 2022 12:04:17 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 0B3ADF80570 for ; Mon, 20 Jun 2022 12:04:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0B3ADF80570 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MmQMvgII" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655719454; x=1687255454; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ksVf2AFaHE40QroBGXJIQnCoo3/l/xJZpADUJf1WVu8=; b=MmQMvgII9qEfDWQIUSHzW9DZ/5ZdNJpCWrfkfAHiBP19zg4dPMkITXNG /roqqPkAEre+1FonuFElV5V9yd1fVAu8C4+QB7bc+BjxrUDDxqMlFHf06 0jOLZd9RjRUmOMsCk740BWzRijQfGfUnwgybkEwfXVm/SSprcbkyiVMtq qZFeVdLFMwL4kH02sOGrrmzoZafv6/ZHbH4ehqHaAcnYAbxBrZbalL5ji 5xHuTnTeF0bzAz64Zc72q9DmGSTAxJ1CAwdhlTnvhuqwDsgxcMp3TNzaa yZOooSW6rG4uvh3k777Z4B9gQHLRomYmsfeY3R0cfSmXx9shhD+aZG5iJ Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="366180717" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="366180717" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 03:04:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="643046381" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga008.fm.intel.com with ESMTP; 20 Jun 2022 03:04:09 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH v4 11/17] ASoC: Intel: bdw_rt286: Update code indentation Date: Mon, 20 Jun 2022 12:13:56 +0200 Message-Id: <20220620101402.2684366-12-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620101402.2684366-1-cezary.rojewski@intel.com> References: <20220620101402.2684366-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , pierre-louis.bossart@linux.intel.com, tiwai@suse.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.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" Make use of 100 character limit and modify indentation so code is easier to read. While at it, sort includes in alphabetical order. While at it, rename local variable 'chan' to 'channels' to match hsw_rt5640 board's equivalent. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński --- sound/soc/intel/boards/bdw_rt286.c | 79 +++++++++++------------------- 1 file changed, 28 insertions(+), 51 deletions(-) diff --git a/sound/soc/intel/boards/bdw_rt286.c b/sound/soc/intel/boards/bdw_rt286.c index 26ec671a5a52..6c0cd53224d5 100644 --- a/sound/soc/intel/boards/bdw_rt286.c +++ b/sound/soc/intel/boards/bdw_rt286.c @@ -8,12 +8,11 @@ #include #include #include -#include -#include #include +#include #include +#include #include - #include "../../codecs/rt286.h" static struct snd_soc_jack card_headset; @@ -44,7 +43,6 @@ static const struct snd_soc_dapm_widget card_widgets[] = { }; static const struct snd_soc_dapm_route card_routes[] = { - /* speaker */ {"Speaker", NULL, "SPOR"}, {"Speaker", NULL, "SPOL"}, @@ -69,9 +67,10 @@ static int codec_link_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; int ret = 0; - ret = snd_soc_card_jack_new_pins(rtd->card, "Headset", - SND_JACK_HEADSET | SND_JACK_BTN_0, &card_headset, - card_headset_pins, ARRAY_SIZE(card_headset_pins)); + + ret = snd_soc_card_jack_new_pins(rtd->card, "Headset", SND_JACK_HEADSET | SND_JACK_BTN_0, + &card_headset, card_headset_pins, + ARRAY_SIZE(card_headset_pins)); if (ret) return ret; @@ -79,34 +78,29 @@ static int codec_link_init(struct snd_soc_pcm_runtime *rtd) return 0; } - static int codec_link_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, - struct snd_pcm_hw_params *params) + struct snd_pcm_hw_params *params) { - struct snd_interval *rate = hw_param_interval(params, - SNDRV_PCM_HW_PARAM_RATE); - struct snd_interval *chan = hw_param_interval(params, - SNDRV_PCM_HW_PARAM_CHANNELS); + struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); + struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); /* The ADSP will covert the FE rate to 48k, stereo */ rate->min = rate->max = 48000; - chan->min = chan->max = 2; - + channels->min = channels->max = 2; /* set SSP0 to 16 bit */ params_set_format(params, SNDRV_PCM_FORMAT_S16_LE); + return 0; } static int codec_link_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params) + struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); int ret; - ret = snd_soc_dai_set_sysclk(codec_dai, RT286_SCLK_S_PLL, 24000000, - SND_SOC_CLOCK_IN); - + ret = snd_soc_dai_set_sysclk(codec_dai, RT286_SCLK_S_PLL, 24000000, SND_SOC_CLOCK_IN); if (ret < 0) { dev_err(rtd->dev, "can't set codec sysclk configuration\n"); return ret; @@ -135,8 +129,7 @@ static int bdw_rt286_fe_startup(struct snd_pcm_substream *substream) /* Board supports stereo configuration only */ runtime->hw.channels_max = 2; - return snd_pcm_hw_constraint_list(runtime, 0, - SNDRV_PCM_HW_PARAM_CHANNELS, + return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, &constraints_channels); } @@ -144,29 +137,15 @@ static const struct snd_soc_ops bdw_rt286_fe_ops = { .startup = bdw_rt286_fe_startup, }; -SND_SOC_DAILINK_DEF(system, - DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); - -SND_SOC_DAILINK_DEF(offload0, - DAILINK_COMP_ARRAY(COMP_CPU("Offload0 Pin"))); +SND_SOC_DAILINK_DEF(system, DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); +SND_SOC_DAILINK_DEF(offload0, DAILINK_COMP_ARRAY(COMP_CPU("Offload0 Pin"))); +SND_SOC_DAILINK_DEF(offload1, DAILINK_COMP_ARRAY(COMP_CPU("Offload1 Pin"))); +SND_SOC_DAILINK_DEF(loopback, DAILINK_COMP_ARRAY(COMP_CPU("Loopback Pin"))); -SND_SOC_DAILINK_DEF(offload1, - DAILINK_COMP_ARRAY(COMP_CPU("Offload1 Pin"))); - -SND_SOC_DAILINK_DEF(loopback, - DAILINK_COMP_ARRAY(COMP_CPU("Loopback Pin"))); - -SND_SOC_DAILINK_DEF(dummy, - DAILINK_COMP_ARRAY(COMP_DUMMY())); - -SND_SOC_DAILINK_DEF(platform, - DAILINK_COMP_ARRAY(COMP_PLATFORM("haswell-pcm-audio"))); - -SND_SOC_DAILINK_DEF(codec, - DAILINK_COMP_ARRAY(COMP_CODEC("i2c-INT343A:00", "rt286-aif1"))); - -SND_SOC_DAILINK_DEF(ssp0_port, - DAILINK_COMP_ARRAY(COMP_CPU("ssp0-port"))); +SND_SOC_DAILINK_DEF(dummy, DAILINK_COMP_ARRAY(COMP_DUMMY())); +SND_SOC_DAILINK_DEF(platform, DAILINK_COMP_ARRAY(COMP_PLATFORM("haswell-pcm-audio"))); +SND_SOC_DAILINK_DEF(codec, DAILINK_COMP_ARRAY(COMP_CODEC("i2c-INT343A:00", "rt286-aif1"))); +SND_SOC_DAILINK_DEF(ssp0_port, DAILINK_COMP_ARRAY(COMP_CPU("ssp0-port"))); /* broadwell digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link card_dai_links[] = { @@ -216,8 +195,7 @@ static struct snd_soc_dai_link card_dai_links[] = { .id = 0, .no_pcm = 1, .init = codec_link_init, - .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | - SND_SOC_DAIFMT_CBC_CFC, + .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, .ignore_pmdown_time = 1, .be_hw_params_fixup = codec_link_hw_params_fixup, .ops = &codec_link_ops, @@ -233,7 +211,6 @@ static void bdw_rt286_disable_jack(struct snd_soc_card *card) for_each_card_components(card, component) { if (!strcmp(component->name, "i2c-INT343A:00")) { - dev_dbg(component->dev, "disabling jack detect before going to suspend.\n"); snd_soc_component_set_jack(component, NULL, NULL); break; @@ -248,17 +225,18 @@ static int bdw_rt286_suspend(struct snd_soc_card *card) return 0; } -static int bdw_rt286_resume(struct snd_soc_card *card){ +static int bdw_rt286_resume(struct snd_soc_card *card) +{ struct snd_soc_component *component; for_each_card_components(card, component) { if (!strcmp(component->name, "i2c-INT343A:00")) { - dev_dbg(component->dev, "enabling jack detect for resume.\n"); snd_soc_component_set_jack(component, &card_headset, NULL); break; } } + return 0; } @@ -291,11 +269,10 @@ static int bdw_rt286_probe(struct platform_device *pdev) int ret; bdw_rt286_card.dev = &pdev->dev; - /* override platform name, if required */ mach = pdev->dev.platform_data; - ret = snd_soc_fixup_dai_links_platform_name(&bdw_rt286_card, - mach->mach_params.platform); + + ret = snd_soc_fixup_dai_links_platform_name(&bdw_rt286_card, mach->mach_params.platform); if (ret) return ret; From patchwork Mon Jun 20 10:13:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 583285 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 B528DC43334 for ; Mon, 20 Jun 2022 10:08:26 +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 0E887190B; Mon, 20 Jun 2022 12:07:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0E887190B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655719705; bh=4Os6VcoByF729ZusiIDeFEgM/pmPMoUZHR6pZnSEW+Y=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HwLvrU180gTFHZ/vyBU0hS/CpJI06FbbEzwvUfMLUYaB9IqWchnYTIz1u8cuj6+vm ECsaQkYp0ft9o7nfs1buDohmDq0ITqmA3R+5ceIv3eVYx2i+UNsY2hYduAdwTL2Y5c o40mQ9C87ODexkfj3Y0z+NOzJ9lAkrtcxSaJpAYY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6C67CF805A9; Mon, 20 Jun 2022 12:04:21 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 30132F80589; Mon, 20 Jun 2022 12:04:19 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 A0605F80548 for ; Mon, 20 Jun 2022 12:04:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A0605F80548 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BK5X9KTW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655719456; x=1687255456; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4Os6VcoByF729ZusiIDeFEgM/pmPMoUZHR6pZnSEW+Y=; b=BK5X9KTWcXMIBOw2t/H+v8bPU76w3zmbbsJ8pSMovNu0k5cDasAOizqI CEWtu/4o7f5s0ZwAzDfzWky541fvKmZZY5+r4T+SrtPAtKTdr9JN902nO uJ33wAq8T8pkePiT0Eq6NXrY20CBRQi1mqtvSfC8nwzVs1aqVC2ENLG8d 9QykyKhuEoQ9g45cUG2G+GKvL2LIGsSKxaaUO0gIyHAPlN4XsYzBUfU4C puHRU2IxCTh3z90pzdBH3bhej5hu1GzLcV3T/DygbSk2CADV/Jz5ke51j I7V7+McA3dlJNVGEvf7QWT/25T/6mK84YFpYNiYEV0s3tdEFLx2k7OrEw w==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="366180722" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="366180722" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 03:04:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="643046396" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga008.fm.intel.com with ESMTP; 20 Jun 2022 03:04:13 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH v4 13/17] ASoC: Intel: bdw_rt286: Improve probe() function quality Date: Mon, 20 Jun 2022 12:13:58 +0200 Message-Id: <20220620101402.2684366-14-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620101402.2684366-1-cezary.rojewski@intel.com> References: <20220620101402.2684366-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , pierre-louis.bossart@linux.intel.com, tiwai@suse.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.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" Declare local 'dev' and make use of it plus dev_get_platdata() to improve code readability. Relocate few relevant to the function macros for the exact same read too. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński --- sound/soc/intel/boards/bdw_rt286.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/sound/soc/intel/boards/bdw_rt286.c b/sound/soc/intel/boards/bdw_rt286.c index 9d815c31e1f4..c5737f548bef 100644 --- a/sound/soc/intel/boards/bdw_rt286.c +++ b/sound/soc/intel/boards/bdw_rt286.c @@ -235,13 +235,6 @@ static int bdw_rt286_resume(struct snd_soc_card *card) return 0; } -/* Use space before codec name to simplify card ID, and simplify driver name. */ -#define SOF_CARD_NAME "bdw rt286" /* card name will be 'sof-bdw rt286' */ -#define SOF_DRIVER_NAME "SOF" - -#define CARD_NAME "broadwell-rt286" -#define DRIVER_NAME NULL /* card name will be used for driver name */ - static struct snd_soc_card bdw_rt286_card = { .owner = THIS_MODULE, .dai_link = card_dai_links, @@ -257,27 +250,33 @@ static struct snd_soc_card bdw_rt286_card = { .resume_post = bdw_rt286_resume, }; +/* Use space before codec name to simplify card ID, and simplify driver name. */ +#define SOF_CARD_NAME "bdw rt286" /* card name will be 'sof-bdw rt286' */ +#define SOF_DRIVER_NAME "SOF" + +#define CARD_NAME "broadwell-rt286" + static int bdw_rt286_probe(struct platform_device *pdev) { struct snd_soc_acpi_mach *mach; + struct device *dev = &pdev->dev; int ret; - bdw_rt286_card.dev = &pdev->dev; - mach = pdev->dev.platform_data; + bdw_rt286_card.dev = dev; + mach = dev_get_platdata(dev); ret = snd_soc_fixup_dai_links_platform_name(&bdw_rt286_card, mach->mach_params.platform); if (ret) return ret; - if (snd_soc_acpi_sof_parent(&pdev->dev)) { + if (snd_soc_acpi_sof_parent(dev)) { bdw_rt286_card.name = SOF_CARD_NAME; bdw_rt286_card.driver_name = SOF_DRIVER_NAME; } else { bdw_rt286_card.name = CARD_NAME; - bdw_rt286_card.driver_name = DRIVER_NAME; } - return devm_snd_soc_register_card(&pdev->dev, &bdw_rt286_card); + return devm_snd_soc_register_card(dev, &bdw_rt286_card); } static int bdw_rt286_remove(struct platform_device *pdev) From patchwork Mon Jun 20 10:14:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 583284 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 C5508C433EF for ; Mon, 20 Jun 2022 10:09:04 +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 1E72718DC; Mon, 20 Jun 2022 12:08:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1E72718DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655719743; bh=URa45WWB0RKrMiG+Q4VGRLT/z7GxowJZ+7YEpsPOc00=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uXXNluoWxDQyVN8ge+b5tOpreILyE9orUGYENkKZnZCH1mCFLoDCawcm71SvQuJ8Q vgCyvZTa2vYscMlDnN5ZXG3HkR4aXupHDmpdOP4e6W27QudBnGq9iblKqr4QvaifSD reKDEZpGSzdkBqdivz2pvlUVibr+ggsbFY6lrfmY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2463FF805B3; Mon, 20 Jun 2022 12:04:26 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AD491F805BA; Mon, 20 Jun 2022 12:04:23 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 D7B4FF805AF for ; Mon, 20 Jun 2022 12:04:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D7B4FF805AF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IzpHZRFL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655719462; x=1687255462; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=URa45WWB0RKrMiG+Q4VGRLT/z7GxowJZ+7YEpsPOc00=; b=IzpHZRFLEw7gwfPfdUtv/zBbkFBQXsWHo3k1fDbnHNne0GT2akAi4Qka 8G+r2dr0Rma3Xy2nKIqdfsqzJGJis1hUhpfcPYlX1OWnthQYFXL+3PhyQ 8vH4eCCR6j8tPe55ltzQpxxW4EsbQqpEjrA/DOc3btMVZttwjtLofdzDW Uc029TsnFpryNccuiDyw7EpgWW2reMCiR0dch7oUSBMlxR9hfn5PyzN7w hH5CkMlZf3hMK4aImblvIWhchmj/A0ummyJWfWVKyJpVMxUd2AIRqANPd ek9UcVLQpdK0kAD0Q3ZTpRird63glIa1BxzSpX5qqPbTHtCbHm4ZPqrDx A==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="366180731" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="366180731" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 03:04:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="643046421" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga008.fm.intel.com with ESMTP; 20 Jun 2022 03:04:17 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH v4 15/17] ASoC: Intel: bdw_rt286: Improve codec_init() quality Date: Mon, 20 Jun 2022 12:14:00 +0200 Message-Id: <20220620101402.2684366-16-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620101402.2684366-1-cezary.rojewski@intel.com> References: <20220620101402.2684366-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , pierre-louis.bossart@linux.intel.com, tiwai@suse.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.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" Drop redundant 'ret' assignemnt, stop ignoring set_jack() return value and reword local 'component' variable to 'codec' to improve readability. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński --- sound/soc/intel/boards/bdw_rt286.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/intel/boards/bdw_rt286.c b/sound/soc/intel/boards/bdw_rt286.c index 8604b221b60d..36f984ff56c5 100644 --- a/sound/soc/intel/boards/bdw_rt286.c +++ b/sound/soc/intel/boards/bdw_rt286.c @@ -61,8 +61,8 @@ static const struct snd_soc_dapm_route card_routes[] = { static int codec_link_init(struct snd_soc_pcm_runtime *rtd) { - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; - int ret = 0; + struct snd_soc_component *codec = asoc_rtd_to_codec(rtd, 0)->component; + int ret; ret = snd_soc_card_jack_new_pins(rtd->card, "Headset", SND_JACK_HEADSET | SND_JACK_BTN_0, &card_headset, card_headset_pins, @@ -70,8 +70,7 @@ static int codec_link_init(struct snd_soc_pcm_runtime *rtd) if (ret) return ret; - snd_soc_component_set_jack(component, &card_headset, NULL); - return 0; + return snd_soc_component_set_jack(codec, &card_headset, NULL); } static int codec_link_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, From patchwork Mon Jun 20 10:14:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 583283 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 76132C43334 for ; Mon, 20 Jun 2022 10:09:44 +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 AF2881925; Mon, 20 Jun 2022 12:08:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AF2881925 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655719782; bh=O4SwyI2G/dNCqyMJTE1m8IbY8RbyRbpnChN1eMMr6xc=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=WFdsMSJ8dQHwme0NxkSk6OIuoGknr9gzjpGaBSZmltYUChlKLpJTAXaNX+Z90MW2s DlpTGIvZO1TR1FX8DGkY++Gmd8NcZFzHI63Qa26GdAforf4LR0XdYGf6HNlGFoIcdr ER3qyq2xwRPIdZkBnEo3ny3tfCr3cp1cfdrxGUNU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C091EF805C8; Mon, 20 Jun 2022 12:04:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3C9CCF805C9; Mon, 20 Jun 2022 12:04:32 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 7C41AF805C8 for ; Mon, 20 Jun 2022 12:04:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7C41AF805C8 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TGH/Iglx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655719470; x=1687255470; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=O4SwyI2G/dNCqyMJTE1m8IbY8RbyRbpnChN1eMMr6xc=; b=TGH/Iglx2Ao5AMydNIypHFcaQY3TJvi/gfXXM6VBl2KF0IYFc0wkJyy5 ZgBI5lNpmpISeqqyqenhVjRyNzyh5Y6QdwJ4Y+dFq/z7MeV8Cz9dth5mB EBrYYObc/5EP29H6JdW5yoKsw1tzmVNnPIBnL7lDYzQmjVJ2Jc64yWbSF 6Bo3j1WyHSHD6xAKaTOHWfYHVaMSrrLFBvBpvKcucy+LjTkpmMdSUgbbN auiciraYu9rQ2TwUawkZZtfDddqsPgmql2eVw09nycs4vWkTlDry0uiy7 Mi6A24v0oaWqGfqR4ONuTUWYblzirlVIqb8jcJ45ycXdkNAUC39crQCvU g==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="279905843" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="279905843" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 03:04:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="643046455" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga008.fm.intel.com with ESMTP; 20 Jun 2022 03:04:21 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH v4 17/17] ASoC: Intel: bdw_rt286: Remove FE DAI ops Date: Mon, 20 Jun 2022 12:14:02 +0200 Message-Id: <20220620101402.2684366-18-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620101402.2684366-1-cezary.rojewski@intel.com> References: <20220620101402.2684366-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , pierre-louis.bossart@linux.intel.com, tiwai@suse.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.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" bdw_rt286_fe_ops is redundant as platform components already limit the number of channels available for the endpoint. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński --- sound/soc/intel/boards/bdw_rt286.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/sound/soc/intel/boards/bdw_rt286.c b/sound/soc/intel/boards/bdw_rt286.c index 622f2424ca59..2317a0bb136a 100644 --- a/sound/soc/intel/boards/bdw_rt286.c +++ b/sound/soc/intel/boards/bdw_rt286.c @@ -115,30 +115,6 @@ static const struct snd_soc_ops codec_link_ops = { .hw_params = codec_link_hw_params, }; -static const unsigned int channels[] = { - 2, -}; - -static const struct snd_pcm_hw_constraint_list constraints_channels = { - .count = ARRAY_SIZE(channels), - .list = channels, - .mask = 0, -}; - -static int bdw_rt286_fe_startup(struct snd_pcm_substream *substream) -{ - struct snd_pcm_runtime *runtime = substream->runtime; - - /* Board supports stereo configuration only */ - runtime->hw.channels_max = 2; - return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, - &constraints_channels); -} - -static const struct snd_soc_ops bdw_rt286_fe_ops = { - .startup = bdw_rt286_fe_startup, -}; - SND_SOC_DAILINK_DEF(system, DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); SND_SOC_DAILINK_DEF(offload0, DAILINK_COMP_ARRAY(COMP_CPU("Offload0 Pin"))); SND_SOC_DAILINK_DEF(offload1, DAILINK_COMP_ARRAY(COMP_CPU("Offload1 Pin"))); @@ -157,7 +133,6 @@ static struct snd_soc_dai_link card_dai_links[] = { .nonatomic = 1, .dynamic = 1, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .ops = &bdw_rt286_fe_ops, .dpcm_playback = 1, .dpcm_capture = 1, SND_SOC_DAILINK_REG(system, dummy, platform),