From patchwork Thu Aug 17 12:50:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Golani, Mitulkumar Ajitkumar" X-Patchwork-Id: 13356412 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 49B07C2FC14 for ; Thu, 17 Aug 2023 12:54:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7FC2A10E46D; Thu, 17 Aug 2023 12:54:28 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id B4FC510E46D for ; Thu, 17 Aug 2023 12:54:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692276866; x=1723812866; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WGi+VDsThebMFTYtYuPVjAO81QBs8/99jWt7uKCLNzQ=; b=Z54Mu1xEZZAP8Ikj4ijgGY+MuiUpsopxyR8dyhfTMe3yqNP1xGIw8J0f 25OJfvRd7m40vTqqy7uEEBWdvpLCLFso1+V8bNIsnHfXtiay+61YoybwT hSnfYvfFPhb78TlpO1rwoRVPuEaCuzLrE0XfhTYvLLp6XCST0MNNrpY7Y AtdOJBQ6lTgquMei6lKZ20O9Ok8PvPqPyVbNPQPZqY7mXzwHQvhAsTY+h MWePYgNd+M68X+lk1wziUNNfBg8S3zQSzoO7MmSXzeJ7h3LumwurH/DmZ rgHDr/fAq7lJdNQmZJTQB2xAoavdElS/RHqZDLhoLTCIUjBlkiJOQQB1H w==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="357762355" X-IronPort-AV: E=Sophos;i="6.01,180,1684825200"; d="scan'208";a="357762355" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2023 05:54:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="769632041" X-IronPort-AV: E=Sophos;i="6.01,180,1684825200"; d="scan'208";a="769632041" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orsmga001.jf.intel.com with ESMTP; 17 Aug 2023 05:54:24 -0700 From: Mitul Golani To: intel-gfx@lists.freedesktop.org Date: Thu, 17 Aug 2023 18:20:04 +0530 Message-Id: <20230817125007.2681331-1-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 0/3] Get optimal audio frequency and channels X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jyri.sarha@linux.intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Currently we do not check if there is enough bandwidth for audio, and what channels and freq it can really support. Also sometimes there can be HW constraints e.g. GLK where audio channels supported are only 2. https://patchwork.freedesktop.org/series/107647/ Obtain the optimal audio rate and channel based on available display timing constraints. This can be achieved by: - Retrieve the supported channel and rate information from SADs - Adding audio-related config parameters in the CRTC state, such as audio support, rate, and channel. - Initializing the audio config parameters with the maximum supported rate and channel by the audio source. - Computing the SADs based on the audio source's capabilities. Signed-off-by: Mitul Golani Mitul Golani (3): drm/i915: Add has_audio to separate audio parameter in crtc_state drm/i915/display: Configure and initialize HDMI audio capabilities drm/i915/display: Add wrapper to Compute SAD drivers/gpu/drm/i915/display/g4x_dp.c | 4 +- drivers/gpu/drm/i915/display/g4x_hdmi.c | 16 +- drivers/gpu/drm/i915/display/intel_audio.c | 149 +++++++++++++++++- drivers/gpu/drm/i915/display/intel_cdclk.c | 6 +- .../drm/i915/display/intel_crtc_state_dump.c | 4 +- drivers/gpu/drm/i915/display/intel_ddi.c | 2 +- drivers/gpu/drm/i915/display/intel_display.c | 4 +- .../drm/i915/display/intel_display_types.h | 12 +- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 10 +- 12 files changed, 181 insertions(+), 32 deletions(-) Reviewed-by: Kai Vehmanen