Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1477454lqj; Tue, 4 Jun 2024 02:48:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVvgwFW+a4NEilatwRsjPTHY13/dIFmCDl6eYqHyy5aGZ+PAU1WAJZtbV71Ov6bfbjIRVCXTghrKY0DvqKQ9JHeSV3pIx7KcsFVSqf1yg== X-Google-Smtp-Source: AGHT+IE5gVtuVGjhND7pw93jW2cnnDGlXtoHGKwGpjVdwhSNpupSESRFW+WldI0nbflFSetKIV7L X-Received: by 2002:a17:902:e885:b0:1f1:8fd9:b99d with SMTP id d9443c01a7336-1f69390b667mr33236875ad.23.1717494500453; Tue, 04 Jun 2024 02:48:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717494500; cv=pass; d=google.com; s=arc-20160816; b=LiEKg2Rv0aJGZirTkdCbHPB43xqSYX6G3iquizR+BH8Sjls14wEke+hVkmRgMYA0zu 1malReAOvMANQDIiTbg3XANURQdL6cT3B1V1PMHWVlMTYRPEbO/h4Rcv6Du4TdtH4pAu 2X6Ngg4oz/aeiMoe6dcmGi4wDCa6Ht5OSq96z5tPGr9vOrDvP/exPuXRcTv6GUqCInq9 4H/GY15egE56TpKfoZaIPLP4reGzHfSR5xcXQiaBXfRbo1cSpzjkKd+eY2/bD+z1nSZG GnpXGUyyKCNaDAHY6IZGQs4TX1drTAzK/70F0yF2+rluR3raN/FazoM12syVli3e39UJ mALA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=h8w3PHphluD8h1jsOJr+esaBLa0WpV3tSQ0DXHRhrVg=; fh=dDQ0uY9hnYaPtoZATrmw0hsT+k3P+oru+jBbk+qg8jk=; b=vMHwLciHS7/4VaWQIFsKLpjvkNjqzvd5u8mm19mwG9yi3M4UV4cbJDxzFGblwPyza6 J6Wkyl9BwOlutj/ywLNd1N4GeEDlzcFa10tmoIMjdKrK2Kg/DOnsfcaKBBLxph0zNDk9 bTR4A0JMxkY4PHCbziXZs6PG4lqHk8otzX4Vetb8C4V9f47pStw6tg70A7XwHSnG4Q8I ffXVeQZxbX+dEUkAt874dGJv2yWiFqtji7I5/a8JkslyLnpXfI0d6QMzgSPX66rW5Puo kLp8T9INbsXm/vjQcMhb1E7my21W1zRPKF7kXqmiYo8L/WigBibLWp05MPQBKvcc7RT8 BEuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=thGn6ET+; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-200383-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200383-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f63235f9b6si77842005ad.148.2024.06.04.02.48.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 02:48:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200383-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=thGn6ET+; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-200383-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200383-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 064B9B219CD for ; Tue, 4 Jun 2024 09:46:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 978D41448C5; Tue, 4 Jun 2024 09:46:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="thGn6ET+" Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FED21448C1 for ; Tue, 4 Jun 2024 09:46:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717494404; cv=none; b=ttGDKqB4td+Yx7nf8gR0uHq3fH6JPLrYrvxts5ga6P1kWaMbQNKoEgCfqXLnxUKqczGghofExY33yL+/X0qQLsrkCZBKfrtrZKmXdpmzSptjuOrqLf6tsuh37y2we7iiZ2pDfFAu7c5O4CmP2D90qp2o1PpyhhnuguXWhyh2MHQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717494404; c=relaxed/simple; bh=7iOI2gyIz09ZExE7MThuktVMvBjq3HebuNyhlEujrSo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=iW6HXP61Wq+68Rtd2qz98kvZ9nZahIxibsNL+g+u5tpBPnOCVGwzeuKKhL0mQO+cN4a5y5sHRq4RRXKrtqqcQNlj7RWDNC127xQGsxiq0NIlDn4HAXJaMx9yop9/i+NqrZg7LHib1z/vtljuEm0su3G1KATOXNkllT90n88k3KE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=thGn6ET+; arc=none smtp.client-ip=209.85.208.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2ea903cd11bso56507141fa.1 for ; Tue, 04 Jun 2024 02:46:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717494401; x=1718099201; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=h8w3PHphluD8h1jsOJr+esaBLa0WpV3tSQ0DXHRhrVg=; b=thGn6ET++oTRwFg7vwsIG2IXKFmWdbIbN8iWtbVd2O4Vc2bI+PMCLlBdUe+NWvfiNm G+48HEBwugK4RY0z28c8HMt4XdsPZor6G/qHgBhJIiXXVJvXJ0kzbYjkXO0+2zPpR6t2 6DG9wIBB8MIBFSY2a+SjVogihuua1jVW44BFAUQ1+kvzFfnoyzkI2O0HSO1SH9cOZmei avbqsRMwNk4RmYeKwFzjrjVPSLcyJ+QhwAQ7IfZHq5dM0e0Tj/VBfsNc6wKIcvX4Y3qH gbj8uBwsbkD/utaf6ugJzE6wZmdpn5iYbWk5dZeDq33vNHp/aHXadA2UiFjeIVeXt7I1 /3VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717494401; x=1718099201; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=h8w3PHphluD8h1jsOJr+esaBLa0WpV3tSQ0DXHRhrVg=; b=H/nnkZoBzJyBaWdnmRUk8iJDDZGVxbsIuHq8+MYT01dZZ5EFE9mLGVzLGIi6KlRM6i N1naznpnDazXFmR7Zx1jnLNUu/Hu+Yh5qsK+cfVdq9khO3ZPF3G8BK79+YXjwMc14j8w emXZbOqVaV7FGbQoi0VNDji7iOojfo/I83WuehBJ+as7C9WtzillsyCScrt++F3doFkt KYT7nIJisSiKs4F/OnOD2nqAvJXLgNoiRR8c+Zu9STnDNzRy4GVawXy+RuLD9gHKTB/N 9A+/8wn5U2l3X8DjIzuZ3SX3nrzFMp1IJ8GHZxQEodZk9z05Hv29mPKGGexA82FETSMn fElw== X-Forwarded-Encrypted: i=1; AJvYcCUrbTeK7hahnViBnTv8qsmc7ikfg7qIbQ9Qs2eQsaK/73erN63Kutqfb+/nfKNhybikyAeISuHiHLpO4cSg27ZndqQHKnvtENPDungH X-Gm-Message-State: AOJu0YzP344vwCsKkpYAlgkk8L6blsNH1V7DT34IJFAdmq8p3bYyFSLF Gk4D6Z2i0fPD18cR0IP7IbR29uefNJajmZO5ad3fjQaTW232MEPno0YSlPfo6ZU= X-Received: by 2002:ac2:58d8:0:b0:52b:82d5:b361 with SMTP id 2adb3069b0e04-52b8959629amr8278360e87.37.1717494401183; Tue, 04 Jun 2024 02:46:41 -0700 (PDT) Received: from krzk-bin.. ([110.93.11.116]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd0649fb5sm10903837f8f.94.2024.06.04.02.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 02:46:40 -0700 (PDT) From: Krzysztof Kozlowski To: 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 Cc: Krzysztof Kozlowski Subject: [PATCH] ASoC: qcom: x1e80100: Add USB DisplayPort plug support Date: Tue, 4 Jun 2024 11:46:38 +0200 Message-ID: <20240604094638.97780-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add support for handling jack events of USB (DisplayPort). Signed-off-by: Krzysztof Kozlowski --- Depends on: https://lore.kernel.org/all/20240422134354.89291-1-srinivas.kandagatla@linaro.org/ --- sound/soc/qcom/x1e80100.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sound/soc/qcom/x1e80100.c b/sound/soc/qcom/x1e80100.c index d7e0bd03dffd..bc00722b7fdd 100644 --- a/sound/soc/qcom/x1e80100.c +++ b/sound/soc/qcom/x1e80100.c @@ -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]; 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; + + 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); } -- 2.43.0