From patchwork Tue Nov 14 20:13:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 743806 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 AD50FC54E5B for ; Tue, 14 Nov 2023 20:13:33 +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 425F4852; Tue, 14 Nov 2023 21:12:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 425F4852 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1699992811; bh=GA8VlHDMdmcVDZ3lRaKAia5d6PdwAqVOFHsMlwEcNgs=; 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=kxEAhIqSOzJy05iXmOpekB7IdTQ9EqOJR9q8yaYGGbBZ7qZNchdWBOX4U4Xs2vTCa DgTQd3y41M+J5kgKOduqJorlzeEZLnHnVLehNX9Sz0yb1cAPGHiDEFJAQvNb08xbrD GO9TwGTkdPzmSip+M/tx99yynyqp/3KkgBOJxyI4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9868DF805B5; Tue, 14 Nov 2023 21:11:55 +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 E673AF801D5; Tue, 14 Nov 2023 21:11:54 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B6660F8057C; Tue, 14 Nov 2023 21:11: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 D9B19F80549 for ; Tue, 14 Nov 2023 21:11:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D9B19F80549 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=AzNpbnRK DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699992694; x=1731528694; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GA8VlHDMdmcVDZ3lRaKAia5d6PdwAqVOFHsMlwEcNgs=; b=AzNpbnRKJnvH9QCY9fKUMaDQOW5qSRl5S+GisdFGYv4fou7jdnbzc/ls JAPNwy9TK0kEc6/Q6PcHxLh2TzI4j9ssFYZsbTpjv/yXcAFobBHouspBt WyUC1FYbFnwMEPCFAGvDK6uR8SEUcjWlIvrmN46RC/RTq/Ioa6iB5ZhL1 Q2JOAACnkLZ8fi0ZRZTDyR2od7E4MQSx6ruZatYUpiU8KsFqrwz2Hoixs B7Y4acwUZYKJ/BKleH7XU03cxMJD466LhZubWJVocPfVznShgzd+c4eAJ sDGvrHG4V29ln5BqlWGEloS5nlOLJp5MRU9AN1PtXrnZTMbOzLOQutd9q w==; X-IronPort-AV: E=McAfee;i="6600,9927,10894"; a="381134680" X-IronPort-AV: E=Sophos;i="6.03,302,1694761200"; d="scan'208";a="381134680" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2023 12:11:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10894"; a="855422410" X-IronPort-AV: E=Sophos;i="6.03,302,1694761200"; d="scan'208";a="855422410" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by FMSMGA003.fm.intel.com with ESMTP; 14 Nov 2023 12:11:28 -0800 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, linux-sound@vger.kernel.org, Cezary Rojewski Subject: [PATCH v3 06/16] ALSA: hda/hdmi: Switch to new stream-format interface Date: Tue, 14 Nov 2023 21:13:07 +0100 Message-Id: <20231114201317.1348066-7-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231114201317.1348066-1-cezary.rojewski@intel.com> References: <20231114201317.1348066-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Message-ID-Hash: EITNFZIXWFHQICRFKOHQVXIO5IET5XXE X-Message-ID-Hash: EITNFZIXWFHQICRFKOHQVXIO5IET5XXE 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_hdmi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 687b8b8fd7ac..dff2d7221982 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1655,7 +1655,6 @@ static void hdmi_present_sense_via_verbs(struct hdmi_spec_per_pin *per_pin, #define I915_SILENT_RATE 48000 #define I915_SILENT_CHANNELS 2 -#define I915_SILENT_FORMAT SNDRV_PCM_FORMAT_S16_LE #define I915_SILENT_FORMAT_BITS 16 #define I915_SILENT_FMT_MASK 0xf @@ -1668,8 +1667,8 @@ static void silent_stream_enable_i915(struct hda_codec *codec, per_pin->dev_id, I915_SILENT_RATE); /* trigger silent stream generation in hw */ - format = snd_hdac_calc_stream_format(I915_SILENT_RATE, I915_SILENT_CHANNELS, - I915_SILENT_FORMAT, I915_SILENT_FORMAT_BITS, 0); + format = snd_hdac_stream_format(I915_SILENT_CHANNELS, I915_SILENT_FORMAT_BITS, + I915_SILENT_RATE); snd_hda_codec_setup_stream(codec, per_pin->cvt_nid, I915_SILENT_FMT_MASK, I915_SILENT_FMT_MASK, format); usleep_range(100, 200);