From patchwork Mon Jan 18 11:34:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 365560 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp88153jam; Mon, 18 Jan 2021 11:08:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCWPx4llGHn401FtkaFlUjdQfXTF6qJlCidrFHdI+ZNgmv3u7ZWAQWotnyj2Khf+bfZ7qJ X-Received: by 2002:a50:d888:: with SMTP id p8mr692351edj.147.1610996901034; Mon, 18 Jan 2021 11:08:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610996901; cv=none; d=google.com; s=arc-20160816; b=a7aE7ciNJo7Zag7zaVO2K8eI4PG3Ccl23gLRZ5Olkjc7ChgK14UQ0GBfis7psCVXFe G8+CqrxwNgZGd1n9vPFz/8lWYOpqrFWPg4xBvdwPcIkeASdIBEvIuaN/d1eTh8U8+UXX va0fsI8xF/qZmBfzu2DpKR0UM8qMOqG6X1LxPvCV11Cmcs1BeJTrFF+uMDfl2USDKRwZ Oicz7ghiOWzRkJuEZmIT9F/9ARe7ajU2GQQ8HjPOfH7sReLICC5cIk0/NEKuZ3QKYfBj dTkEYiRXX4xKtGx3IYFuLyEIkoeT0Y3QNvc/6L1kULktp55+xOGWXSrPB+fZO7AlO/OE K89w== 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=NPPD08xg8FRp9lbUP21Q6vz3W0UooDzDlwfs1kKuMOU=; b=im8qeRoBrvkhRwu77dl0Xim+UufWOypdtYOCd4JKd82VyCJ2kxMyla2RDEYf6yXvTp aKgqUACYhh0c8qnymYxy/ZaqHRSXgIh45yYvUd7aFQGyY+Km3wCww4nbAqn6c5qm8cWL +j6ZJTQrwwqZrx4YdqocO/sK6OCPqKSH60WFFthgIo8mNfZpcNm2PU0myIgGKzA00gP3 xI1CE1sibdA2/UnDk2ax5Z4l2+jHLNfV43jXIqhl2DTdA+xAtvrI4zs5hTd/irVntoUU BViTfW4t65ckwLvIXTtshDITkvupV7VOLBODzK3RsGDznhwsVYWsuK65PlXkmv1sGKrG HHTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="j/khJAy6"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lm1si1627347ejb.28.2021.01.18.11.08.20; Mon, 18 Jan 2021 11:08:21 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="j/khJAy6"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S2390543AbhARLja (ORCPT + 13 others); Mon, 18 Jan 2021 06:39:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:33436 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390538AbhARLj2 (ORCPT ); Mon, 18 Jan 2021 06:39:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5C1AB223DB; Mon, 18 Jan 2021 11:39:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610969952; bh=wVV3BCtfzIvXLkYXkqcyqAzDHYnCOQhOOdj/8U9rf2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j/khJAy677J6HQy6hNLp3P8i42DXytJxCw8cxbjJlbG/7E8bet8UhmIlJHZPx/Qeb /tNF8uMqjYcPFbLj9CEYbf9vzb1kuhOiEwrFnFw+SSNs4BljXEInIf8LHnUIZ7KecW ObaMpbWXU0b2tG8dFeICdmKi9QIACq9fsAr7F0vo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Charles Keepax , Jerome Brunet , Mark Brown Subject: [PATCH 5.4 51/76] ASoC: meson: axg-tdm-interface: fix loopback Date: Mon, 18 Jan 2021 12:34:51 +0100 Message-Id: <20210118113343.431409713@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210118113340.984217512@linuxfoundation.org> References: <20210118113340.984217512@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jerome Brunet commit 671ee4db952449acde126965bf76817a3159040d upstream. When the axg-tdm-interface was introduced, the backend DAI was marked as an endpoint when DPCM was walking the DAPM graph to find a its BE. It is no longer the case since this commit 8dd26dff00c0 ("ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks") Because of this, when DPCM finds a BE it does everything it needs on the DAIs but it won't power up the widgets between the FE and the BE if there is no actual endpoint after the BE. On meson-axg HWs, the loopback is a special DAI of the tdm-interface BE. It is only linked to the dummy codec since there no actual HW after it. >From the DAPM perspective, the DAI has no endpoint. Because of this, the TDM decoder, which is a widget between the FE and BE is not powered up. >From the user perspective, everything seems fine but no data is produced. Connecting the Loopback DAI to a dummy DAPM endpoint solves the problem. Fixes: 8dd26dff00c0 ("ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks") Cc: Charles Keepax Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20201217150812.3247405-1-jbrunet@baylibre.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/meson/axg-tdm-interface.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) --- a/sound/soc/meson/axg-tdm-interface.c +++ b/sound/soc/meson/axg-tdm-interface.c @@ -467,8 +467,20 @@ static int axg_tdm_iface_set_bias_level( return ret; } +static const struct snd_soc_dapm_widget axg_tdm_iface_dapm_widgets[] = { + SND_SOC_DAPM_SIGGEN("Playback Signal"), +}; + +static const struct snd_soc_dapm_route axg_tdm_iface_dapm_routes[] = { + { "Loopback", NULL, "Playback Signal" }, +}; + static const struct snd_soc_component_driver axg_tdm_iface_component_drv = { - .set_bias_level = axg_tdm_iface_set_bias_level, + .dapm_widgets = axg_tdm_iface_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(axg_tdm_iface_dapm_widgets), + .dapm_routes = axg_tdm_iface_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(axg_tdm_iface_dapm_routes), + .set_bias_level = axg_tdm_iface_set_bias_level, }; static const struct of_device_id axg_tdm_iface_of_match[] = {