From patchwork Fri Aug 11 16:48:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 712641 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 2651BC04FE0 for ; Fri, 11 Aug 2023 16:52:27 +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 40ED5852; Fri, 11 Aug 2023 18:51:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 40ED5852 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1691772745; bh=JdKLsQi1ULlIUDoi6maAqz1hmqsZSN/+fzM0NCKtNow=; 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=YMtah5NqHaFJtS+Oa2IEbB0ow/e0FN6cozlbrHfdWNyynskhZwMv3DAy0P9Yp4yUm Wh4mkmE3S+46LCnLDD3+yq87iVVYCLs1X/Z+q1b9FwiWdn85om+tL+pHJ5w7W1IuaZ 0sumemM/349Ufki6xH7n56gdnP9E6fAUA8fZVrMc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4A194F805D5; Fri, 11 Aug 2023 18:49:57 +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 6AC7BF80552; Fri, 11 Aug 2023 18:49:56 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 95A2AF805AF; Fri, 11 Aug 2023 18:49:47 +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 B7966F80588 for ; Fri, 11 Aug 2023 18:49:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B7966F80588 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=GSVY7DXL DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691772585; x=1723308585; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JdKLsQi1ULlIUDoi6maAqz1hmqsZSN/+fzM0NCKtNow=; b=GSVY7DXLnelyEugIBgY0+3QeN7nvl+82i2iGnuCkULqdvEgNnaEKcRul QTl+t7mT8xFL8kgyS7xCzZMDVj6+rKgS0QwusgiByzq8aAjVf5jHH525J MGQTDCOw7D53iZYv307ER9uNw8y6fWHU+GbBAD4qnB6u0Ua7rBTbvKjbT /vEgsogjit1dYWue1aCf6+1Jgs8JJvYtB0As9qnzyfwTaLvbcZa9mqIhi woe5cqBOS4MnHan1n75w3CZT7xuC7dOwRSUGjttNG5RWEUQX4QY2jH8oX Ql0pwZoTcEBIou/wr+2YNIpOp6soSsARrNkBOp04XpHJWNta76bdb1fmz Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10799"; a="371725080" X-IronPort-AV: E=Sophos;i="6.01,166,1684825200"; d="scan'208";a="371725080" 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:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10799"; a="846842792" X-IronPort-AV: E=Sophos;i="6.01,166,1684825200"; d="scan'208";a="846842792" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga002.fm.intel.com with ESMTP; 11 Aug 2023 09:49:22 -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 07/17] ALSA: hda/hdmi: Switch to new stream-format interface Date: Fri, 11 Aug 2023 18:48:43 +0200 Message-Id: <20230811164853.1797547-8-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: A5RSKSR4IHP6U2XRIXAATQDIPDYLOMT5 X-Message-ID-Hash: A5RSKSR4IHP6U2XRIXAATQDIPDYLOMT5 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 49e9fe09ce88..d6818221427c 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);