From patchwork Fri Apr 19 15:01:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 13636477 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 790A6C04FF6 for ; Fri, 19 Apr 2024 15:03:52 +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 CC0FE14DC; Fri, 19 Apr 2024 17:03:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CC0FE14DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1713539030; bh=z/01KbpJUrnhSXb2YDfo1h/eKOvCBmVA/IVm+kzFUng=; 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=n3eqzXxXk5srP2D8CBrlf/tcaau2+LrGn68xMQymI3cBmgiWi8uYktLZP9gLeaV0Z E1Sf2pa15nD0vrEzapqNoFlhijUzx+goVb1AtR7SG+rTIEWxC2mGS+O7K/axa1zjCZ VQkG2KaHpIz/ObNfpMc7xmZtOgdEejdQQPwUBHjk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9F86AF8063A; Fri, 19 Apr 2024 17:02:21 +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 812B8F80640; Fri, 19 Apr 2024 17:02:20 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CADAFF80620; Fri, 19 Apr 2024 17:02:16 +0200 (CEST) Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) (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 368E3F80601 for ; Fri, 19 Apr 2024 17:01:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 368E3F80601 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=GNuN6+9d Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2d87660d5c9so23073721fa.2 for ; Fri, 19 Apr 2024 08:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713538908; x=1714143708; 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=0zadu6QxqqDPKAQWxO1aQV8SmpVW6EVj/pCdtlgNCkU=; b=GNuN6+9dHjp59Byzi/RD15+UnI3a4x9EcUd2qmnt2qXaMVtgmtUzotGcrDbR4eaipT oEo8vMB/EChPkGg92BP/yu6dPkCimi/dDf+RF7JWZv1CjpZPtDBLXX+SFEN5vlG5eV16 5K3BpSmxnR7uSwd4SP2l942s4Y1tHQSKHUAW3J0Ld5AXloB8mrPjgAlstNblzNqCddvO XhrZPNB0rgkhd+tkU1z50iMLXVNPPvd68tFMmMSwWntXiyAAJOfN9FoQXu1Vj17ilL2F VRLw1I7VhP7683cv28WBiis1/nd4iNNyCkRw6t7QXwVzf4mhGX/pkUNe6BiCxyB9DmhP s8KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713538908; x=1714143708; 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=0zadu6QxqqDPKAQWxO1aQV8SmpVW6EVj/pCdtlgNCkU=; b=ff83CIfG1kaGi01MxG1BUSA16kmg1beaBBj+d1US0xScdBQXJ/Ln5GDNRXadF3ahFz 8LpZcSV4fzZjQ9+xrNn+aWbpZhr/0lpKu48vEyxxKtgoHh8Dp8eexiTNjwQ8bFCYtaqL Hxsoh0ChQ8TYhFbV+9hvGlqKwx1mr5BIWc+PZbmdmDuYrbrP/aM1eUIq2gXXxN5MER9y 2pZ0bGnMiqolMcEF7wjbmUPiYlH7QuQMfmJm+20b1ylMwSQUtUwWfElpmdknY7wBmAw1 p5S+DTzjQVu92Iy9Y3fJoEVa0kM0zoNpfX+keTeFZQjrygOls4ANmHbYLY1MCH7fabB0 44cA== X-Forwarded-Encrypted: i=1; AJvYcCWOx5Au35i/Zj6cICQAzBi24sJKbKkH/lPm8j8DkbpS9N3q8ROel/rPNS5KaZRWksUgQ6n5FgKSbbz7f2ln6/RwoecpfYzOh6/mhv0= X-Gm-Message-State: AOJu0YxTUa5LLBYis15G8k76fB9PPG7HCm5ifYrHwiegw/GiH309KGv9 4hOoGRWKVc/R4hMkv1Yk6fgGVg4W6jLEati9uVPigfEEDjKN6d45Zc8nElAeQEA= X-Google-Smtp-Source: AGHT+IGL1W85WvvhW6kovpHuj891c1aSzJ4lVgOhlczmIfJv+733Fam7cnZaouVfnf6+MpkTnF3jyA== X-Received: by 2002:a2e:9f14:0:b0:2d7:1323:6792 with SMTP id u20-20020a2e9f14000000b002d713236792mr1881512ljk.43.1713538907620; Fri, 19 Apr 2024 08:01:47 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id f11-20020a05600c4e8b00b00417ee886977sm10660462wmq.4.2024.04.19.08.01.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 08:01:46 -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, steev@kali.org, jenneron@postmarketos.org, Srinivas Kandagatla Subject: [PATCH 1/4] ASoC: qcom: q6dsp: parse Display port tokens Date: Fri, 19 Apr 2024 16:01:37 +0100 Message-Id: <20240419150140.92527-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240419150140.92527-1-srinivas.kandagatla@linaro.org> References: <20240419150140.92527-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Message-ID-Hash: 33FK6AKZBZ4O2OZ45NIDC376OTDC3LKG X-Message-ID-Hash: 33FK6AKZBZ4O2OZ45NIDC376OTDC3LKG 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 Fri Apr 19 15:01:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 13636473 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 228D6C4345F for ; Fri, 19 Apr 2024 15:02:48 +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 666B5E0D; Fri, 19 Apr 2024 17:02:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 666B5E0D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1713538965; bh=Yaor62sYcDjIvBNPTk74x1zdaU8YS2t8ezX+C3LnvTI=; 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=CCAqv2SHYFzuWiW9JAWn95Ws6+NrH/mYJ6ONHw6GsShpaO3USxCYmVxIMIAcbZctQ wc5X6nAXPEUYxIiauT/PFveVgkUE4W3yvw2IGLEI92wdR1MeJJuPZ0RbAdx6aVkoXp lG6/b8LjmyuM9MmEr6q9PLiVvcFFCCOqYrFiUcEM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C7D6AF805AB; Fri, 19 Apr 2024 17:02:03 +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 1805EF805AB; Fri, 19 Apr 2024 17:02:03 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1ABB4F80494; Fri, 19 Apr 2024 17:01:59 +0200 (CEST) Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (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 34F33F801C0 for ; Fri, 19 Apr 2024 17:01:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 34F33F801C0 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=QqthIG6/ Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-419ca3f3dd0so2894075e9.2 for ; Fri, 19 Apr 2024 08:01:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713538909; x=1714143709; 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=du5C0hgzbqVxZXImYAbxQy35/QgbiTxBZrKV2sLLphs=; b=QqthIG6/qL193rJtPAS3qTNnjRnVEthV4ycLlj0Y+k46e6LIaPuysOgOgjVi6qU2s+ D3xxaprCeMFakMFepfIlATrq5M1RIOhMEhaWlT8+MsdxT2JMt9cqcSzCsOg7eZ0aeN9q BKfkzrZojdmJUUa940bHeTY8u2MAH0wI6S/nffOt+n2juJ7W0UzvG7nAE65z+kCjl27Z eXy5blXFYB1ToXFbw9XBZH96/Tdrk5qPWJFnQ0L6vRNqCksofJTSmpE0PmbJZ1P0HznH suqD9XPsRnfyaGfJymQFypb3GdS8oq969hOHDj2hZ7QtpyWsLczMjT0BabKmi9Z+CLUd XgCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713538909; x=1714143709; 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=du5C0hgzbqVxZXImYAbxQy35/QgbiTxBZrKV2sLLphs=; b=GWlHm5fEATbmPOQtAaoc2als1PbbmwEsPMHeagb0S12eZUUUcBbYNv/NWfk9RjCiWO cTUNS/wJ5MndqY3qX33keHCEIlgn01Fb0Obyx1bCeFhNU+vBFSJvIYQobFLtQ+bdRm4n 8iJLNQjtUN+9dh9lxk8xi4affAeaAaWjC/PRjWk3OopGI8b4DGiYl48Fv+i6qzfFAI59 GRWJ9Q8B8Jv54/GFudNBcl0z0/dQaVEpw1Txxlm6PYZDlzPPQrI3+N1TDCpu7bsiChZv eIWvS2W/SAXEcxSceVuOUQkSpoKI6msc4vCmvZKFDj7AQUjJ03V4L1xOE1oob0rQeDnV vMuw== X-Forwarded-Encrypted: i=1; AJvYcCXusZKO2j4bC2mhpypQh6IyXKn2y64NJ1jNlfB1y+JLRe/wGnGCby0V0IMWtOGuH9JNibRR8ceQzrGZfVLXmGjrwtTIldktL6s28O4= X-Gm-Message-State: AOJu0Yw3YJzPX+fQKqjssN4Dm2XTaYOt+UFLwtkCLHYF3Jtrv9yLMi0Q gZ0a/voOVdvdfmtHSDO4o/AHoMm11JujMu/Lj1MHyhn/io/Aw6Q7EaWuuTTs16caOgSoF8AMSie U X-Google-Smtp-Source: AGHT+IEIK53TDBowNSsIB8o/KBchyuj/pRPeFMmAXDj0MXN4/pA43aqm2tY0y8v2ZBLiX0IgHACxzQ== X-Received: by 2002:a05:600c:3108:b0:418:b425:d7da with SMTP id g8-20020a05600c310800b00418b425d7damr2069794wmo.32.1713538909053; Fri, 19 Apr 2024 08:01:49 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id f11-20020a05600c4e8b00b00417ee886977sm10660462wmq.4.2024.04.19.08.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 08:01:48 -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, steev@kali.org, jenneron@postmarketos.org, Srinivas Kandagatla Subject: [PATCH 2/4] ASoC: qcom: common: add Display port Jack function Date: Fri, 19 Apr 2024 16:01:38 +0100 Message-Id: <20240419150140.92527-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240419150140.92527-1-srinivas.kandagatla@linaro.org> References: <20240419150140.92527-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Message-ID-Hash: CLXY6ATXLEHEIYZQDMZQQYNWLYYVPYQO X-Message-ID-Hash: CLXY6ATXLEHEIYZQDMZQQYNWLYYVPYQO 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 | 30 ++++++++++++++++++++++++++++++ sound/soc/qcom/common.h | 3 +++ 2 files changed, 33 insertions(+) diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index 747041fa7866..50abd4acaa3e 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,30 @@ 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 *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); + 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 Fri Apr 19 15:01:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 13636474 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 D3FDBC4345F for ; Fri, 19 Apr 2024 15:02:59 +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 85738E66; Fri, 19 Apr 2024 17:02:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 85738E66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1713538977; bh=6VfB2MxnfpwxDajfB1IcH+LrSDMjCd5/ucMZhFDOGNM=; 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=jdy5kWn5Kt2fiku8wIBWSVsFl7tlzVPTs8Jc8O06WrR0pU7DtV16rXnkFXEB8s+hO jrSgpOblCZd2BZbXZzk3DFuxQNC/Y7wFbclBjU0phL8e4jmyn1C5/fC4J387jAzIty Pm+Y85SUAwrz2VH8g0wFpL+a02CilqjiyzZjUh6k= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9AAE1F805B2; Fri, 19 Apr 2024 17:02:07 +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 923F4F805B0; Fri, 19 Apr 2024 17:02:06 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2CDABF80494; Fri, 19 Apr 2024 17:02:02 +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 B1CB5F8025A for ; Fri, 19 Apr 2024 17:01:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B1CB5F8025A 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=jQz6cDsa Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-418c1920313so17338645e9.1 for ; Fri, 19 Apr 2024 08:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713538910; x=1714143710; 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=sMUP+wlhZ8g+tuzLPiwn3mBsR+LeHm7xmSWj9q3JJJ4=; b=jQz6cDsadRkWKcipI7DCwiYAuX2xeTQrBZ6e/F3X6Sb5f/vcw0bKk5RvA+iI8/+g6Q XGKNYD7wsN1H43dBXgNgXwlo2fKjMq70UBiAiSsraqEz+9tNtzsOzptNNBowWUBb+JFk 7MZ49t04odLE+i5yALSat0wdhBoKmkZB1jyaW6TGzbH82l3SQz43PaPo16TljMtCjeXp KrjjNDHIr6qGxuRjZB/p9iw8s6f9LhN5EerYjd0tTs8bygeqORbHbqk+onezMpj5sO/R oQtgHcY4F26NRLKro2wbEGrowhXp+6/1+2KyCD4garsyMwPwFhufCa1Wiu4fNQktQhnz pBWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713538910; x=1714143710; 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=sMUP+wlhZ8g+tuzLPiwn3mBsR+LeHm7xmSWj9q3JJJ4=; b=lI3pXKEKAymxBILwJUOLBswNtpRKMs3RFdZfkS6laTiTTfthv7ZWr5u1LQr1Ijy8zD 0cmLdLByncqaRsaXeGGw9SLh08C5/5gVePZDTaEaLW4u3djWjw4EuL5ToQzWj5aH16OQ 48V22C51Ezf+cNIlCevRanjtJhOHJa1cCr/e+v/8RS78AAXyC3AntlSTiDq1+PheVrUG HZxOm+/RVmgKRf6i7/JoOpir0i4FPRKDr+f6MJ5P711bXUrwhSY4BVAtfc7xQX1UVn5R n3TANmX8CE0RXvAB/TCv3SY5w4uOKY/2A/1L2gCfqOXgFNgk1Z2bb8zKwNDjbEkgSHqr upaw== X-Forwarded-Encrypted: i=1; AJvYcCW4zEFiusbzbtDmp7KWrxd3igvgLmeWbKCq2B1ffNx755wV6fJ6XqepW8h5gvqR/wZtuJ7OkkY/m224Hjr3TmUJFiCBGtiz0vrgbzU= X-Gm-Message-State: AOJu0Yxmq+UJvQ9DP0tnLf81KBSID+iR1/I+LH8qZ6S2AygIqIOpI1bk Cimfg6CCeCGG6P3Zp5v3Hp91PRYCv+wYm/MqH6brRgiIzbfyz8RUJ1hc1R1dwUg= X-Google-Smtp-Source: AGHT+IHpuWndHVKKKBXkjzI7oYy1jjgdAKfsoS5fJeCifW0YVwRYgaH5UckN0SgJC5ZFGU4MLWkuGQ== X-Received: by 2002:a05:600c:1d01:b0:419:96:965 with SMTP id l1-20020a05600c1d0100b0041900960965mr1874240wms.37.1713538910674; Fri, 19 Apr 2024 08:01:50 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id f11-20020a05600c4e8b00b00417ee886977sm10660462wmq.4.2024.04.19.08.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 08:01:49 -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, steev@kali.org, jenneron@postmarketos.org, Srinivas Kandagatla Subject: [PATCH 3/4] ASoC: qcom: sc8280xp: add Display port Jack Date: Fri, 19 Apr 2024 16:01:39 +0100 Message-Id: <20240419150140.92527-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240419150140.92527-1-srinivas.kandagatla@linaro.org> References: <20240419150140.92527-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Message-ID-Hash: MOLBFGVM5EOZO7W6XJ45RX43PDL2WKSC X-Message-ID-Hash: MOLBFGVM5EOZO7W6XJ45RX43PDL2WKSC 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 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c index b7fd503a1666..ced89cf65b5b 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,20 @@ 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]; 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 Fri Apr 19 15:01:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 13636476 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 A355FC05023 for ; Fri, 19 Apr 2024 15:03:32 +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 6BD6A14DD; Fri, 19 Apr 2024 17:03:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6BD6A14DD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1713539010; bh=bPISGBwHKS65Ig8Nwyh0u0FEtW0ODA1tiQEsn9m1a78=; 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=n7bRQd+t/CQq7APZvgRhrEj/YgeSVO1LkqQ/5fK4TchfvwmUPxT7+RbiL/eN7gKnP pAy6jQ6yS13tfS8EoqR+Yr8nQ97pkbSa3+DIm5SlkD1pch2kcwDnyMJurWc4yOiYf2 8+qobWlrKIFHC9A/FJIMRek86xavhE9pbj/dQX54= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5E776F80615; Fri, 19 Apr 2024 17:02:14 +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 16083F80617; Fri, 19 Apr 2024 17:02:14 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 56E6FF805C2; Fri, 19 Apr 2024 17:02:05 +0200 (CEST) Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) (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 A0635F801C0 for ; Fri, 19 Apr 2024 17:01:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A0635F801C0 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=x48LWHGK Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2db17e8767cso30252631fa.3 for ; Fri, 19 Apr 2024 08:01:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713538913; x=1714143713; 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=SKK2lHWVNTM0FrAdLX6Qzm6HKxic16xHNY/tlXN6dfw=; b=x48LWHGKLsac272x5hPR2K9yAWCkMXPlBBq4cI6GvlgjPeQ3gTvCpn1PWPOPmw8JAZ 188vPlCRugXibcy7qjJSm0v3cD+W+H3IP7XNw54jZRkSLPidKQ6UXespuaQfvq+D/P4/ WkgqdX44Ub2ClKvqcN66+cDiHPZpa8pci8ABo/62AG8pFjIly78qyk7bkygheg3lhqfq gsTyIpQ3mHd724NqlSR1n1VdJKzvZU9BilTaa3VJ6B3EjtkHxzhYQ7uHjT3ccJpnn5+l ZTBzPk7DMTGYYKh8f9xdUxuNRja8f8zYEAWDhwWBubMo6gYRgWvdg0/0MPNdhWesCvUI RLvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713538913; x=1714143713; 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=SKK2lHWVNTM0FrAdLX6Qzm6HKxic16xHNY/tlXN6dfw=; b=pn5Lee/KFIIdmDC5wAIjbwOIr6yoWq7xhSHjN8c9Wj9OYREjcOkKUJC5FarlaUzdRa ITU8CggU8SWirDWZpjKDidUw+qC2O/duQ8Gmzrs+54FsJYk+w1YfisSUbkxfmJsAJT9Z rFEoqcr/g+10NaCNar7XrjWJre85zLkqoS4ED0QT/ZKqw4yeTaEpZfLKzARp8an4p44L LUTD3I26+rY5nBuBXmlAn5StnwsavJABr5p5L8h89zaioqMejp7O+JoTQ8fTZi5at01w 0gaJ2R9eh5D4gWSW9nffAc9klyr9a0DAhpRsOW6exq3gMgH/fqKU3ZpifY7JsQzIyp79 Cvng== X-Forwarded-Encrypted: i=1; AJvYcCX2sfttmfff7hlgVWBsRoB13n5gGYjuvawTDW/OETeyinayRT08wzDDAr0SnNEO8jBo0yHveu4cSy6uQhAEV5IUz4j6hiY1VwzVpM0= X-Gm-Message-State: AOJu0Yx3Xbb5TiiLuGQA3Nrj4POWjKaCp2HscyE7Y9u6h0qCE5VBaQ/R yulf+6B4Xpf/7WSjvThJb/8+rJTqPl0mV1aAVRDci/9nkswGLITq1Jfx2WU9e8o= X-Google-Smtp-Source: AGHT+IGGJookUTMXcDbddWvz5/sMR1qyz7+vIW0U7CPi5oZhv1EIeWy4UabCosCISYA4f+jbMedvEg== X-Received: by 2002:a05:651c:3cc:b0:2d8:59cb:89ef with SMTP id f12-20020a05651c03cc00b002d859cb89efmr1379263ljp.24.1713538912186; Fri, 19 Apr 2024 08:01:52 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id f11-20020a05600c4e8b00b00417ee886977sm10660462wmq.4.2024.04.19.08.01.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 08:01:51 -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, steev@kali.org, jenneron@postmarketos.org, Srinivas Kandagatla Subject: [PATCH 4/4] ASoC: qcom: sm8250: fix a typo in function name Date: Fri, 19 Apr 2024 16:01:40 +0100 Message-Id: <20240419150140.92527-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240419150140.92527-1-srinivas.kandagatla@linaro.org> References: <20240419150140.92527-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Message-ID-Hash: RQUZ6NERVU3DEQ2OLX422BPPRUYMEWB3 X-Message-ID-Hash: RQUZ6NERVU3DEQ2OLX422BPPRUYMEWB3 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,