From patchwork Wed Aug 23 08:05:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13361767 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 B1124EE49A0 for ; Wed, 23 Aug 2023 08:09:49 +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 24B3383E; Wed, 23 Aug 2023 10:08:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 24B3383E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692778188; bh=uFo3JTP2alB99rkg19E443MKdeHnjsbmxR/ux1VI5Z8=; 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=cXHFFzmdrFhfpirQJlLziwtYsUZLY2FdSf2Y9V5rLYkWCh4B13+OCAqS3gFj57ij/ 1B4pdwgAKH1pUfW/QzH8UWF9FD9sYps3EDxCgRyIh7mXiGzLmA47fzE6BIZHSIoFB7 EEuwTAEowt9oyhUXA7yEzoLLxWG/PpFWsN72qylo= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D0B60F805AA; Wed, 23 Aug 2023 10:07:35 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6C641F805A0; Wed, 23 Aug 2023 10:07:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D2BC9F804DA; Wed, 23 Aug 2023 10:06:27 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) (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 B7F58F800D1 for ; Wed, 23 Aug 2023 10:06:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B7F58F800D1 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=BPjEDpnm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692777984; x=1724313984; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uFo3JTP2alB99rkg19E443MKdeHnjsbmxR/ux1VI5Z8=; b=BPjEDpnm1SGB5NDefzxo90jonhGIKcFTKOSO66M0Hx0wJD0OYww5uLva rDk3lyL1JUHgIDqeegSirIaUrtz7/7ivPA1oDwel7fiV6CxfjknF6fzFi O/yZ8jYDBPZvntlu269kLnnTuUswX9L4YvvyBc9Mnqxp4OvTYdNKk3odc FpPGqpolBJwTGTzsQ1n5eiCAt9+489GyiKkN0CWAiK3qtI1tJH7Xxr7Wx +EckhIluvGe42tTd3UoHXsrNnIJiJb4bDnSgFFUh+bO+jCXvWBO5Iu3eh qT27mmIo+4AYtUn7hRsvLyTQqT85t6N4ATS6HfsxxTG/6YdKDtr+C62Qh A==; X-IronPort-AV: E=McAfee;i="6600,9927,10810"; a="372988083" X-IronPort-AV: E=Sophos;i="6.01,195,1684825200"; d="scan'208";a="372988083" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2023 01:06:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10810"; a="766042718" X-IronPort-AV: E=Sophos;i="6.01,195,1684825200"; d="scan'208";a="766042718" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by orsmga008.jf.intel.com with ESMTP; 23 Aug 2023 01:06:20 -0700 From: Cezary Rojewski To: broonie@kernel.org, tiwai@suse.com, perex@perex.cz Cc: alsa-devel@alsa-project.org, amadeuszx.slawinski@linux.intel.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, Cezary Rojewski Subject: [PATCH 08/17] ALSA: hda/ca0132: Switch to new stream-format interface Date: Wed, 23 Aug 2023 10:05:37 +0200 Message-Id: <20230823080546.2224713-9-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230823080546.2224713-1-cezary.rojewski@intel.com> References: <20230823080546.2224713-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Message-ID-Hash: DYLIF24OXMMTXFIJTBMVBHPU6IOL2D4D X-Message-ID-Hash: DYLIF24OXMMTXFIJTBMVBHPU6IOL2D4D 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. 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;