From patchwork Wed Oct 19 08:27:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4692 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp213119wrs; Wed, 19 Oct 2022 02:09:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ZDLIts03qY+1RhlEH9HxjosVQv26QxQL5ubZNOrY8Mrajj6THljp3kRwizA4S+9PJCXNd X-Received: by 2002:a17:907:6288:b0:78d:ab30:c374 with SMTP id nd8-20020a170907628800b0078dab30c374mr5928144ejc.266.1666170554151; Wed, 19 Oct 2022 02:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170554; cv=none; d=google.com; s=arc-20160816; b=FCmAAl70a21fyto1SaI4Kk7E8FMLLmgLypSj/sSa89EyVT9irxWlMACI6xtY/3MwVP 6nWMn7Wxh2/Uos4YVwGDy36LKbzCWEnZCHOcl/RIGOSlsFaNcQPlapb7N/GgBf/pmEiX hwqZb/t15mOgJrICk66ATtiWdiS83CJqXRXhvIy+tcdyfGWo2aUmshGFZJN0HZOsVE0S rshG8E70kJcZlQXTOtYzj9MdcwMuHVgWe7EGRfOPnbHSqGXWW3MKwuqzhVp2ZER/Ts/T 5O1zkxpwnC/G7Df8jYbGWVe2ud3d5yjbnsyQpGbP+M/HIwz+JA9QzK8VMV3tXlqj0bs7 RjwA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z5-20020a056402274500b0045c13366de4si15580948edd.572.2022.10.19.02.08.48; Wed, 19 Oct 2022 02:09:14 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747106454860758276?= X-GMAIL-MSGID: =?utf-8?q?1747106454860758276?= 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; }