From nobody Wed Feb 11 18:03:49 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1631EC77B7C for ; Fri, 5 May 2023 16:55:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231842AbjEEQzh (ORCPT ); Fri, 5 May 2023 12:55:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231716AbjEEQz3 (ORCPT ); Fri, 5 May 2023 12:55:29 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D46E1990C for ; Fri, 5 May 2023 09:55:28 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3077d134028so668153f8f.3 for ; Fri, 05 May 2023 09:55:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683305726; x=1685897726; 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=aF6c8vCGTR2QK7g+acfgalvT960Ey/zX9u4pUO/YPk4=; b=euW9BAvFE3t8iXyBsk24WqybtXMz1hn3/8p/p/SMWqG4ZV999cMBeAtF0afO96udkc hVHkCRO060nJyTif0EyCHr/FIioeqMhH15kXHq6m9gg/aW9nHWW+JjBgx/n/irJFyeNN RKrZaFDs+/5AbGQr6mKXRT0Z5OMw4Zr1jNERuUMH1OPOR9ojXB1+Sm6mzCi+bUyatuRs EPf0tthaARk1SxWI8TGPler1LKwustDq+QSfiN1fttlsMvqNMb6tzxQji395ttDYRqr9 5XOHQmWffE/Z8qnOCD/wNOawcOR1jJexdSnHTd0UGMxsPjZ4ZMa0r0bj0Ahbt5Nd836w G4Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683305726; x=1685897726; 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=aF6c8vCGTR2QK7g+acfgalvT960Ey/zX9u4pUO/YPk4=; b=CC3uFfZIeuOFEt7BM+Y58RRk+eX8vjzm2HIhUqvHIAAc6L2V7N+oKCkwYfDaUggeiO fPSCiQjfQt9uHhyv6JJ1RrDt4jqXG8NFEX7OE7Aw13RviDc5s2hefwzSQF+N5rBao9Zc Gira6L0dm2yXZNTiKchGinV4BgCBWNmOWEMCtvSmkMe22Up89SsOh1TIl1vJtrA4SgSs XtAzNoVcriLNcMAaydJ/Qty7OtTp6rGYeVpgVdB8StkrlONTKpNbEa2ciePOVrh9Vn4t URp/DagMBbHGP9psC0LxwPbCH2yW5jzk6hPjR6P0XCyD1UDJYp1DuvlysrChabKw6ATw 8g9w== X-Gm-Message-State: AC+VfDyCq2z8SBkF+CcN5B1354e2/3RzfI3yFGoyznouPz9eVhKLIjnr 3DKw5yNeiAyV3OasZWSzsGgdeg== X-Google-Smtp-Source: ACHHUZ4ZlBcgwrnBXnaGvQz3fDW5M2lcW+c3h6TrPi1wm2tp5F2+pVpr65y2y9ab/41UtPIf0A16/Q== X-Received: by 2002:a5d:48cc:0:b0:304:adbe:ea9d with SMTP id p12-20020a5d48cc000000b00304adbeea9dmr2018714wrs.30.1683305726481; Fri, 05 May 2023 09:55:26 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id x7-20020adfffc7000000b002c7066a6f77sm2923551wrs.31.2023.05.05.09.55.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 09:55:25 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, tiwai@suse.com Cc: perex@perex.cz, lgirdwood@gmail.com, ckeepax@opensource.cirrus.com, kuninori.morimoto.gx@renesas.com, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, Srinivas Kandagatla Subject: [PATCH 1/3] ALSA: pcm: add snd_pcm_add_chmap_ctls_with_prefix Date: Fri, 5 May 2023 17:55:12 +0100 Message-Id: <20230505165514.4666-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20230505165514.4666-1-srinivas.kandagatla@linaro.org> References: <20230505165514.4666-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" On Qualcomm SoC which has multiple Display Port controllers, using snd_pcm_add_chmap_ctls() to add chmap controls from every ASoC hdmi codec instance for a give card fails while adding second instance as the control with same name "Playback Channel Map" already exists from the first instanc= e. Fix this by adding a new api wrapper to pass ASoC component name prefix to avoid such duplicate control naming. Signed-off-by: Srinivas Kandagatla --- We can also make snd_pcm_add_chmap_ctls to take prefix argument and avoid a= dding this new api, but that would touch lots of drivers. include/sound/pcm.h | 7 +++++++ sound/core/pcm_lib.c | 30 ++++++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 27040b472a4f..39efd25b53e3 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -1528,6 +1528,13 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int = stream, unsigned long private_value, struct snd_pcm_chmap **info_ret); =20 +int snd_pcm_add_chmap_ctls_with_prefix(struct snd_pcm *pcm, int stream, + const struct snd_pcm_chmap_elem *chmap, + int max_channels, + unsigned long private_value, + struct snd_pcm_chmap **info_ret, + const char *prefix); + /** * pcm_format_to_bits - Strong-typed conversion of pcm_format to bitwise * @pcm_format: PCM format diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 8b6aeb8a78f7..ed75dd007425 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -2483,11 +2483,12 @@ static void pcm_chmap_ctl_private_free(struct snd_k= control *kcontrol) * Create channel-mapping control elements assigned to the given PCM strea= m(s). * Return: Zero if successful, or a negative error value. */ -int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream, +int snd_pcm_add_chmap_ctls_with_prefix(struct snd_pcm *pcm, int stream, const struct snd_pcm_chmap_elem *chmap, int max_channels, unsigned long private_value, - struct snd_pcm_chmap **info_ret) + struct snd_pcm_chmap **info_ret, + const char *prefix) { struct snd_pcm_chmap *info; struct snd_kcontrol_new knew =3D { @@ -2499,6 +2500,7 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int s= tream, .get =3D pcm_chmap_ctl_get, .tlv.c =3D pcm_chmap_ctl_tlv, }; + char *name =3D NULL; int err; =20 if (WARN_ON(pcm->streams[stream].chmap_kctl)) @@ -2514,10 +2516,21 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int= stream, knew.name =3D "Playback Channel Map"; else knew.name =3D "Capture Channel Map"; + + if (prefix) { + name =3D kasprintf(GFP_KERNEL, "%s %s", prefix, knew.name); + if (!name) { + kfree(info); + return -ENOMEM; + } + knew.name =3D name; + } + knew.device =3D pcm->device; knew.count =3D pcm->streams[stream].substream_count; knew.private_value =3D private_value; info->kctl =3D snd_ctl_new1(&knew, info); + kfree(name); if (!info->kctl) { kfree(info); return -ENOMEM; @@ -2530,5 +2543,18 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int = stream, if (info_ret) *info_ret =3D info; return 0; + +} +EXPORT_SYMBOL_GPL(snd_pcm_add_chmap_ctls_with_prefix); + +int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream, + const struct snd_pcm_chmap_elem *chmap, + int max_channels, + unsigned long private_value, + struct snd_pcm_chmap **info_ret) +{ + return snd_pcm_add_chmap_ctls_with_prefix(pcm, stream, chmap, + max_channels, private_value, + info_ret, NULL); } EXPORT_SYMBOL_GPL(snd_pcm_add_chmap_ctls); --=20 2.21.0 From nobody Wed Feb 11 18:03:49 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CF72C77B7C for ; Fri, 5 May 2023 16:55:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232007AbjEEQzl (ORCPT ); Fri, 5 May 2023 12:55:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231766AbjEEQza (ORCPT ); Fri, 5 May 2023 12:55:30 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 303C0191FE for ; Fri, 5 May 2023 09:55:29 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f19323259dso20553045e9.3 for ; Fri, 05 May 2023 09:55:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683305727; x=1685897727; 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=BWd518ZVELbkPHYlOpmIJ7g/bmO3wYl7PpJavDJwK68=; b=c7fc4Z+RIAPUqsAFPp2G67pOYWK2PNIVlPcMURVWulSHwlGlmDQWWy0GUszI9vSQTf QhmlUVo9atPB+0/8hRcNFa+61TSG1KufgBpDfcRaQEwNBN13JRfCqcuhKWOliVO8wTMA nfaSDwNkKDXqGGCcI0qtz5ub3c7pGgudH2DAlirxI9mtkN81mD61o1IuiNzs1mvS9B2H l0E++3fyliRVDdn+P+ldd4IgGL6kGUYSry1U75OwRrCZiwTedjUdoe5DTME+tIIqJlEd n/RivTlWxyTDV3TFwQUalnUIA8lcqAylU2E2uAKhaBNGNelN80diIUsq3Drzcp4mXxiW Hwkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683305727; x=1685897727; 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=BWd518ZVELbkPHYlOpmIJ7g/bmO3wYl7PpJavDJwK68=; b=QVV2C3DYL/vQ83bcKc0hfRBO1+QlR7KyGshtuDkF4C9Xv+/1xXX+/XlUcDYM9TjMRS /VMu7VfPpSkIs/VCHPWCaFwmoZbQA7DLakfw6qaAfU9TzYo09ldNjNAeF51ULy14/0YT CTU5Dr3QyazGDs2nP914m53+RSQBF6SvkZVLEyK8m8WxZplGFfCNX3ry4hIpGEdfBD5N ixFzT4cq5DcLGt7ZREstFjEi3Kd75fa1Sr3XZlBAG5GAt98OjHjKeVFJH42myjNriq3t sauxA4o8W2xgR5wl/w4k9CVZzaqm1nvDkNMrAQ43LZLjm2wcqzt2yGFrQyZ72N/YjPav 1wvg== X-Gm-Message-State: AC+VfDwHv6tGpTwheWHv8HXeZwxxuUbrL6kRdfQYh8WvpufU5/Y4F4Yi USyy41VJzOHNBCDMnjPNprIMHQ== X-Google-Smtp-Source: ACHHUZ4fK6zbNXMaQt+c/2yHsoyXsoSqwsYxy1PcYMyflrt5ETa+uP3MLXHfFWP0GrIrSYDQ3NK05A== X-Received: by 2002:a05:600c:21cf:b0:3f1:6757:6245 with SMTP id x15-20020a05600c21cf00b003f167576245mr1688995wmj.7.1683305727569; Fri, 05 May 2023 09:55:27 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id x7-20020adfffc7000000b002c7066a6f77sm2923551wrs.31.2023.05.05.09.55.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 09:55:26 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, tiwai@suse.com Cc: perex@perex.cz, lgirdwood@gmail.com, ckeepax@opensource.cirrus.com, kuninori.morimoto.gx@renesas.com, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, Srinivas Kandagatla Subject: [PATCH 2/3] ASoC: hdmi-codec: use snd_pcm_add_chmap_ctls_with_prefix to add controls Date: Fri, 5 May 2023 17:55:13 +0100 Message-Id: <20230505165514.4666-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20230505165514.4666-1-srinivas.kandagatla@linaro.org> References: <20230505165514.4666-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" If there are multiple instances of this codec in a sound card snd_pcm_add_chmap_ctls() will fail with below error because of duplicate control names. snd-sc8280xp sound: control 3:16:0:Playback Channel Map:0 is already present hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_pcm_dai_ne= w on i2s-hifi: -16 Fix this by using snd_pcm_add_chmap_ctls_with_prefix along wth component name prefix. This issue is noticed on x13s laptop which has multiple instances of Displa= yport. Signed-off-by: Srinivas Kandagatla --- sound/soc/codecs/hdmi-codec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index 6d980fbc4207..8c54cddf86b6 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -782,9 +782,10 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runti= me *rtd, unsigned int i; int ret; =20 - ret =3D snd_pcm_add_chmap_ctls(rtd->pcm, SNDRV_PCM_STREAM_PLAYBACK, - NULL, drv->playback.channels_max, 0, - &hcp->chmap_info); + ret =3D snd_pcm_add_chmap_ctls_with_prefix(rtd->pcm, SNDRV_PCM_STREAM_PL= AYBACK, + NULL, drv->playback.channels_max, 0, + &hcp->chmap_info, + dai->component->name_prefix); if (ret < 0) return ret; =20 --=20 2.21.0 From nobody Wed Feb 11 18:03:49 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E227AC77B7C for ; Fri, 5 May 2023 16:55:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232042AbjEEQzq (ORCPT ); Fri, 5 May 2023 12:55:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231784AbjEEQzb (ORCPT ); Fri, 5 May 2023 12:55:31 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 451F019427 for ; Fri, 5 May 2023 09:55:30 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f19afc4f60so14028145e9.1 for ; Fri, 05 May 2023 09:55:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683305729; x=1685897729; 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=t5FjLfR0dXo5At1Nv29Yy33iCFfTFuwOYzh/k0tPY30=; b=h2kiVF0IAYWJVzk/aTOE5lG4mTWGCGqOzz7oqa1cEibfLFqfpXftD8+mXnGJ3ooHWS IwiU2xbAuSOG3BBfRsosNxzd4xmRAxRlZnnj7z66A4FlImtmpVtzl+qhgP/a0TD+xOuc gzHQOwfxqt7hnrRj/4968rJ4XQInsT/bGviRbiJxa6lp6iaAdaZ8mJ+Xc10i/71jTNxw iyisfDrfM94Dy5OW+1LNsZcF/d25rSUTrEdMMQgbqG88q+wtQywmWXOHlqspJuzDXXuw qqVm0we6aasVZV9JEcU00Wy5O5IMDJyTVGI8+ENgD0q5Nlwi3MfJBiUkBan3NJwXnfxO quww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683305729; x=1685897729; 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=t5FjLfR0dXo5At1Nv29Yy33iCFfTFuwOYzh/k0tPY30=; b=TlAQQqgizT3josF6SPhQ/LFjkmRSqDQ+IwPXD9SXzL39MS6b9yPrdghgEVWvCKQdlm nY3E/cVG/LIn1ACMWImnM5I+ontgVGMFD84g42IcBuIohndzmrgVmUpiZMYCCHs3JyeT 9Dm4WNfOocI0dKv88b7qhIZE9DerKWK138yoSq0oprnVnileozW8Zn61hmyea2o/1fgu SFzJ+ENFGMem2GU2pPeX57xF/TIHIByOkicy1ZXxcJYbOvvrgcvK2pu+qshyN2MSHDCw vE6x4cBe2Evlg2yIICI3BrbHfZHvM8bjIW2C/rW3X3lGT6o8WaEZ7mBDbGsfve+V3C6G +nfw== X-Gm-Message-State: AC+VfDykzGH50v/1Vyz6d3/TYGeeEAHIEHlr/3h+i/nv+IfPp/WDqZeL RlnTjP/A5Zbmi91yQt9wtvXftA== X-Google-Smtp-Source: ACHHUZ60mo9CYfuAJyu07wBUOWWLk7kW4NKYDEp4m79W50XgNcx+2nLVG5HKWdgdYDrfhhambBQ6rg== X-Received: by 2002:a7b:c7d3:0:b0:3f0:683d:224d with SMTP id z19-20020a7bc7d3000000b003f0683d224dmr1768579wmk.9.1683305728751; Fri, 05 May 2023 09:55:28 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id x7-20020adfffc7000000b002c7066a6f77sm2923551wrs.31.2023.05.05.09.55.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 09:55:28 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, tiwai@suse.com Cc: perex@perex.cz, lgirdwood@gmail.com, ckeepax@opensource.cirrus.com, kuninori.morimoto.gx@renesas.com, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, Srinivas Kandagatla Subject: [PATCH 3/3] ASoC: hdmi-codec: use snd_soc_cnew to add controls Date: Fri, 5 May 2023 17:55:14 +0100 Message-Id: <20230505165514.4666-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20230505165514.4666-1-srinivas.kandagatla@linaro.org> References: <20230505165514.4666-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" If there are multiple instances of this codec in a sound card using snd_ctl= _new1 will fail with below error because of duplicate control names. snd-sc8280xp sound: control 3:16:0:IEC958 Playback Mask:0 is already present hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_pcm_dai_ne= w on i2s-hifi: -16 Fix this by using snd_soc_cnew along with component name prefix to avoid this duplication. This issue is noticed on x13s laptop which has multiple instances of Displa= yport. Signed-off-by: Srinivas Kandagatla --- sound/soc/codecs/hdmi-codec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index 8c54cddf86b6..48d1eef9c806 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -801,7 +801,8 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtim= e *rtd, struct snd_kcontrol *kctl; =20 /* add ELD ctl with the device number corresponding to the PCM stream */ - kctl =3D snd_ctl_new1(&hdmi_codec_controls[i], dai->component); + kctl =3D snd_soc_cnew(&hdmi_codec_controls[i], dai->component, NULL, + dai->component->name_prefix); if (!kctl) return -ENOMEM; =20 --=20 2.21.0