Received: by 2002:a05:622a:251a:b0:39a:b4a2:e86 with SMTP id cm26csp327360qtb; Wed, 19 Oct 2022 03:04:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6GfvuYRohY4n1FWfnBGvUehv0ImgkgjtF5jioeSmW23VpcPjGt9OlAPti159b9zyOX1v/5 X-Received: by 2002:aa7:c314:0:b0:458:dc90:467a with SMTP id l20-20020aa7c314000000b00458dc90467amr6398853edq.284.1666173884013; Wed, 19 Oct 2022 03:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666173884; cv=none; d=google.com; s=arc-20160816; b=YpEOK9BKTNm4EjAKqPwLYn4wjE1FGthFFb1cFeWqf3CWfFatbCfCmFJNUazDvepXW9 yEcuC9Ud5FMbtjcdzOvUYM2iPAxI5ecVM/ZQg7blgsT+Ci51f7jwZOZjmdrIfUZS6IaZ APyLPnumcY+nxKuC+2Dj05OFx7nFCb8YNOWn53QhnQ90mpF9qIhg5H0xtZnWFbEBFqsj VAUSHxZnnmEnfF/vLeni+kCmacMB9WKUuqMy1HkJlvCggQOD+TZOIVZHvplFAFTaKaFv iDj/SeWZZ8foXJAhJ3Wad48bTrzC5Ys/vQgKG4BRcEreThZlcdqEL6bbcg4jHlw7xGYU +wAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Bx+gVl9G8CLTUbn8ez1G2zqGSmu1HBhpGKAX6h3AONc=; b=sL6itoH7t/we5tfR2AfgViG7RBnhFA1VyzLZjdHN6SzyyLYiEij3VD3mIg8tcDL2MH dJAoH09vuT3bBoGd7H03cxgjC0XVTZflKX4Q5g/qm1ymXJvHtkuxv+fTPYpNbJnU8q/4 b3Y6sMdsebvtT5lAiUEtWUJd6CKc9RwDL7tHZUH6DdlXCW5KHN5Zw+xlU2zVzWor3QDf hd8I1WQQYj6qtm5irHR3VFJOF+5ykKO6qLByvWNlfdxQOnbJ7+YVBPMv1uyRyNiHuuHc zai7I1ZovtSnlWpN7BqpxXtYD0CrUDXL7xjeaf88Q3bk0i4TYi0/7X6Fpsq8soeGyVvK DbYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uIDRrTBr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e3-20020a17090658c300b00730936657d1si14724006ejs.552.2022.10.19.03.04.16; Wed, 19 Oct 2022 03:04:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uIDRrTBr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232347AbiJSJFg (ORCPT + 99 others); Wed, 19 Oct 2022 05:05:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232353AbiJSJEC (ORCPT ); Wed, 19 Oct 2022 05:04:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF98FA6C00; Wed, 19 Oct 2022 01:57:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EF49F61834; Wed, 19 Oct 2022 08:55:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E6CBC433D7; Wed, 19 Oct 2022 08:55:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169724; bh=hvGvUU9CEjWIrKx8lFqFQJsfFIqXXtdKrx+cM1+mxxM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uIDRrTBrWFdGav36awmYBbuhyUrBKHga2rkzBH6Zu72WB1ymOnym7KhFcktL9iTmt 78tTQjokZpchU6+i1AfnLsnsSCJV16TDNEU38NHF8dCs22coJvpkM//HLrQxdlHSJc F0TqUn4/lqPoOCTyRtJehqTKPRTsatvbquh4YI4o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, AngeloGioacchino Del Regno , Mark Brown , Sasha Levin Subject: [PATCH 6.0 385/862] ASoC: mediatek: mt8195-mt6359: Properly register sound card for SOF Date: Wed, 19 Oct 2022 10:27:52 +0200 Message-Id: <20221019083306.967386159@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: AngeloGioacchino Del Regno [ Upstream commit 64ec924c781ee846bd469be8d1d6bbed78c0f439 ] Adding a probe callback on this snd_soc_card is required when Sound Open Firmware support is desired, as we need to appropriately populate the stream_name for SOF to be able to bind widgets. Failing to do so will produce errors when applying the SOF topology leading to card registration failure (so, no sound). While at it, also make sure to fill the topology_shortname as required. Fixes: 0caf1120c583 ("ASoC: mediatek: mt8195: extract SOF common code") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220906092727.37324-2-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/mediatek/mt8195/mt8195-mt6359.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359.c b/sound/soc/mediatek/mt8195/mt8195-mt6359.c index c530e3fc27e4..961e769602d6 100644 --- a/sound/soc/mediatek/mt8195/mt8195-mt6359.c +++ b/sound/soc/mediatek/mt8195/mt8195-mt6359.c @@ -1383,7 +1383,13 @@ static int mt8195_mt6359_dev_probe(struct platform_device *pdev) sof_priv->num_streams = ARRAY_SIZE(g_sof_conn_streams); sof_priv->sof_dai_link_fixup = mt8195_dai_link_fixup; soc_card_data->sof_priv = sof_priv; + card->probe = mtk_sof_card_probe; card->late_probe = mtk_sof_card_late_probe; + if (!card->topology_shortname_created) { + snprintf(card->topology_shortname, 32, "sof-%s", card->name); + card->topology_shortname_created = true; + } + card->name = card->topology_shortname; sof_on = 1; } -- 2.35.1