From patchwork Fri Aug 11 16:48:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13351187 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 B6E2FC001B0 for ; Fri, 11 Aug 2023 16:55:06 +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 7F411DEC; Fri, 11 Aug 2023 18:54:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7F411DEC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1691772904; bh=wdFwJawnGoItWsxPffqAC1gJDoZhyMZ6GOPTW+ktoKU=; 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=n0PDK65IBmCcI+4N+1LW6gUFbrQIA+CGp9ydsv2ov1/O9YOxPz/0JDZYfX50AgsSk PP/6x4yMrFLvfRX/d4kWbpUzZGImr3tSLwsSs5yD7F0R+sOuqZmEiu0d5tIRE2d86P WJ+XzonQt7X4s1pTuD5z2qUcjIpU7RtVnqKZNP1A= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3B0A1F80571; Fri, 11 Aug 2023 18:50:54 +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 95084F80570; Fri, 11 Aug 2023 18:50:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 825F1F8016E; Fri, 11 Aug 2023 18:50:48 +0200 (CEST) Received: from mgamail.intel.com (mgamail.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 B7ABEF805AD for ; Fri, 11 Aug 2023 18:49:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B7ABEF805AD 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=ZuJtwTnr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691772586; x=1723308586; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wdFwJawnGoItWsxPffqAC1gJDoZhyMZ6GOPTW+ktoKU=; b=ZuJtwTnrpBJ8FogRSLiIWN2pW0q/c+lqHORQPpPG+uuNQMtKpkJOWQO8 vbvGQeUlEGT1bEsY5sosJOIVIjNHdMQGj6zC1n6BycYXUOovwB8Yj81v4 O+/Lh67CQk/J/XdioLNYr2NKhYDCrIrjDUDpNJ4GgOfUQWKWRtbia3+do an/RqFQ8pbIpBVkK0ooOAI0fuL0dLA6aBeywAFK8bwiUaQwlIKjtCzzfJ LxAfAASb5XizGN1NAUZtK5scwILHtHmOkqPC791IAjOoU20MWXyoCn7ud Q/iUWzpHOPLS/pkXExO3X8c3PdVHqls3OndKWvAtaMOL32u0iq6uJp/Yr w==; X-IronPort-AV: E=McAfee;i="6600,9927,10799"; a="371725087" X-IronPort-AV: E=Sophos;i="6.01,166,1684825200"; d="scan'208";a="371725087" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 09:49:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10799"; a="846842796" X-IronPort-AV: E=Sophos;i="6.01,166,1684825200"; d="scan'208";a="846842796" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga002.fm.intel.com with ESMTP; 11 Aug 2023 09:49:24 -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: [RFC PATCH 08/17] ALSA: hda/ca0132: Switch to new stream-format interface Date: Fri, 11 Aug 2023 18:48:44 +0200 Message-Id: <20230811164853.1797547-9-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230811164853.1797547-1-cezary.rojewski@intel.com> References: <20230811164853.1797547-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Message-ID-Hash: CR2MJBFSCGGDR34X2SQENDQZJMPAT7JY X-Message-ID-Hash: CR2MJBFSCGGDR34X2SQENDQZJMPAT7JY 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 099722ebaed8..faefbcceb5ed 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -3021,8 +3021,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;