From patchwork Mon Apr 22 13:43:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 790994 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 2D12EC4345F for ; Mon, 22 Apr 2024 13:44:42 +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 BD04DDEE; Mon, 22 Apr 2024 15:44:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BD04DDEE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1713793480; bh=rPldZ9H/ghc6AHkcMuyq2S8TeCvPuuLZe494dCfPxzU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=i5IHjcRdDg5DcBPRk50a56akOwPFqqDcSS9qdSR9I3LHH9jYWIdO8EflBE6jC9Eur HIIW8Gar3GRxj3eSXjIW/Qiaw48DLl8lXffRRSQXoDhh/CZifVBfPxesv8MrlR8I75 Vv2bpfX+6QwwGljAi4Vr4m15lu601nJhhttqXc4Y= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 03263F80571; Mon, 22 Apr 2024 15:44:08 +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 70D21F80571; Mon, 22 Apr 2024 15:44:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 40C22F80423; Mon, 22 Apr 2024 15:44:04 +0200 (CEST) Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 6D898F8003C for ; Mon, 22 Apr 2024 15:44:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6D898F8003C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=JzUNZaWG Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-41a7c7abdbbso6371555e9.3 for ; Mon, 22 Apr 2024 06:44:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713793441; x=1714398241; darn=alsa-project.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C68a3MzfkPxx0ofANoAgzKhNox/WCcxWh7hhMFfdoBw=; b=JzUNZaWGvtISqJ1d28PRW6/YSXd2WflRk+ae+Bf95z/HQFI4pgfbs3J28DMrt/6rQ0 i73W/jk398Uj+RK0PWz9iSD5NwfRlCifOLvSU6lWsBzkUPAoy2LfZUC5mKzx5Mwul3in h8IWGdHNg2huONA+elMpepNsbeUfMlw1h2u4MWvSAmHCqCLgbljd/AXP1Y0gP3OelMMb SgDsKu9gqWuA9MpKOR2iBy/FlKJ8ulXPdOiSteyN3ClNPQ9qty1+kVtVSrTj5nR5Xg3l VcsQzbCPFKpdvVkvT5aVbyYKE4hhqy0ZiSqmv09wJnwRiAOGjWAYeWUNvhC1BCCb4ujG SJww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713793441; x=1714398241; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C68a3MzfkPxx0ofANoAgzKhNox/WCcxWh7hhMFfdoBw=; b=qM7tdNWvYmU6GGX5Id+7vfOwWUjiPKAUYzp0r8WIxi+LXNGM/v4Yhdh18aPMMqRq6b nHi3EfeoyE//McZPm8GIAiJN79WBghgdRA8MVZXbI3vSjLE39WN0LR9tFPfr7/ORDpet FxSy/f9W4YNs8B1xEZhIs2M+997mYmRd5Lpc5e1nbtMnEe/Rv6SNMm0KqsTJZjJBqthO cy0A7qeLboRH8ysES0182MTr4vd6ZtrJ1ZYDDO/vswXCHpH2XTO3p8r4Y0Ms3NaKOMXt XM39MGY8qCZ7blBhMkFf5bWd2D4EDRFtvecdQuXKouDkKqCxU/1El7eg6lO4yEAddvpp J6XQ== X-Forwarded-Encrypted: i=1; AJvYcCWqmkgVY9OrBEI7HXGyBxaEr/5aHzTZoHbpTvvGhEfNimpN3TMin713SGPjH3ENPMoxaH73jXJZLs2h61spe0saukHcStO3IJ76G0U= X-Gm-Message-State: AOJu0YwtqoJYFlOpaUUzRVcSk5bmBY9X6BGiQmAUmuBKBT4tbzwJ8ExA WbQLwzAAycF0ZBA9rjsA+w20YUegLDhK6jxH//wMPao1L64J8uLrdGMC0bKPm0o= X-Google-Smtp-Source: AGHT+IF69zomYFFe3gyx0JQZWSWnA/EuT1tmDcqnUqTrWCK1PAfUVruv7UpMnVLeTSrBE1kQSTUlSg== X-Received: by 2002:a05:600c:3b1a:b0:418:a706:3209 with SMTP id m26-20020a05600c3b1a00b00418a7063209mr8005525wms.31.1713793441064; Mon, 22 Apr 2024 06:44:01 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id g18-20020a05600c4ed200b00417d624cffbsm20731069wmq.6.2024.04.22.06.43.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 06:44:00 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: broonie@kernel.org Cc: perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH v2 1/4] ASoC: qcom: q6dsp: parse Display port tokens Date: Mon, 22 Apr 2024 14:43:51 +0100 Message-Id: <20240422134354.89291-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240422134354.89291-1-srinivas.kandagatla@linaro.org> References: <20240422134354.89291-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Message-ID-Hash: ZFDZKQVIQ4KVYGJMIYK5J6LNUYBPDLR6 X-Message-ID-Hash: ZFDZKQVIQ4KVYGJMIYK5J6LNUYBPDLR6 X-MailFrom: srinivas.kandagatla@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header 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: From: Srinivas Kandagatla DP Module needs to know the data format type which is specified in the tplg file, parse that info before setting up the module. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/qdsp6/topology.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c index 70572c83e101..27a5adb201c3 100644 --- a/sound/soc/qcom/qdsp6/topology.c +++ b/sound/soc/qcom/qdsp6/topology.c @@ -730,6 +730,29 @@ static int audioreach_widget_i2s_module_load(struct audioreach_module *mod, return 0; } +static int audioreach_widget_dp_module_load(struct audioreach_module *mod, + struct snd_soc_tplg_vendor_array *mod_array) +{ + struct snd_soc_tplg_vendor_value_elem *mod_elem; + int tkn_count = 0; + + mod_elem = mod_array->value; + + while (tkn_count <= (le32_to_cpu(mod_array->num_elems) - 1)) { + switch (le32_to_cpu(mod_elem->token)) { + case AR_TKN_U32_MODULE_FMT_DATA: + mod->data_format = le32_to_cpu(mod_elem->value); + break; + default: + break; + } + tkn_count++; + mod_elem++; + } + + return 0; +} + static int audioreach_widget_load_buffer(struct snd_soc_component *component, int index, struct snd_soc_dapm_widget *w, struct snd_soc_tplg_dapm_widget *tplg_w) @@ -760,6 +783,9 @@ static int audioreach_widget_load_buffer(struct snd_soc_component *component, case MODULE_ID_I2S_SOURCE: audioreach_widget_i2s_module_load(mod, mod_array); break; + case MODULE_ID_DISPLAY_PORT_SINK: + audioreach_widget_dp_module_load(mod, mod_array); + break; default: return -EINVAL; } From patchwork Mon Apr 22 13:43:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 791263 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 49389C4345F for ; Mon, 22 Apr 2024 13:45:00 +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 6513E850; Mon, 22 Apr 2024 15:44:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6513E850 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1713793498; bh=QPGkywHhxJwbRVmkKg4yvrDXLaFojPp13JVOp7ayaxM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=vkvvUJ4X/Ok378i+DufzLrVl5SIfbSt1576QD1ejvP9ilyVyx7doBCmBN8qh07uKx qYoINyz71wruDXEcDWDtdOULwd817GymFtdfYbGZI1/lxQxE7kr9EJaMi3+Vr3olBN MIT1MA2Pzvhkaqj7//wIs7OP64IImRD8iJsWlnTs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id F38E9F805D5; Mon, 22 Apr 2024 15:44:11 +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 D8B01F805D2; Mon, 22 Apr 2024 15:44:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4638AF80423; Mon, 22 Apr 2024 15:44:05 +0200 (CEST) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 700F4F8003C for ; Mon, 22 Apr 2024 15:44:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 700F4F8003C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=H5eWbWr2 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-34a32ba1962so3100529f8f.2 for ; Mon, 22 Apr 2024 06:44:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713793442; x=1714398242; darn=alsa-project.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4DCZ+LurAPUpbkstxc4dh5F2TeDg5m/lAZJCQ3k7AMU=; b=H5eWbWr2A+LRv+viYcRvjRV0ayhFW8yXYLqbM2ee/WrTzzslZg8cZ0NKGnwilmNJ4b Rm+W/UmRvAcQ8kUWZtg43eAymoYqoMzFowUv9tgToj5n0Ed2U96Dw1xfeXpkNYAIHUmi K1WoMReaQUt+usjVGjmMXD3QboySSanRgYGHm4dE+fK05wsMyB55m7//LalQTABTiDBm 9+zuDuKcqDjM3/5sjLmIhocjG5KhCDIva8uUvwCf5Xgv695jB8rhJhqtamcOPJxkQOhb BssPQjUKSleHMFpo5pzHC69wYYGA+PG0kzCEHjXBHd9jJQYv8WWk7KrDuQVb0V69/NSH LsjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713793442; x=1714398242; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4DCZ+LurAPUpbkstxc4dh5F2TeDg5m/lAZJCQ3k7AMU=; b=TO2+cBlhvbYG3r0QBtlAYojlrsOX1T+O37cY3NWNPhfzO0yY/WDZkewyk6f1Ug3qC8 frL2Iw6KemfhKdLNRWdvncx2e1yCycO7CjS7cxngYdsqz5Nk3hsZlbdOa8E+ks0Hxe5j q152XZBlQOOczvfLtk7/2rYibh5hH+ujMokqefc69iM1LBoydPgTFQxfxH32+N4+kixv 83QzqQPuwktPICrHBiKhUln/uHL8P7h80/QUly3mlPyZlS4TXr4yzbR8QEguJPga6qru 4N8LIyq4jJQmJUE+ZtSUzRtLrA67faO4SxBuwhhY6bJ0qEBgfxw8i9qbgBFqCHLZflT4 /GmA== X-Forwarded-Encrypted: i=1; AJvYcCXQtVLH9F5tRxPj7WzuALYpYzQByIa/GEcGFZhyNmDfwIKKGPxYuoWtgZf052BCvaTwxIR9nVci9in2Oz7M1A1pNYJlFLGzkd4J/GE= X-Gm-Message-State: AOJu0YyccCzhGg4SHqDzUr69Pm3LWg6lZzrSYoxKgrtwF3vAsYn8YxfI bGjlbsb7WMpkXaTODvPgk/v2sdYsQsOiT9eSr90aS5++E//3X96K7Pd6Vv8dXy2laUPnhnLcAQI U X-Google-Smtp-Source: AGHT+IEq1VrIPR3upvHPe1XfDjkR/T391HRzjxsXogocBrP/QBTphSY+BSVPlcXSaBcwT4MucQNb0w== X-Received: by 2002:a5d:6a07:0:b0:343:77f4:e663 with SMTP id m7-20020a5d6a07000000b0034377f4e663mr6457055wru.18.1713793442317; Mon, 22 Apr 2024 06:44:02 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id g18-20020a05600c4ed200b00417d624cffbsm20731069wmq.6.2024.04.22.06.44.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 06:44:01 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: broonie@kernel.org Cc: perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH v2 2/4] ASoC: qcom: common: add Display port Jack function Date: Mon, 22 Apr 2024 14:43:52 +0100 Message-Id: <20240422134354.89291-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240422134354.89291-1-srinivas.kandagatla@linaro.org> References: <20240422134354.89291-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Message-ID-Hash: AHTJETL5R2JPV3DCG7SGGJNP4LIDOSHF X-Message-ID-Hash: AHTJETL5R2JPV3DCG7SGGJNP4LIDOSHF X-MailFrom: srinivas.kandagatla@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header 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: 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" +#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) +{ + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); + struct snd_soc_card *card = rtd->card; + char jack_name[NAME_SIZE]; + int rval, i; + + snprintf(jack_name, sizeof(jack_name), "HDMI/DP%d Jack", hdmi_pcm_id); + rval = snd_soc_card_jack_new(card, jack_name, SND_JACK_AVOUT, hdmi_jack); + if (rval) + return rval; + + for_each_rtd_codec_dais(rtd, i, codec_dai) { + rval = snd_soc_component_set_jack(codec_dai->component, hdmi_jack, NULL); + if (rval != 0 && rval != -ENOTSUPP) { + dev_warn(card->dev, "Failed to set jack: %d\n", rval); + return rval; + } + } + + return 0; +} +EXPORT_SYMBOL_GPL(qcom_snd_dp_jack_setup); MODULE_LICENSE("GPL"); diff --git a/sound/soc/qcom/common.h b/sound/soc/qcom/common.h index d7f80ee5ae26..3675d72c5285 100644 --- a/sound/soc/qcom/common.h +++ b/sound/soc/qcom/common.h @@ -9,5 +9,8 @@ int qcom_snd_parse_of(struct snd_soc_card *card); int qcom_snd_wcd_jack_setup(struct snd_soc_pcm_runtime *rtd, struct snd_soc_jack *jack, bool *jack_setup); +int qcom_snd_dp_jack_setup(struct snd_soc_pcm_runtime *rtd, + struct snd_soc_jack *jack, int id); + #endif From patchwork Mon Apr 22 13:43:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 791262 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 94A5AC4345F for ; Mon, 22 Apr 2024 13:45:42 +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 EFB45F94; Mon, 22 Apr 2024 15:45:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EFB45F94 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1713793541; bh=RSqYj9fLODqyWDFm63AWBPUaIjp1sUJoSIUJRQbfYkY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=LoegC0oVV6WgwkatJHiBcGXyI5rramS31pGyCqJ+0Fh/hZjDmdAyy6slaVCDyFVcD x91RbB9BVXUmb0FCL4MHYMAy5N/7+Ona/nYIckEEXSUqAaVIg9Pq49KbSgNa9O7sbc KUGsOXaTjXAed/yixrnydfoNSe8QOKimtf6mTSMg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6C83CF80612; Mon, 22 Apr 2024 15:44:15 +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 8E560F80613; Mon, 22 Apr 2024 15:44:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 192ADF802E8; Mon, 22 Apr 2024 15:44:07 +0200 (CEST) Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 593F2F8003C for ; Mon, 22 Apr 2024 15:44:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 593F2F8003C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=rHz802VM Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-41a4f291f9dso7393815e9.2 for ; Mon, 22 Apr 2024 06:44:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713793444; x=1714398244; darn=alsa-project.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5ooDB6P5Kmg8yEzYGOGc1KNPluwmb/df6YvlokaERTg=; b=rHz802VMhTGCa6IN/ukJtOmm+Mb9//1ZfpCnJAatGLjPDfUjCHiBEMRe8YSKKk6Ozp k81Kylq9v6G6NqLnCMxXTQcGxTe3zJ6lQyRzFR0uhowBR30g8AmH4g3iqST9Yk0+4TPk t0QCaRVdYIIG+Ux5wpdbMeEEydiXem7Xk6OWrbdn+Gf80XBNIwW6RJNrYUbYkHeC3k4I 3kVqVh8A2NlwXLRsTJkG8wlHmr+1quk5tuj9FD6IS33buNS2kiYbWYD9hcma4/ECO2YX e2XakkYwrQrH+3Vh6qffMnP0cf0oOgucyHcLBbRZatbWmfEony0EWkgJE1WzOPoVU8H7 Y4hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713793444; x=1714398244; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5ooDB6P5Kmg8yEzYGOGc1KNPluwmb/df6YvlokaERTg=; b=rSJAJKjdlbY+k5Mz1yu6Yu3O/dy6w/qlq6XsztF+3RuelL34I+kkqhsfNG4HWvAVq+ KnvVYJ+Y5T4iEE9OX8GHOMOgHdmhrYVRLFRlL/2OuSTBNYvi+mfKz1v+os8tiFP2DIaR GeL1sKTcNeazoH/9jwE1foiTtSKcP/C4YeeqFWMvDdpyKsKAy4u/4cYbyPcM+EY/wmDL YkIo5uHIGk7EqQb0W6AorkzqcWe/onO0yDrr8uW85Ut81lc5bLbAKO0keoDMNMis4Mqx Z2FrBf6vs8Q2qnhjsCvQSlBkJQ1bemEN7jh6DjTrzW4VYrRTIF3PHbBWRl7BKpt3MIow q+PA== X-Forwarded-Encrypted: i=1; AJvYcCXlj0cqzspaWg1TYdwJGYS/i1wpCnmsLQLqZPclUd1zrDSAH83r43fnP55F/2Lxq/wkP1StaBc1YnTWUl0w9/TlV4Q+/e3mYdDglDs= X-Gm-Message-State: AOJu0Yxhxw+lYkL+TsPGlkuECT3ep6bbqQIgznkK4pu/xWsro55e7MqL JOTe/LDYnjlnaGzot+NLk2RURENWt44x0bxuyfsMgZmbPPiNFhVlqcB3MgEN/aY= X-Google-Smtp-Source: AGHT+IHnK3xm7CMZ4D7teNrVAR475tu+8odtu8N0waL9N53OtCwv49PY4AtgG8UEQNcltk7ayCBSBg== X-Received: by 2002:a05:600c:46cb:b0:418:a786:3760 with SMTP id q11-20020a05600c46cb00b00418a7863760mr6722875wmo.15.1713793443690; Mon, 22 Apr 2024 06:44:03 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id g18-20020a05600c4ed200b00417d624cffbsm20731069wmq.6.2024.04.22.06.44.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 06:44:02 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: broonie@kernel.org Cc: perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH v2 3/4] ASoC: qcom: sc8280xp: add Display port Jack Date: Mon, 22 Apr 2024 14:43:53 +0100 Message-Id: <20240422134354.89291-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240422134354.89291-1-srinivas.kandagatla@linaro.org> References: <20240422134354.89291-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Message-ID-Hash: VOWVEBX7TNKWTJN5C5WFWDQAHVRSYSFO X-Message-ID-Hash: VOWVEBX7TNKWTJN5C5WFWDQAHVRSYSFO X-MailFrom: srinivas.kandagatla@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header 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: From: Srinivas Kandagatla Add support to Display Port Jack events, by making use of common helper 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]; 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; + int hdmi_pcm_id = 0; 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); } From patchwork Mon Apr 22 13:43:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 790992 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 DFE03C4345F for ; Mon, 22 Apr 2024 13:45:49 +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 043C7F52; Mon, 22 Apr 2024 15:45:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 043C7F52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1713793548; bh=bLGXgpxnbSKLkCQguZ5XOqrsE1dxN3y9EhIB6LMNF4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JT9M4RuiDNF1WGhEpQ3u/xd3tgnkaG0tOSy1N92jbq4H9jedutMOw4QPkApo0P10i 9Nc4dccvas05pkOk8UWUF6S/kkcNS6k9G4uQzZHrLy4Z7cuMqPMbS8HTs2PnvHP219 CLYPZI6ddcDfekHjrMaTXcHBNTndz3bIs971Zfl0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0213AF8063B; Mon, 22 Apr 2024 15:44:19 +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 BA3FDF80617; Mon, 22 Apr 2024 15:44:18 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 524B2F805D3; Mon, 22 Apr 2024 15:44:10 +0200 (CEST) Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 AF770F80579 for ; Mon, 22 Apr 2024 15:44:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AF770F80579 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ssT6d2rc Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-41a0979b999so9792345e9.0 for ; Mon, 22 Apr 2024 06:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713793445; x=1714398245; darn=alsa-project.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7kwADMk5cdAVshWhjo8kiL5c8AnuAMycon0bxlwOriw=; b=ssT6d2rccFCGNKMmqMurRV3JwMqCJwq3Q1NFEb4YjsQZKrip9Q5jljTzdE1XcN6zej JKxF3VPgC5buN5xm2VDFPxlL5UTYdfuhXLI6yFJ4DjrDQIQ3/83ThXvCiBO/VhPdA/+/ LZGOvp6322nrLHAKivOnzQGVfYN+NTbcUyughqPrhNF2L9NHNBVjn3FE6mBy1UXmHvxd jdnQwtanDyiX3/sL5d0q83Pe3pF4QYl1trvRhgUvxd7uFsWqfFGIG9vcVY6OMHcry/Ok Mg+AmyRuKaI3Q7IMjkckT2jaL6wvplxIdjDt6iEF3KQ+WRMG8icZ3z6HgvK0GmbJA7i3 d7gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713793445; x=1714398245; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7kwADMk5cdAVshWhjo8kiL5c8AnuAMycon0bxlwOriw=; b=JAoKRsBk3Oo2sc/yXLpCXCjK6vIfUuvF4anwXPSNoYza2fAoOB1grLCYmNKbXwHUYw iAi+JZDpmTQaMeUyKf/hjNxbBrrTyEZOS88hlkY3g8Ymjyp3UKxCMbcYfC6sA+czxJC9 IpeoEBuYzrhp0XggD29HSz5s7rZXgBY470+IUyYrKq2Bu7DsW+ZkKITkhxpDyMZ7mrH9 AAC564gpEqkj73mrOI1VRGUzjFoNGVygjtd3Sd7gBaWsBB7mUIOC4fmH7XWd3alngIKQ gYHCNhKtkyTZj3dZ8jV8Drs3oNlcIospa//mk+3ODns2BMgUzLtMDAX678BOnbQlzeEa b5Tg== X-Forwarded-Encrypted: i=1; AJvYcCXhPpz8+Z1Y2596oaF8ZZlye10qYpvZAubKyQyLk8RbJG6V37P0sRaNWZMnkObNg1cSIzZ41RXR1sM9WZ8N0d6TlmYYhYi4ICX5+E4= X-Gm-Message-State: AOJu0Yzgt7SCyYKkPTyql0FFRDy5Nd53nGo8DJTJSERXxRW7WHhOMrPe cnNfjoJ2ZIHzyGgFU7LdNBRTtKaUzjidDUsgPBRxJ2CPZt5MXkmXxxxz5VFPblU= X-Google-Smtp-Source: AGHT+IG4kwKfyMpRuWXlxFeKbxQWHJY+DwiUbTneZBOl7/zDE6gyAXrGAyk7QNgJ9pYfFQ1pPWWLuA== X-Received: by 2002:a05:600c:4688:b0:418:a2ce:77ae with SMTP id p8-20020a05600c468800b00418a2ce77aemr7466632wmo.27.1713793445132; Mon, 22 Apr 2024 06:44:05 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id g18-20020a05600c4ed200b00417d624cffbsm20731069wmq.6.2024.04.22.06.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 06:44:04 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: broonie@kernel.org Cc: perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH v2 4/4] ASoC: qcom: sm8250: fix a typo in function name Date: Mon, 22 Apr 2024 14:43:54 +0100 Message-Id: <20240422134354.89291-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240422134354.89291-1-srinivas.kandagatla@linaro.org> References: <20240422134354.89291-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Message-ID-Hash: XWBH65UOJSM54YFEIID6DGCSUUGT5WIQ X-Message-ID-Hash: XWBH65UOJSM54YFEIID6DGCSUUGT5WIQ X-MailFrom: srinivas.kandagatla@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header 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: From: Srinivas Kandagatla Fix a small type in the function name as its confusing to see a SoC name that does not exist. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/sm8250.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c index d70df72c0160..9bd159b81d69 100644 --- a/sound/soc/qcom/sm8250.c +++ b/sound/soc/qcom/sm8250.c @@ -70,7 +70,7 @@ static int sm8250_snd_startup(struct snd_pcm_substream *substream) return qcom_snd_sdw_startup(substream); } -static void sm2450_snd_shutdown(struct snd_pcm_substream *substream) +static void sm8250_snd_shutdown(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); @@ -115,7 +115,7 @@ static int sm8250_snd_hw_free(struct snd_pcm_substream *substream) static const struct snd_soc_ops sm8250_be_ops = { .startup = sm8250_snd_startup, - .shutdown = sm2450_snd_shutdown, + .shutdown = sm8250_snd_shutdown, .hw_params = sm8250_snd_hw_params, .hw_free = sm8250_snd_hw_free, .prepare = sm8250_snd_prepare,