From mboxrd@z Thu Jan 1 00:00:00 1970 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 2424DC4345F for ; Tue, 23 Apr 2024 11:45:17 +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 20884162D; Tue, 23 Apr 2024 13:45:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 20884162D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1713872715; bh=qpvfUNzdiSw3PwDeKZ/yg/FJx0XxI/U3wt8Hpfs5xQk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=OnjAyzONJx00j6uVKU5Lctf5H/7aNYHRM4ccfw2YdFv3ITzg4OG9tALx5Oy3pMN5H rGhc05bRmKQoPjx4jcjCCF68pwK/5zxJeQcjti4z9Q5owpMPSKfc5R5tNqPlghlhqc OA0VJqhAoLrN3D/yYDxLmxVWayJd34iVj2wEL0FU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8792AF80588; Tue, 23 Apr 2024 13:44:43 +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 2C6C1F80423; Tue, 23 Apr 2024 13:44:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4B210F80423; Tue, 23 Apr 2024 13:44:37 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id ED441F801C0 for ; Tue, 23 Apr 2024 13:44:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ED441F801C0 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=QpNvhbis Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id BD060611DB; Tue, 23 Apr 2024 11:44:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6064DC116B1; Tue, 23 Apr 2024 11:44:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713872664; bh=qpvfUNzdiSw3PwDeKZ/yg/FJx0XxI/U3wt8Hpfs5xQk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QpNvhbisLI4AoWrmVir/ATpl7NxglXF6cVVihy0Fwq2p6ViLz1O72IOi0y8A5UKzC 0ZsIUWwx/hw+GEad/HA5JMn8rkJ2Iky0yY66yNjrNaNMvip09Yl+JerBVv7NUbCK2F Z7UgJT+sZJKuX0qcEFxkcNO8kNONb9OXPlFAjV10kBLBUtW5yNcaJDDFDRIjBOZ8Vl rI8OHCJy0svv4Nx0swjE1iKlqkJNkl6X5+9W6PX2+Q6zNW5kjCtXCZUTnvz6rLmLYG VKgSnPLI92xy7fRt2bUP/EzEQhYYgt5H5siEfbWY+MFE7E2tIAKGMeDKaOwCqETxUu BIdKDbas+unWw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rzEZS-0000000058y-12fi; Tue, 23 Apr 2024 13:44:22 +0200 Date: Tue, 23 Apr 2024 13:44:22 +0200 From: Johan Hovold To: srinivas.kandagatla@linaro.org Cc: broonie@kernel.org, perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/4] ASoC: qcom: common: add Display port Jack function Message-ID: References: <20240422134354.89291-1-srinivas.kandagatla@linaro.org> <20240422134354.89291-3-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240422134354.89291-3-srinivas.kandagatla@linaro.org> Message-ID-Hash: 6THUEXFSPI44AOVC52Q2CUQUQRTHWNXC X-Message-ID-Hash: 6THUEXFSPI44AOVC52Q2CUQUQRTHWNXC X-MailFrom: johan@kernel.org X-Mailman-Rule-Hits: nonmember-moderation 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 X-Mailman-Version: 3.3.9 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: On Mon, Apr 22, 2024 at 02:43:52PM +0100, Srinivas Kandagatla wrote: > From: Srinivas Kandagatla > > Add a common function to add Display port jack, this can be used by > multiple board files and avoid any code duplication. > > Signed-off-by: Srinivas Kandagatla > --- > sound/soc/qcom/common.c | 29 +++++++++++++++++++++++++++++ > sound/soc/qcom/common.h | 3 +++ > 2 files changed, 32 insertions(+) > > diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c > index 747041fa7866..3bfe618e7bd7 100644 > --- a/sound/soc/qcom/common.c > +++ b/sound/soc/qcom/common.c > @@ -7,10 +7,14 @@ > #include > #include > #include "common.h" Missing newline. > +#define NAME_SIZE 32 > > static const struct snd_soc_dapm_widget qcom_jack_snd_widgets[] = { > SND_SOC_DAPM_HP("Headphone Jack", NULL), > SND_SOC_DAPM_MIC("Mic Jack", NULL), > + SND_SOC_DAPM_SPK("HDMI/DP0 Jack", NULL), > + SND_SOC_DAPM_SPK("HDMI/DP1 Jack", NULL), > + SND_SOC_DAPM_SPK("HDMI/DP2 Jack", NULL), > }; > > int qcom_snd_parse_of(struct snd_soc_card *card) > @@ -239,4 +243,29 @@ int qcom_snd_wcd_jack_setup(struct snd_soc_pcm_runtime *rtd, > return 0; > } > EXPORT_SYMBOL_GPL(qcom_snd_wcd_jack_setup); > + > +int qcom_snd_dp_jack_setup(struct snd_soc_pcm_runtime *rtd, > + struct snd_soc_jack *hdmi_jack, int hdmi_pcm_id) The function is called dp_jack_setup() so shouldn't the parameters reflect that and be called dp_jack etc. for consistency (i.e. even if you plan on using this interface also for hdmi)? Johan