From patchwork Fri Jun 10 12:36:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 580644 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 4E5E2C433EF for ; Fri, 10 Jun 2022 12:28:29 +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 8F1F21AFA; Fri, 10 Jun 2022 14:27:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8F1F21AFA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1654864107; bh=MimaEjhfOFMoaFaUoxenQwVquI+Sqlngom9jUe3PD1I=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=povX/BwclrK/BHeUDQrQPm6NJLDtk+lEz9wnS+cln7ReAgVvxvx51WrBubycX6NlZ uh2xnSEFmzQzYEkGvdOoUVkFGxWOLMp0GMv0Hc1ZnFYhCMl6dY0vQUN9SEiATlwd+r DkrwPZbTeFzOnCRqWcBHgZHZJ3qvMRy+aLaW4wtA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3C591F8053E; Fri, 10 Jun 2022 14:26:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E8240F80527; Fri, 10 Jun 2022 14:26:28 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 75F88F804DA for ; Fri, 10 Jun 2022 14:26:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 75F88F804DA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PHKmOjFN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654863980; x=1686399980; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MimaEjhfOFMoaFaUoxenQwVquI+Sqlngom9jUe3PD1I=; b=PHKmOjFNxKn+dnjIgaVvpz6zhVsKFEWSUsFLj3z8uMIRd71ch+oeVhEP N4/duZ0UOcOpojhk4u4ftiFRGcCjaJUsNLznAxsImkj1xt0tteRKXyZ5r YybxTGQpRbSmcXoaH4C8bcUnPv6pNNB7TmOYybxl7z/1QXqdr538//Jie aK+IjCvN+P0NOxuNWMRRoorTecUylB+V3U66HmaJe23matXRvrzrXfGsz 0f2S8HyYCuuA8FgqfummwENfxbujBOpL752WDstNBNixOjcrqYoAKJ/Uq O+IPU4VIxUvhinsbsBhWa+3uPsV/dXZ0125N0KxXZjsinmkzv5CrcnGKo g==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="278414331" X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="278414331" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 05:26:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="684517836" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga002.fm.intel.com with ESMTP; 10 Jun 2022 05:26:10 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 02/17] ASoC: Intel: hsw_rt5640: Reword prefixes of all driver members Date: Fri, 10 Jun 2022 14:36:12 +0200 Message-Id: <20220610123627.1339985-3-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610123627.1339985-1-cezary.rojewski@intel.com> References: <20220610123627.1339985-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" Replace ambiguous 'broadwell_rt286_' prefixes in favour of 'card_', 'link_' and other similar strings to clearly state which object given member implements behavior for. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński --- sound/soc/intel/boards/hsw_rt5640.c | 46 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/sound/soc/intel/boards/hsw_rt5640.c b/sound/soc/intel/boards/hsw_rt5640.c index aa61e101f793..b51ce8d0ca22 100644 --- a/sound/soc/intel/boards/hsw_rt5640.c +++ b/sound/soc/intel/boards/hsw_rt5640.c @@ -16,12 +16,12 @@ #include "../../codecs/rt5640.h" /* Haswell ULT platforms have a Headphone and Mic jack */ -static const struct snd_soc_dapm_widget haswell_widgets[] = { +static const struct snd_soc_dapm_widget card_widgets[] = { SND_SOC_DAPM_HP("Headphones", NULL), SND_SOC_DAPM_MIC("Mic", NULL), }; -static const struct snd_soc_dapm_route haswell_rt5640_map[] = { +static const struct snd_soc_dapm_route card_routes[] = { {"Headphones", NULL, "HPOR"}, {"Headphones", NULL, "HPOL"}, @@ -32,7 +32,7 @@ static const struct snd_soc_dapm_route haswell_rt5640_map[] = { {"AIF1 Playback", NULL, "SSP0 CODEC OUT"}, }; -static int haswell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd, +static int codec_link_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { struct snd_interval *rate = hw_param_interval(params, @@ -49,7 +49,7 @@ static int haswell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd, return 0; } -static int haswell_rt5640_hw_params(struct snd_pcm_substream *substream, +static int codec_link_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); @@ -70,8 +70,8 @@ static int haswell_rt5640_hw_params(struct snd_pcm_substream *substream, return ret; } -static const struct snd_soc_ops haswell_rt5640_ops = { - .hw_params = haswell_rt5640_hw_params, +static const struct snd_soc_ops codec_link_ops = { + .hw_params = codec_link_hw_params, }; SND_SOC_DAILINK_DEF(dummy, @@ -98,7 +98,7 @@ SND_SOC_DAILINK_DEF(platform, SND_SOC_DAILINK_DEF(ssp0_port, DAILINK_COMP_ARRAY(COMP_CPU("ssp0-port"))); -static struct snd_soc_dai_link haswell_rt5640_dais[] = { +static struct snd_soc_dai_link card_dai_links[] = { /* Front End DAI links */ { .name = "System", @@ -147,8 +147,8 @@ static struct snd_soc_dai_link haswell_rt5640_dais[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, .ignore_pmdown_time = 1, - .be_hw_params_fixup = haswell_ssp0_fixup, - .ops = &haswell_rt5640_ops, + .be_hw_params_fixup = codec_link_hw_params_fixup, + .ops = &codec_link_ops, .dpcm_playback = 1, .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp0_port, codec, platform), @@ -156,44 +156,44 @@ static struct snd_soc_dai_link haswell_rt5640_dais[] = { }; /* audio machine driver for Haswell Lynxpoint DSP + RT5640 */ -static struct snd_soc_card haswell_rt5640 = { +static struct snd_soc_card hsw_rt5640_card = { .name = "haswell-rt5640", .owner = THIS_MODULE, - .dai_link = haswell_rt5640_dais, - .num_links = ARRAY_SIZE(haswell_rt5640_dais), - .dapm_widgets = haswell_widgets, - .num_dapm_widgets = ARRAY_SIZE(haswell_widgets), - .dapm_routes = haswell_rt5640_map, - .num_dapm_routes = ARRAY_SIZE(haswell_rt5640_map), + .dai_link = card_dai_links, + .num_links = ARRAY_SIZE(card_dai_links), + .dapm_widgets = card_widgets, + .num_dapm_widgets = ARRAY_SIZE(card_widgets), + .dapm_routes = card_routes, + .num_dapm_routes = ARRAY_SIZE(card_routes), .fully_routed = true, }; -static int haswell_audio_probe(struct platform_device *pdev) +static int hsw_rt5640_probe(struct platform_device *pdev) { struct snd_soc_acpi_mach *mach; int ret; - haswell_rt5640.dev = &pdev->dev; + hsw_rt5640_card.dev = &pdev->dev; /* override platform name, if required */ mach = pdev->dev.platform_data; - ret = snd_soc_fixup_dai_links_platform_name(&haswell_rt5640, + ret = snd_soc_fixup_dai_links_platform_name(&hsw_rt5640_card, mach->mach_params.platform); if (ret) return ret; - return devm_snd_soc_register_card(&pdev->dev, &haswell_rt5640); + return devm_snd_soc_register_card(&pdev->dev, &hsw_rt5640_card); } -static struct platform_driver haswell_audio = { - .probe = haswell_audio_probe, +static struct platform_driver hsw_rt5640_driver = { + .probe = hsw_rt5640_probe, .driver = { .name = "haswell-audio", .pm = &snd_soc_pm_ops, }, }; -module_platform_driver(haswell_audio) +module_platform_driver(hsw_rt5640_driver) /* Module information */ MODULE_AUTHOR("Liam Girdwood, Xingchao Wang"); From patchwork Fri Jun 10 12:36:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 580646 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 C4752C433EF for ; Fri, 10 Jun 2022 12:27:18 +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 0F3451B24; Fri, 10 Jun 2022 14:26:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0F3451B24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1654864037; 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=NB6oXzkkIYxam45ETmkPfFPkdjef5twck/eQwONOmuL+V7XoejuVBPqndll/WMzM1 weti9p49xunKHWsjyoTnJwHXcI9JcLWEenY6SyifSA1/txLO5YO3oNqh11vcPAwJUl aB7pmEQPe3hakFzxmbbMHzPHkI9j17JYQhNUzvBk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9FEDCF80534; Fri, 10 Jun 2022 14:26:26 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2D8E7F80535; Fri, 10 Jun 2022 14:26:24 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1DEDDF804D2 for ; Fri, 10 Jun 2022 14:26:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1DEDDF804D2 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Eaz1mBiP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654863978; x=1686399978; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6JtxhdVF68FxjUQnyy4IHfIL6UuGS31kUjgIV/EBCks=; b=Eaz1mBiPtkl44kO04mRKW7o7VnURbffewb0jABHL5tnyTlIJmFIelZeP zF8n4AAgSNQ1eBo2R/GWir/VVYbv8zlgfZlONcr+Aa4SMr3IVot/2vmjk zc8LLBJLKQNV03lHQWE2ZWJ8OlT8soV9MtvHh7BiX3fU0S7I5AKr5F53p 3BbQ7Szm2xLo9sNA4YRDlN75+dFamEuLNHo+MhRu7xiZTYQHQpIKUoSsF l+fkH4yTA4LCJ99JalFh8PGnOQ70IosWFDQi5HBcYNE4QGjH5l0uFiwCC mkFNW3Qr9sBMciBz5Oq0qtj/wIcGHRmALV50pgQ5gzdTrTpHnAH9xDLvb Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="278414347" X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="278414347" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 05:26:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="684517845" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga002.fm.intel.com with ESMTP; 10 Jun 2022 05:26:12 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 03/17] ASoC: Intel: hsw_rt5640: Reword driver name Date: Fri, 10 Jun 2022 14:36:13 +0200 Message-Id: <20220610123627.1339985-4-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610123627.1339985-1-cezary.rojewski@intel.com> References: <20220610123627.1339985-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 Fri Jun 10 12:36:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 580645 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 E74C6C433EF for ; Fri, 10 Jun 2022 12:28:00 +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 2FE821B40; Fri, 10 Jun 2022 14:27:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2FE821B40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1654864079; bh=ASwBtb78kA/ZxwM96te3oAsVro2Po6ndmsMI8j4Kb+c=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BBRtWmj0NY7qiNumB3fF/EKdmrLty7o7HFoQZd4rA1oogjYC0CbZR3Yjw10gHduJB uHUHLv4IZ92MMZVEdj21OUWTTg5urcvB+WW36oGiKJO40pTbVu0+aj/k4bH+iitBZm vUlQ635ODnu+P6EOGPGRGlxOoju33R5DA4rhnNmw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A69C8F80536; Fri, 10 Jun 2022 14:26:30 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EAB27F80535; Fri, 10 Jun 2022 14:26:26 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 379CDF80520 for ; Fri, 10 Jun 2022 14:26:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 379CDF80520 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dW8uBmtd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654863980; x=1686399980; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ASwBtb78kA/ZxwM96te3oAsVro2Po6ndmsMI8j4Kb+c=; b=dW8uBmtde7+on45zwPR6hzO37hscbZfF8nZpMhxLW6FOsdpjkhY2bCvb vRsVAl4+0kg+cN3i3qgOv82Etq0oeYTpP0tf5wPjBshh9RXjXPcJV54fQ Eitvrp0uo94AKWBIM/Hz5sJq/vITx6Ek9Uay9Xc83TGBAX+ewCmL1MWVc l/3Cr5aFdiuXFRLc3aaTbqU4y/oF9cDUvE2OyVR+2E00optrHK4zHN1Si WRxfsxM6hhDy4bh8wI+KavrxA+RJ5BLl7Ec1l1KkTLi2m0p0UQ0mwffQQ clJcE/774DNf9hWbhhREEg+7Qoe0MsnaLeUuzThTEkKkumIHs9Mp/clja A==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="278414369" X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="278414369" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 05:26:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="684517865" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga002.fm.intel.com with ESMTP; 10 Jun 2022 05:26:16 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 05/17] ASoC: Intel: hsw_rt5640: Update file comments Date: Fri, 10 Jun 2022 14:36:15 +0200 Message-Id: <20220610123627.1339985-6-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610123627.1339985-1-cezary.rojewski@intel.com> References: <20220610123627.1339985-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 69be5086b98d..0cd788a73694 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 Fri Jun 10 12:36:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 580642 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 B2F44C43334 for ; Fri, 10 Jun 2022 12:29:38 +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 E4D4E1B1A; Fri, 10 Jun 2022 14:28:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E4D4E1B1A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1654864177; bh=5BQ5MHlwnuq9iDJwDNaNV0k8nuJSTLk9Bmi2Dkel+dg=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fQ5vj0PbE/2MaCE8gXV19DrPW498fxcSPWHPx6acGedMcR7gB261uHbRzOiFMzRtR VWxQFEWqFN5y1s885AFwKSP+c1e8XqeZLI09DRjZ0MDOGfaQDpn6SF+WBV6Z5Kirgw 4Aw39LL0HiiYSMHZ58y5he/t56r385a2CjpNDz/4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 606FDF80566; Fri, 10 Jun 2022 14:26:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5E8B1F80548; Fri, 10 Jun 2022 14:26:34 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4B483F800E5 for ; Fri, 10 Jun 2022 14:26:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4B483F800E5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="anGvW/mU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654863988; x=1686399988; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5BQ5MHlwnuq9iDJwDNaNV0k8nuJSTLk9Bmi2Dkel+dg=; b=anGvW/mUUDYKQ/D3ijK48WAr8In47pLNfEettKqhF2pEcc5xOM5C1Ikd +iUkgfQx+Z7GSr6DwDPF5NrJ9cshVSfHDnPpsZeqHbYlro4PGTtw7eelu Zu0oPxOeKbH/183JaJ9CZTmn9IAi1raxrDDdoczGlwdd1YE1j+tV83s12 U8bKHfNvhwzKjymxWa5F+tusy9RXu0Vqqlyyz+LEEVJtUiItR1mAHZ+Oh RKFDMO2GVlWiOA6QQoQ3IzoWIQVgfIg7p6AIJwP3pc6to4/366nhoRFDF MFqA3WO00f4uaY1rD1zaVSw/llZ4W6QQJFGmN+AfLSvJR4cEs548xSR/B Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="278414454" X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="278414454" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 05:26:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="684517910" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga002.fm.intel.com with ESMTP; 10 Jun 2022 05:26:24 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 09/17] ASoC: Intel: bdw_rt286: Reword prefixes of all driver members Date: Fri, 10 Jun 2022 14:36:19 +0200 Message-Id: <20220610123627.1339985-10-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610123627.1339985-1-cezary.rojewski@intel.com> References: <20220610123627.1339985-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" Replace ambiguous 'broadwell_rt286_' prefixes in favour of 'card_', 'link_' and other similar strings to clearly state which object given member implements behavior for. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński --- sound/soc/intel/boards/bdw_rt286.c | 96 +++++++++++++++--------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/sound/soc/intel/boards/bdw_rt286.c b/sound/soc/intel/boards/bdw_rt286.c index b29d77dfb281..092bc9a45548 100644 --- a/sound/soc/intel/boards/bdw_rt286.c +++ b/sound/soc/intel/boards/bdw_rt286.c @@ -16,9 +16,9 @@ #include "../../codecs/rt286.h" -static struct snd_soc_jack broadwell_headset; +static struct snd_soc_jack card_headset; /* Headset jack detection DAPM pins */ -static struct snd_soc_jack_pin broadwell_headset_pins[] = { +static struct snd_soc_jack_pin card_headset_pins[] = { { .pin = "Mic Jack", .mask = SND_JACK_MICROPHONE, @@ -29,12 +29,12 @@ static struct snd_soc_jack_pin broadwell_headset_pins[] = { }, }; -static const struct snd_kcontrol_new broadwell_controls[] = { +static const struct snd_kcontrol_new card_controls[] = { SOC_DAPM_PIN_SWITCH("Speaker"), SOC_DAPM_PIN_SWITCH("Headphone Jack"), }; -static const struct snd_soc_dapm_widget broadwell_widgets[] = { +static const struct snd_soc_dapm_widget card_widgets[] = { SND_SOC_DAPM_HP("Headphone Jack", NULL), SND_SOC_DAPM_SPK("Speaker", NULL), SND_SOC_DAPM_MIC("Mic Jack", NULL), @@ -43,7 +43,7 @@ static const struct snd_soc_dapm_widget broadwell_widgets[] = { SND_SOC_DAPM_LINE("Line Jack", NULL), }; -static const struct snd_soc_dapm_route broadwell_rt286_map[] = { +static const struct snd_soc_dapm_route card_routes[] = { /* speaker */ {"Speaker", NULL, "SPOR"}, @@ -65,22 +65,22 @@ static const struct snd_soc_dapm_route broadwell_rt286_map[] = { {"AIF1 Playback", NULL, "SSP0 CODEC OUT"}, }; -static int broadwell_rt286_codec_init(struct snd_soc_pcm_runtime *rtd) +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, &broadwell_headset, - broadwell_headset_pins, ARRAY_SIZE(broadwell_headset_pins)); + SND_JACK_HEADSET | SND_JACK_BTN_0, &card_headset, + card_headset_pins, ARRAY_SIZE(card_headset_pins)); if (ret) return ret; - rt286_mic_detect(component, &broadwell_headset); + rt286_mic_detect(component, &card_headset); return 0; } -static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd, +static int codec_link_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { struct snd_interval *rate = hw_param_interval(params, @@ -97,7 +97,7 @@ static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd, return 0; } -static int broadwell_rt286_hw_params(struct snd_pcm_substream *substream, +static int codec_link_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); @@ -115,8 +115,8 @@ static int broadwell_rt286_hw_params(struct snd_pcm_substream *substream, return ret; } -static const struct snd_soc_ops broadwell_rt286_ops = { - .hw_params = broadwell_rt286_hw_params, +static const struct snd_soc_ops codec_link_ops = { + .hw_params = codec_link_hw_params, }; static const unsigned int channels[] = { @@ -129,7 +129,7 @@ static const struct snd_pcm_hw_constraint_list constraints_channels = { .mask = 0, }; -static int broadwell_fe_startup(struct snd_pcm_substream *substream) +static int bdw_rt286_fe_startup(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; @@ -140,8 +140,8 @@ static int broadwell_fe_startup(struct snd_pcm_substream *substream) &constraints_channels); } -static const struct snd_soc_ops broadwell_fe_ops = { - .startup = broadwell_fe_startup, +static const struct snd_soc_ops bdw_rt286_fe_ops = { + .startup = bdw_rt286_fe_startup, }; SND_SOC_DAILINK_DEF(system, @@ -169,7 +169,7 @@ 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 broadwell_rt286_dais[] = { +static struct snd_soc_dai_link card_dai_links[] = { /* Front End DAI links */ { .name = "System PCM", @@ -177,7 +177,7 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = { .nonatomic = 1, .dynamic = 1, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .ops = &broadwell_fe_ops, + .ops = &bdw_rt286_fe_ops, .dpcm_playback = 1, .dpcm_capture = 1, SND_SOC_DAILINK_REG(system, dummy, platform), @@ -215,12 +215,12 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = { .name = "Codec", .id = 0, .no_pcm = 1, - .init = broadwell_rt286_codec_init, + .init = codec_link_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, .ignore_pmdown_time = 1, - .be_hw_params_fixup = broadwell_ssp0_fixup, - .ops = &broadwell_rt286_ops, + .be_hw_params_fixup = codec_link_hw_params_fixup, + .ops = &codec_link_ops, .dpcm_playback = 1, .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp0_port, codec, platform), @@ -241,21 +241,21 @@ static void broadwell_disable_jack(struct snd_soc_card *card) } } -static int broadwell_suspend(struct snd_soc_card *card) +static int card_suspend_pre(struct snd_soc_card *card) { broadwell_disable_jack(card); return 0; } -static int broadwell_resume(struct snd_soc_card *card){ +static int card_resume_post(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"); - rt286_mic_detect(component, &broadwell_headset); + rt286_mic_detect(component, &card_headset); break; } } @@ -270,48 +270,48 @@ static int broadwell_resume(struct snd_soc_card *card){ #define DRIVER_NAME NULL /* card name will be used for driver name */ /* broadwell audio machine driver for WPT + RT286S */ -static struct snd_soc_card broadwell_rt286 = { +static struct snd_soc_card bdw_rt286_card = { .owner = THIS_MODULE, - .dai_link = broadwell_rt286_dais, - .num_links = ARRAY_SIZE(broadwell_rt286_dais), - .controls = broadwell_controls, - .num_controls = ARRAY_SIZE(broadwell_controls), - .dapm_widgets = broadwell_widgets, - .num_dapm_widgets = ARRAY_SIZE(broadwell_widgets), - .dapm_routes = broadwell_rt286_map, - .num_dapm_routes = ARRAY_SIZE(broadwell_rt286_map), + .dai_link = card_dai_links, + .num_links = ARRAY_SIZE(card_dai_links), + .controls = card_controls, + .num_controls = ARRAY_SIZE(card_controls), + .dapm_widgets = card_widgets, + .num_dapm_widgets = ARRAY_SIZE(card_widgets), + .dapm_routes = card_routes, + .num_dapm_routes = ARRAY_SIZE(card_routes), .fully_routed = true, - .suspend_pre = broadwell_suspend, - .resume_post = broadwell_resume, + .suspend_pre = card_suspend_pre, + .resume_post = card_resume_post, }; -static int broadwell_audio_probe(struct platform_device *pdev) +static int bdw_rt286_probe(struct platform_device *pdev) { struct snd_soc_acpi_mach *mach; int ret; - broadwell_rt286.dev = &pdev->dev; + bdw_rt286_card.dev = &pdev->dev; /* override platform name, if required */ mach = pdev->dev.platform_data; - ret = snd_soc_fixup_dai_links_platform_name(&broadwell_rt286, + ret = snd_soc_fixup_dai_links_platform_name(&bdw_rt286_card, mach->mach_params.platform); if (ret) return ret; /* set card and driver name */ if (snd_soc_acpi_sof_parent(&pdev->dev)) { - broadwell_rt286.name = SOF_CARD_NAME; - broadwell_rt286.driver_name = SOF_DRIVER_NAME; + bdw_rt286_card.name = SOF_CARD_NAME; + bdw_rt286_card.driver_name = SOF_DRIVER_NAME; } else { - broadwell_rt286.name = CARD_NAME; - broadwell_rt286.driver_name = DRIVER_NAME; + bdw_rt286_card.name = CARD_NAME; + bdw_rt286_card.driver_name = DRIVER_NAME; } - return devm_snd_soc_register_card(&pdev->dev, &broadwell_rt286); + return devm_snd_soc_register_card(&pdev->dev, &bdw_rt286_card); } -static int broadwell_audio_remove(struct platform_device *pdev) +static int bdw_rt286_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); @@ -320,16 +320,16 @@ static int broadwell_audio_remove(struct platform_device *pdev) return 0; } -static struct platform_driver broadwell_audio = { - .probe = broadwell_audio_probe, - .remove = broadwell_audio_remove, +static struct platform_driver bdw_rt286_driver = { + .probe = bdw_rt286_probe, + .remove = bdw_rt286_remove, .driver = { .name = "broadwell-audio", .pm = &snd_soc_pm_ops }, }; -module_platform_driver(broadwell_audio) +module_platform_driver(bdw_rt286_driver) /* Module information */ MODULE_AUTHOR("Liam Girdwood, Xingchao Wang"); From patchwork Fri Jun 10 12:36:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 580643 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 A1F13C43334 for ; Fri, 10 Jun 2022 12:29: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 D32EB1ED8; Fri, 10 Jun 2022 14:28:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D32EB1ED8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1654864142; bh=oLw62bFRVUSpkqb9Dtxj1cVu/Jz+bpKq6ce1rwnr6/0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=diLfQbXI6BIad+fPYwhq8Ty7zRCO4j6ZiTYiEFZhbL6Vab37LBetS0NXA1b8ggR1p dWs5YF7BjeIlnaZIssSOP2sUPtE3Mpru3kUDpxAn+pzpBlIlLTv6o8CsXdtLKBcYrS 6U6nGLSQRERCLXrm1hym+9ZG9MDpT4+TPh0Nq56E= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id CC82DF80558; Fri, 10 Jun 2022 14:26:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6E7F7F8053D; Fri, 10 Jun 2022 14:26:32 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7E395F804D8 for ; Fri, 10 Jun 2022 14:26:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7E395F804D8 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="T/RLTibn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654863990; x=1686399990; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oLw62bFRVUSpkqb9Dtxj1cVu/Jz+bpKq6ce1rwnr6/0=; b=T/RLTibnRhlHdPzZvAWFxK4hUcheLhuk59l2kwH+hCBr8pLWko4UNLBN kt29jQmrbHa4IbXT3HXmfo+LlBo9Cua7bGIXBdKmkR56tKi3zmgtm600R U0qXW9epY3ycV96CFsgWHWAj8/auwv+pI2nm+nM++yihsTz64zVDhdruB 7jUyVVEXUFUXO5rjnhuPYIFGWi56lZTciDJeFvcF1ch0djOfsNGe5/KO+ 1OuqsrQNvWNtwUGvt7DrzwbtfxhpFgS35upukXtGK9wPU6bhVZOBNZKmj wtuFWHvlxth0F4sMFe7gYecgFHSHXVDWpzSZbBde5dQ28CvvjK8JTjH9T A==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="278414460" X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="278414460" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 05:26:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="684517914" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga002.fm.intel.com with ESMTP; 10 Jun 2022 05:26:26 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 10/17] ASoC: Intel: bdw_rt286: Reword driver name Date: Fri, 10 Jun 2022 14:36:20 +0200 Message-Id: <20220610123627.1339985-11-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610123627.1339985-1-cezary.rojewski@intel.com> References: <20220610123627.1339985-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 092bc9a45548..0e67741aea79 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 Fri Jun 10 12:36:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 580640 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 2DF8AC43334 for ; Fri, 10 Jun 2022 12:30:45 +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 4B3751E7C; Fri, 10 Jun 2022 14:29:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4B3751E7C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1654864243; bh=3MH/rR37WDhB/lUIYLU4IB4XrHdaAlrvhFP9VPgxti0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HYIdSrXodJJg+TwcRVKvDPS2ynWA/EeWeFTmrarWV2KC5frxnq460dKk8O9a4XtrL nVm9jgU1hs/DCr1mOzDXz5o6q/VgmBxZNiO6dkOjIEKb65ajrnk7uFa5Tr7apDJF6R exKCBidE5ifPjhAIKbbdc9HY4NPrjA2d+qgonfgk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 977CCF805A8; Fri, 10 Jun 2022 14:26:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 870C5F8059F; Fri, 10 Jun 2022 14:26:41 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EF448F80553 for ; Fri, 10 Jun 2022 14:26:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EF448F80553 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VH+MkaYQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654863996; x=1686399996; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3MH/rR37WDhB/lUIYLU4IB4XrHdaAlrvhFP9VPgxti0=; b=VH+MkaYQI2MzsbXnhC1IarjJMpFusr+Voj/Q9wwcfcip45/vH4KVXIXo qa4ykMEA9YjUFQtaqz/sUfkj1omGbaqxrTGHm6zUyMgkt8bIjdGOA2z09 hlFOXG7BonxcVHByJmytR01oc6GCaYUQdXdYWBDpiSM8ibtY2C+ALRCIO D3q0WRqfLabjtDkxFf6aW5BWYPE2AQkh+7VIoY9F68eqGNdWdNLTcxFng O4MAMoyY5EhrwEFdt0p5tXmidCNf0Kpn44SLw3rPtWANGMHCWJPAeLNJ2 7zA1H+Q/+F0XD+qVrX/2EX/OB6QSjqlrR/HVnem3ALy4OS65h1Ok+0y9c A==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="278414476" X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="278414476" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 05:26:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="684517936" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga002.fm.intel.com with ESMTP; 10 Jun 2022 05:26:32 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 13/17] ASoC: Intel: bdw_rt286: Improve probe() function quality Date: Fri, 10 Jun 2022 14:36:23 +0200 Message-Id: <20220610123627.1339985-14-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610123627.1339985-1-cezary.rojewski@intel.com> References: <20220610123627.1339985-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 51b37dafb469..d401b2c85b20 100644 --- a/sound/soc/intel/boards/bdw_rt286.c +++ b/sound/soc/intel/boards/bdw_rt286.c @@ -235,13 +235,6 @@ static int card_resume_post(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 = card_resume_post, }; +/* 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 Fri Jun 10 12:36:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 580641 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 EBE43C433EF for ; Fri, 10 Jun 2022 12:30:13 +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 36D101ED9; Fri, 10 Jun 2022 14:29:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 36D101ED9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1654864212; bh=rSZxPEtqkGgpYMB/XsOi274ItDObbjO3MN7YNIRwdhE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BwlAUustXE6xFIMo0kXBLjXJ5wOEgSsbt93hAZhaixfaP8Zuvq0EJYxczcVuUIlbq tzp1LbzcLFWUYM84u0EOJMGkjQ2S+rR1kb7LaabWJZ11kIuXV1UvtjyNwa81G83Cnn HnnW/xr2o6D12Y6BmG+dnrLjujFSzfW1ZeH9SsTU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6FC10F80588; Fri, 10 Jun 2022 14:26:41 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D07C8F8057C; Fri, 10 Jun 2022 14:26:39 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C513EF8055C for ; Fri, 10 Jun 2022 14:26:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C513EF8055C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Abw5+9jD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654863998; x=1686399998; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rSZxPEtqkGgpYMB/XsOi274ItDObbjO3MN7YNIRwdhE=; b=Abw5+9jDhsF7OCw3EqMJJACBNkSonw1NQcteA5BdTKkjKNBkMNqg/0W2 DagUdzHsdp5Le1P+dBzFip3AeWcn1wF8ank+A93bW9jpn6R5QYX9i+bev Fuo/O6YWJSvpzKtd/r04tj4SF8NNbvwTrtibsRBZKSn2w6kaSgF6Je6ub koN6UBcjIftGXWpcre2Z5lwhyjJaeGLyg24BwnvPRahsSDr/WuHDVSZIb PUtESEFpu/FkutRqMCxrczdHE9KuDRKBgC0P1lRp+m0WVSt7kgQKIA0q1 L+OGS+HxReaRcORtyKbLlUrLAj9OLxj6Dr7kG2JnhZLqXEPNxGN4Neepa w==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="278414482" X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="278414482" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 05:26:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="684517941" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga002.fm.intel.com with ESMTP; 10 Jun 2022 05:26:34 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 14/17] ASoC: Intel: bdw_rt286: Improve hw_params() debug-ability Date: Fri, 10 Jun 2022 14:36:24 +0200 Message-Id: <20220610123627.1339985-15-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610123627.1339985-1-cezary.rojewski@intel.com> References: <20220610123627.1339985-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/bdw_rt286.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/bdw_rt286.c b/sound/soc/intel/boards/bdw_rt286.c index d401b2c85b20..e173546b68cc 100644 --- a/sound/soc/intel/boards/bdw_rt286.c +++ b/sound/soc/intel/boards/bdw_rt286.c @@ -98,7 +98,7 @@ static int codec_link_hw_params(struct snd_pcm_substream *substream, 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"); + dev_err(rtd->dev, "set codec sysclk failed: %d\n", ret); return ret; } From patchwork Fri Jun 10 12:36:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 580639 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 D8D8AC433EF for ; Fri, 10 Jun 2022 12:31:12 +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 23D311F19; Fri, 10 Jun 2022 14:30:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 23D311F19 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1654864271; bh=MnA/zvLOHXOwPxUeE7yEGW4hRg5u/uyCNgxQJp5Kx0Y=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=lLhjbniQw5mwVAxZDXS3KL1YeP0PIT28qv/AUDuZ3RypuEsfsxs7OVsYJe3woAIGq KiOfdB0Yn08SM2IRuIKchj9QiKRDMNJf/ed7tybM+XhkvwkHu5l1bmxnE85Q1MhUfe dCwc5MLFZVX9P78FkjzZnJqhBos8sMHtgmKZWadk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A11CEF805B5; Fri, 10 Jun 2022 14:26:46 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8F9ADF805B2; Fri, 10 Jun 2022 14:26:45 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CE893F805AE for ; Fri, 10 Jun 2022 14:26:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CE893F805AE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="a9faCpIx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654864004; x=1686400004; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MnA/zvLOHXOwPxUeE7yEGW4hRg5u/uyCNgxQJp5Kx0Y=; b=a9faCpIxIaeAJvmZ4wmpaxaICpWoNdstJx0/CII+dmEyrpTEqfP9YktE E+7peUrXRuBF9cvyu3tVYqbgOS7HZZZkhEPYTkotG1XI1FN/5geQZPBVO QJRhBAfI9uUgC+fwmW225s5WxfzLXEVOEpG9TFcpt2Yn+BjDa12ASxRW9 jkFxUnQ/QUe3CKX33wbs6PkjE302rwG0T9rF+QE+rORovmieBoC/TApC2 IgIbJX9oavIuvCejUgabywL52lh0v8aTYKZDG50/xAoAyHfH7Gxqy5bJB OFfToHBM0iP2Lxz+Bf+6sgtspeoPjRhzr3s/grFMdPjpDDeto2Clde0kt A==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="278414500" X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="278414500" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 05:26:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="684517965" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga002.fm.intel.com with ESMTP; 10 Jun 2022 05:26:40 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 17/17] ASoC: Intel: bdw_rt286: Remove FE DAI ops Date: Fri, 10 Jun 2022 14:36:27 +0200 Message-Id: <20220610123627.1339985-18-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610123627.1339985-1-cezary.rojewski@intel.com> References: <20220610123627.1339985-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 FE DAIs 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 a2ff4da0bb93..7d34e5002558 100644 --- a/sound/soc/intel/boards/bdw_rt286.c +++ b/sound/soc/intel/boards/bdw_rt286.c @@ -108,30 +108,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"))); @@ -150,7 +126,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),