From patchwork Fri Nov 17 12:06:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 744919 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 AFF50C072A2 for ; Fri, 17 Nov 2023 12:06:32 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EF3C8DF0; Fri, 17 Nov 2023 13:05:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EF3C8DF0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1700222791; bh=e/MRhjR0kzflry7uFf3SrUDC5vM1n+xeCA0SNUy3hoU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gWsYFY+FiSEvi3XdQEp7zBzQSl/E51s1I9Upoa9JHJ/5zyf3yAVgXoLik735ABsYh JpvC9dCOUiPbxyKzr2pzZvmcxi9sVqTLxXydjrNYmPkjLBoYzGaUaKHLvMkFL84zUY sHCFIT30tjvqGclJncsY+JypwkFjj4/r5nUjpuEI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6F25DF805A8; Fri, 17 Nov 2023 13:04:57 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 85E0BF805A9; Fri, 17 Nov 2023 13:04:56 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E9155F8057D; Fri, 17 Nov 2023 13:04:48 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) (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 D0921F80549 for ; Fri, 17 Nov 2023 13:04:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D0921F80549 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=dW4Wnm7C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700222663; x=1731758663; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=e/MRhjR0kzflry7uFf3SrUDC5vM1n+xeCA0SNUy3hoU=; b=dW4Wnm7C6xQUp1kExCcwWgbPkDv8TUcmjdStIVzUf45ZXMEXx2KaPLJK j0K7m2g7s9trIDyOhf5vUirIR+o9OwHUJwjTPrc8oEeyR43ELMdYIExiy yNoKFCVHjpcozD8CU56GjsIeEhvnqbi2db7nDZBHeuCWmjtTiAzqKznz6 bE/djFDFJOEpAlXF1vjBw04tap61bQNC9MsVhmqcLundgyR6x+ebdaVXG I56954PGu2PgE+SRy5Zpmmli+HdXZ3jliLmCOxz6dPMa741jDXCqKxuHF jBvqKwnAgbG0dpEeQmRGBW1osTpen9SIM/Jk5spwgiLggkKGHY2MFsD8+ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10896"; a="381675242" X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="381675242" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2023 04:04:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10896"; a="883110183" X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="883110183" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga002.fm.intel.com with ESMTP; 17 Nov 2023 04:04:16 -0800 From: Cezary Rojewski To: broonie@kernel.org, tiwai@suse.com, perex@perex.cz Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, amadeuszx.slawinski@linux.intel.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, Cezary Rojewski Subject: [PATCH v5 07/16] ALSA: hda/ca0132: Switch to new stream-format interface Date: Fri, 17 Nov 2023 13:06:01 +0100 Message-Id: <20231117120610.1755254-8-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231117120610.1755254-1-cezary.rojewski@intel.com> References: <20231117120610.1755254-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Message-ID-Hash: TPI3ATUJDIWMMYYMP4RK2SC2HPLNBPCG X-Message-ID-Hash: TPI3ATUJDIWMMYYMP4RK2SC2HPLNBPCG X-MailFrom: cezary.rojewski@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: To provide option for selecting different bit-per-sample than just the maximum one, use the new format calculation mechanism. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski --- sound/pci/hda/patch_ca0132.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 748a3c40966e..aa312441604f 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -3022,8 +3022,7 @@ static int dma_convert_to_hda_format(struct hda_codec *codec, { unsigned int format_val; - format_val = snd_hdac_calc_stream_format(sample_rate, - channels, SNDRV_PCM_FORMAT_S32_LE, 32, 0); + format_val = snd_hdac_stream_format(channels, 32, sample_rate); if (hda_format) *hda_format = (unsigned short)format_val;