From patchwork Sat Jun 15 17:53:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13699352 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 96D01C27C4F for ; Sat, 15 Jun 2024 17:53:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E064210E157; Sat, 15 Jun 2024 17:53:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="tFncK3jP"; dkim-atps=neutral Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by gabe.freedesktop.org (Postfix) with ESMTPS id AD63D10E033 for ; Sat, 15 Jun 2024 17:53:37 +0000 (UTC) Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2ebd95f136bso34785121fa.0 for ; Sat, 15 Jun 2024 10:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718474016; x=1719078816; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RSmIEAIcnC5msdB38vTdYnwra4YbtdBczjpwQBiMsUo=; b=tFncK3jP6GMqzTanfCKas6NyvrXuIoX5GsWr3xjmRoabDSx3M/3TRjZ/EWYUC/NBfi 1fcC/a7jVpRSt134mRxD8XvkYFduRAVikrgcjiWtr+gCbfeuPJaL5IqrSEorqVbrS5Kc sZUpny5IxbfZL5sszrVSrt8gcJVPoHbLxrIniHWGAyCW+fJ6aEpYqmAIRxhx+4byh5Ph 1Jm5WGuZCxumtYky309dzV/Tume3WYVdNJMWD68WpJ9+RadZRHquyeD2mQsMbjBjZA6Y 6SC6D7iYt+UwHiwyWQGu+pyv+Cc+O1Tiw7de7cRL0ndpdAXDB6fieDcQDZ51ax7BRqcO /5PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718474016; x=1719078816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RSmIEAIcnC5msdB38vTdYnwra4YbtdBczjpwQBiMsUo=; b=Q75M9Iq9zA5EPtIdoHjmtMdVsklCGXtH6kC9yewXDyUtgGkG1OsVZCODdgQYItAmm3 whCvS41J+iuvD9/k8CrWmmSiUiTnr5bxNXbcLPA++rJ+wRh/lI+TnJ/nlLnZfULwi3bx MVQh4T94KtfnOsacw23npZVhwnxMMHRIr4OOQJtPBLPGF2sU356+Cg3zOgB/7MzFGbRM iDZIDiPBYtICkdLqYWwyyKaho/5A3J+Qj8KIcOcdcZZiFkI40oeUiXThTvQSglFLur5Q N01pAbTNpyhutdHePhAyOM59d4vYh4zcOmOApEr9RmoQSEquhME6efb0+p6CCbiFNJhd +AKA== X-Gm-Message-State: AOJu0YwFh+TV1LLiaUs30wCzdfw4fRF8DyTTIqzllJn7V/kzZNFDrdmi x3XcfeFrfZP34Nit6MwwfeiJdDZ6ZXBfdW49y43fMszNmx3Q0CzHgWwubvAR/w0= X-Google-Smtp-Source: AGHT+IFFYHgBPLlADC7SeWWeSUbYhyXls9nx5aYDUbEVtXba3FK5dU/UdVl0LGd0s9vqqrTQ+6kMww== X-Received: by 2002:ac2:4d84:0:b0:52c:859f:f4f0 with SMTP id 2adb3069b0e04-52ca6e55b9dmr3329487e87.1.1718474015617; Sat, 15 Jun 2024 10:53:35 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52ca287affcsm799209e87.232.2024.06.15.10.53.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 10:53:35 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 15 Jun 2024 20:53:31 +0300 Subject: [PATCH RFC 2/5] ASoC: hdmi-codec: pass data to get_dai_id too MIME-Version: 1.0 Message-Id: <20240615-drm-bridge-hdmi-connector-v1-2-d59fc7865ab2@linaro.org> References: <20240615-drm-bridge-hdmi-connector-v1-0-d59fc7865ab2@linaro.org> In-Reply-To: <20240615-drm-bridge-hdmi-connector-v1-0-d59fc7865ab2@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5201; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=pn2geVII/7Eo49RZTSaWQ/BY5SCV/YSpXIUmvyJMH0Y=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmbdUcJ8IWkUmCcVBgeC3Vg+4kMPVLklqkCSo8t dwBDiKMur6JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZm3VHAAKCRCLPIo+Aiko 1TujB/9qMk4FvPARfIqiMMGapz1hICXprHpD56e2wjfXzSdlFR1jrjFrv6a9LcgotCtgzcV2MpJ ftnGmikXtNHqYanoz+ECPMv7dQSvXoJ7tjsQ8TuqMgbKXMlyZWHsjPSjeoJ7rVT9BK4VZ6X9uBE EvDhcHjkpNi9govajrxDXoeeHtyaapmizdRwSNHrVyC6Fdl3YS4gps7Fn2ig8b88Z4vKNSHL9ZF HEXHBUGPyqwQf5ikQPo3+Ceb1S9QCYCPmkEUdSWD98XX1mWWNlej5C7RMckzPk5rx87fdeVv5W0 Vs04wHXP3k8ekcQE5RW1sst75DpC5YGVc01V/SW2yawCH5ju X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The upcoming DRM connector HDMI codec implementation is going to use codec-specific data in the .get_dai_id to get drm_connector. Pass data to the callback, as it is done with other hdmi_codec_ops callbacks. Signed-off-by: Dmitry Baryshkov Acked-by: Mark Brown --- drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 3 ++- drivers/gpu/drm/bridge/analogix/anx7625.c | 3 ++- drivers/gpu/drm/bridge/lontium-lt9611.c | 3 ++- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 3 ++- drivers/gpu/drm/bridge/sii902x.c | 3 ++- drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 3 ++- include/sound/hdmi-codec.h | 3 ++- sound/soc/codecs/hdmi-codec.c | 2 +- 8 files changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c index 61f4a38e7d2b..51fb9a574b4e 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c @@ -204,7 +204,8 @@ static void audio_shutdown(struct device *dev, void *data) } static int adv7511_hdmi_i2s_get_dai_id(struct snd_soc_component *component, - struct device_node *endpoint) + struct device_node *endpoint, + void *data) { struct of_endpoint of_ep; int ret; diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index 88e4aa5830f3..f18cf79a292b 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -1962,7 +1962,8 @@ static void anx7625_audio_shutdown(struct device *dev, void *data) } static int anx7625_hdmi_i2s_get_dai_id(struct snd_soc_component *component, - struct device_node *endpoint) + struct device_node *endpoint, + void *data) { struct of_endpoint of_ep; int ret; diff --git a/drivers/gpu/drm/bridge/lontium-lt9611.c b/drivers/gpu/drm/bridge/lontium-lt9611.c index 1b31fdebe164..4fa0dfc5539a 100644 --- a/drivers/gpu/drm/bridge/lontium-lt9611.c +++ b/drivers/gpu/drm/bridge/lontium-lt9611.c @@ -1059,7 +1059,8 @@ static void lt9611_audio_shutdown(struct device *dev, void *data) } static int lt9611_hdmi_i2s_get_dai_id(struct snd_soc_component *component, - struct device_node *endpoint) + struct device_node *endpoint, + void *data) { struct of_endpoint of_ep; int ret; diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c index 4e802b54a1cb..54c528fa168e 100644 --- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c +++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c @@ -601,7 +601,8 @@ static void lt9611uxc_audio_shutdown(struct device *dev, void *data) } static int lt9611uxc_hdmi_i2s_get_dai_id(struct snd_soc_component *component, - struct device_node *endpoint) + struct device_node *endpoint, + void *data) { struct of_endpoint of_ep; int ret; diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c index 7f91b0db161e..1883df5fd5c1 100644 --- a/drivers/gpu/drm/bridge/sii902x.c +++ b/drivers/gpu/drm/bridge/sii902x.c @@ -798,7 +798,8 @@ static int sii902x_audio_get_eld(struct device *dev, void *data, } static int sii902x_audio_get_dai_id(struct snd_soc_component *component, - struct device_node *endpoint) + struct device_node *endpoint, + void *data) { struct of_endpoint of_ep; int ret; diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c index 26c187d20d97..86c412e9cbc8 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c @@ -148,7 +148,8 @@ static int dw_hdmi_i2s_get_eld(struct device *dev, void *data, uint8_t *buf, } static int dw_hdmi_i2s_get_dai_id(struct snd_soc_component *component, - struct device_node *endpoint) + struct device_node *endpoint, + void *data) { struct of_endpoint of_ep; int ret; diff --git a/include/sound/hdmi-codec.h b/include/sound/hdmi-codec.h index 5e1a9eafd10f..b3407b47b4a7 100644 --- a/include/sound/hdmi-codec.h +++ b/include/sound/hdmi-codec.h @@ -105,7 +105,8 @@ struct hdmi_codec_ops { * Optional */ int (*get_dai_id)(struct snd_soc_component *comment, - struct device_node *endpoint); + struct device_node *endpoint, + void *data); /* * Hook callback function to handle connector plug event. diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index d3abb7ce2153..afad402122cb 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -981,7 +981,7 @@ static int hdmi_of_xlate_dai_id(struct snd_soc_component *component, int ret = -ENOTSUPP; /* see snd_soc_get_dai_id() */ if (hcp->hcd.ops->get_dai_id) - ret = hcp->hcd.ops->get_dai_id(component, endpoint); + ret = hcp->hcd.ops->get_dai_id(component, endpoint, hcp->hcd.data); return ret; }