Received: by 2002:a05:7208:2202:b0:86:316c:7444 with SMTP id s2csp2377632rbb; Tue, 4 Jun 2024 03:46:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUI6PJ5vwEscWVy8qCaCaiUT2obceZOx15wjVU8iRqYhpI5iybuWY8hjhXfXp5X5cch9A1AtcvoUSyDomA4pEXEon4htEURYzh6jxrmvQ== X-Google-Smtp-Source: AGHT+IGIc1vy17ZNyglLg/ahyHfoPpUNnvXApJpcOZfhmUzjh0I5njmekA4g6lYEHexmQz4tTwuL X-Received: by 2002:a05:6214:5693:b0:6af:c64c:d1ae with SMTP id 6a1803df08f44-6afc64cd661mr43594466d6.15.1717497963217; Tue, 04 Jun 2024 03:46:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717497963; cv=pass; d=google.com; s=arc-20160816; b=U6RE93udfnfDavUqSxDDVcZk/+G2GV6+f4ZoO+fmBt9FQR3izk8VCpGevArytrdIs7 ZKP+feZ3SH3DZ5DVyD6fb5ozoxdO06yw5lC5tZDTHqAKmZwgwq5VNzF0VVHEthYX2mhN 8gJkFYSFSEzcWJHuCvGit3qvtB0vnrLhylD3IIqTSsKb0mcdkydh3yY0rpN8l7uUDJfa MDJVblMfFhiNx7g78DyNUMkYUjzdyjnGdcAQTEtjXhQaojwLGgYCWW6GVWjdvbfiuYnL aLPcgnvODyl4G3MXOc3RYCxi16VpLGfB3vXp8jh4Ffb7ShhfMm/KKLsARVxYUL7684M+ 0XGg== 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=6bFmec8CsywbXdIU4kQwWb+h7k29Al4EERdY6clf0xw=; fh=Hlk/AViDh3n7RS2gOKbuxdTDngalPH9unb8MB+ucVNQ=; b=VbtiJh7aSVFeH89wsEKhihZBH9GnQpYhP7WQuvI0r/ha9ssp6w98ddkRMTGyiZSE0u O2WHElqwKgAS3V1EuZ5cMv0DurnhPLdZCOh2VPpjKLjaztO37/iifza1aCcdGJ9jkwOj SJmv9vYm55Xh2y0lcSLVOy8+kpCb/MK5ER50HlrXXzZ6SwACbfhI0fsohHIm+DwiAbvB BuYctLs2Wcy/DsmLLF5gEflDy0n6eshX/FHW/Ra3aPSEjEJ+VctkKw9E1hOMPG7w7glr HVKX0L/H8x20ZfljodQmW3/aCACOvmdcr8O6b7w/3eDcZzPoflFuISzU2Tl/MtKymxBv W6qQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cFndo4/b"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-200451-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200451-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4a742738si95438186d6.172.2024.06.04.03.46.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 03:46:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200451-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cFndo4/b"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-200451-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200451-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EF7BB1C23357 for ; Tue, 4 Jun 2024 10:46:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FD8B145B22; Tue, 4 Jun 2024 10:43:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cFndo4/b" 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 903CB145333; Tue, 4 Jun 2024 10:43:48 +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=1717497828; cv=none; b=R3YypN20uPiyAu+S6qtteXoRV6E0k2oCab6nxCW5HMJOQN43pXaT/75Dxbikmf40ajYxfB4NE6mHKyjYQPuADzU4WAa3u5YImn5L2DI7r82u4fa/Q88tpkUJcQi8+9ZFPk3VE4sXqQqgLcw1jb0ibsJF3z7xVEOlRRpTqZjyfwQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717497828; c=relaxed/simple; bh=yGknayW3QQ0rwaJndYaKwkPne6V5zBr5l3Gf/k6pWH0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PsW43EvU7J5KtGA1+xakBun5M1/CD1qROQtlaDt2p1JV+l5FW6IDgdMN+6N0VEpQZhXgaYbsrEYD5U/8dGtF5IorNohZDpChdr8PvDx8WFvD+9GDUjn99b/2oPDNeqSIjYBdu3aaWf4tO5+Gwfb4bggkyBbOxgHzreCCh0al3So= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cFndo4/b; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18541C32782; Tue, 4 Jun 2024 10:43:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717497828; bh=yGknayW3QQ0rwaJndYaKwkPne6V5zBr5l3Gf/k6pWH0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cFndo4/bAX4UD1RYY7WGPu4LBwxL7SZEADNtg0GzaMhGV0lJiTDwKfdBS1E9kIinn v3LUDzudl59ZMNzECxCkaKlVdBMjmpJD2UmYY9fMBxBZ+V44GeCF/x6bxVi8lfNwNN lvzWoXSYIK2WYzb6gpf1q2KvDfhdS5fnAbYVkjTMCssTD306r9ggTC6YlVIl7t5D+G FVkCrf1+xyKMBnWyfMp1eWLXMPwnmApXIrh4A0gmpPE8/J1Dga28KgU2f4TB6IFADM lU1dua6PHtWUu2Ok4rU3wOqOB1r7LzhyzfY/ao7Z+URv2we1ke/y0TBq/qoI0OlkrJ lHAGnLmUIzAzA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1sERdq-000000002mT-3A19; Tue, 04 Jun 2024 12:43:46 +0200 Date: Tue, 4 Jun 2024 12:43:46 +0200 From: Johan Hovold To: Krzysztof Kozlowski Cc: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ASoC: qcom: x1e80100: Add USB DisplayPort plug support Message-ID: References: <20240604094638.97780-1-krzysztof.kozlowski@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: <20240604094638.97780-1-krzysztof.kozlowski@linaro.org> On Tue, Jun 04, 2024 at 11:46:38AM +0200, Krzysztof Kozlowski wrote: > Add support for handling jack events of USB (DisplayPort). > Depends on: > https://lore.kernel.org/all/20240422134354.89291-1-srinivas.kandagatla@linaro.org/ > --- > @@ -20,12 +20,32 @@ struct x1e80100_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]; As I asked Srini, please rename this dp_jack. > bool jack_setup; > }; > > static int x1e80100_snd_init(struct snd_soc_pcm_runtime *rtd) > { > struct x1e80100_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_jack *hdmi_jack = NULL; > + int hdmi_pcm_id = 0; And use dp_ prefixes here too. > + > + switch (cpu_dai->id) { > + 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