Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2888851lqt; Tue, 23 Apr 2024 05:02:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV+mBhAqiIGTNOPDEe6Av9JTDl/bc4mdfZRUSbD3v9LgpU9UxQvTqajari6cgh2AhScxnenf+6UEZNmA0E50V4mC4hYmsflZ37f/ayb0A== X-Google-Smtp-Source: AGHT+IF27d7hjO/h2ld5uDAxRKFccfbzUIyXCdF3F/IE1H+v6uImT362pXKsKGQ+fR0K5vKyP+3R X-Received: by 2002:a17:906:31d5:b0:a55:5b50:847f with SMTP id f21-20020a17090631d500b00a555b50847fmr8927040ejf.22.1713873755870; Tue, 23 Apr 2024 05:02:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713873755; cv=pass; d=google.com; s=arc-20160816; b=0xy0FQB6JAeSJn8VpcmKPENccs4oDbHTgbBPSepzlnmUV7z9cORFYR1ni9Q89GSOQK l772EDw1tohjpwzXEwurQ+XTFposceQqJnrt66YCz8134rLXuOIvCwJvxulA5aALe6OY uGFiYiZd7DlTHu4Twtyp1RGT9mv4hlYlFBLo8sYljEbx9Zdg3kLx6MyGRm7Tu2054x5B VWAoOnKynbAG2p6fGRXDaFmjZTux0jb2vRXKnZVuz/r92vXJ6UZw4NL3dHaDxcKnjFHw REHBy/rySUSR3d/e8Ce9seQbgrTTb1b0CSoQyD5wU8RzTCrrarEUQrJ7vOQlN2JN6LoJ +idQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6ZZK1KF4IkRsEYHXyQUII1LJPRef7Gh7vwwlaIqdzlQ=; fh=2K150xkP8a89i67Cv8gZZsPhL98zBSA0n2x0Eh/gGUA=; b=CeV7CK9376KuNYdRwcoGWAoz1C8hFLbnKY0X8xkA/0xqibHA6Dr0v/dnNFb3TI6OP5 w1ji/yZsezcDncwgWb5dNhMsmdtbqmQIoc3sWchp1c9w5KCHT7VlalkxCvBWvJw3dIX6 cE1qw51MHiEK/37PYMUvyr1Q6YQ3zH0Ew2MzA+VlBQ0X2FOJUw9aggCRiVFEz/nwKy7e E1CbI9/3DUuKs1TWAkeZydIivxhSCjGdcCo0dQw3e9hHdnJbzgAfDP8Mew0xlji4D8AR ADTBp5ivc1aamT0H6QL1Wcsb4aZD0OTsSDd8/rRoXZx3pxqItbtZ4qKmd7T8vsUXPeMl G8PA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pCLzCIiH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-155100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id qw39-20020a1709066a2700b00a55b3b7bec9si2852829ejc.469.2024.04.23.05.02.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 05:02:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pCLzCIiH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-155100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AC4D91F23DDD for ; Tue, 23 Apr 2024 12:02:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61B5E13B2B8; Tue, 23 Apr 2024 11:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pCLzCIiH" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E9B013B290 for ; Tue, 23 Apr 2024 11:48:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713872932; cv=none; b=ZBU68JJVEF/2FLdIvtldzZI+0/UINosMWr3cRbRCKC6wNzGpoMquBRhCSoCEKzNspskl/g/4POiJjtGSYNQPUvktn/IIFI28+OHhYGUHZjQUU992H0Jkcgiuqcj1bgzchN7I7LvS9lrto43i73Ti3c4cIa1GGABNWvX06iz6uVU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713872932; c=relaxed/simple; bh=PKSrVVx4eiys/Zj2uIwEfs1FS0teIqUADyfmFNGktlA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gRku6RnGfub3jCu0J6NmtfAsz/34zOyfZVVLGp9jmnQLzTYFNidIX/HEeb5dp8U6qOknr2ZyhnZA8Sx00yAuVuBxoFnhH2DfWt8eSpBjHReTGK2PbgtzDH0nZm0J/HPCWQiqdvT1dc8P/M09sZd94lCZ8w7pdTSU+w49yiRbnts= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pCLzCIiH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63DAEC116B1; Tue, 23 Apr 2024 11:48:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713872932; bh=PKSrVVx4eiys/Zj2uIwEfs1FS0teIqUADyfmFNGktlA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pCLzCIiHLeYTsq5I4SX0KH+cSVY797FLaVBH3OUNnmijfVjmeoWbnHB4pWszeUZdM Mi3YFDW+NVSKaxr+FYx8DGyH2G7/wzf8Dp8KqNz0Heo9C1Ub5B5T95js5KtW0gLSNQ CbO1jyCj77sJqL/H/TAPxc+LtNRMVvg06AfyYYyKLgIxpU8X3BsCnrCV2NeX3FLuf2 7xTSnOGHyIrFtJxbdnkkBdGT03rJwLneCkuplsU7LO/cyKsLmSZPZZhd/fQx94CHCR /NteoVmT14gWJ1oaDe7/Y9KgZ2d0Set29DMG/SVzCpRfIYF2zmh+Vu6bAXhuqE+Qiy 2ThPNWJGnJ5aQ== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rzEdm-000000005DH-2gfe; Tue, 23 Apr 2024 13:48:50 +0200 Date: Tue, 23 Apr 2024 13:48:50 +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 3/4] ASoC: qcom: sc8280xp: add Display port Jack Message-ID: References: <20240422134354.89291-1-srinivas.kandagatla@linaro.org> <20240422134354.89291-4-srinivas.kandagatla@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240422134354.89291-4-srinivas.kandagatla@linaro.org> On Mon, Apr 22, 2024 at 02:43:53PM +0100, Srinivas Kandagatla wrote: > From: Srinivas Kandagatla > > Add support to Display Port Jack events, by making use of common helper s/to/for/ drop comma > function. > > Signed-off-by: Srinivas Kandagatla > --- > sound/soc/qcom/sc8280xp.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c > index 878bd50ad4a7..38f97f19add9 100644 > --- a/sound/soc/qcom/sc8280xp.c > +++ b/sound/soc/qcom/sc8280xp.c > @@ -19,6 +19,7 @@ struct sc8280xp_snd_data { > struct snd_soc_card *card; > struct sdw_stream_runtime *sruntime[AFE_PORT_MAX]; > struct snd_soc_jack jack; > + struct snd_soc_jack hdmi_jack[8]; dp_jack > bool jack_setup; > }; > > @@ -27,6 +28,8 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd) > struct sc8280xp_snd_data *data = snd_soc_card_get_drvdata(rtd->card); > struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); > struct snd_soc_card *card = rtd->card; > + struct snd_soc_jack *hdmi_jack = NULL; dp_jack stray whitespace before = > + int hdmi_pcm_id = 0; dp_pcm_id no need to init > switch (cpu_dai->id) { > case WSA_CODEC_DMA_RX_0: > @@ -41,10 +44,21 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd) > snd_soc_limit_volume(card, "SpkrLeft PA Volume", 17); > snd_soc_limit_volume(card, "SpkrRight PA Volume", 17); > break; > + case DISPLAY_PORT_RX_0: > + hdmi_pcm_id = 0; > + hdmi_jack = &data->hdmi_jack[hdmi_pcm_id]; > + break; > + case DISPLAY_PORT_RX_1 ... DISPLAY_PORT_RX_7: > + hdmi_pcm_id = cpu_dai->id - DISPLAY_PORT_RX_1 + 1; > + hdmi_jack = &data->hdmi_jack[hdmi_pcm_id]; > + break; > default: > break; > } > > + if (hdmi_jack) > + return qcom_snd_dp_jack_setup(rtd, hdmi_jack, hdmi_pcm_id); > + > return qcom_snd_wcd_jack_setup(rtd, &data->jack, &data->jack_setup); > } Johan