From patchwork Mon Jan 18 11:34:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 365540 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp2942jap; Mon, 18 Jan 2021 06:19:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwt9vJif6sG5ikgt1GyJpsC2JW8PivNsgnLBQttekDPgGsL3z5H1H9LsInzWbY52qbH0FSU X-Received: by 2002:a17:906:eb12:: with SMTP id mb18mr16648261ejb.257.1610979593630; Mon, 18 Jan 2021 06:19:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610979593; cv=none; d=google.com; s=arc-20160816; b=yLMI8bravXiVGWBgRtiPccYOVKl0RC+iGzzsp62aTDKc38ARCYy3RzKMQvu92gDHgV 1+d16wLZ0S9XN72k9gAE9c8XJqN8Lp5D+RNYon+5Cc3eegl1NRTlJvYmvuO9AzfNTtC0 n7/ZanfG0hQUL7MCG6WfRVoVAGbZkR6PN3LbjVirz/NsPT80ZxJ9VO8nR3Jn96ibv8lM 3xbgG+jH5cYNueIfnHX656Fncwvnp0Hgl4rzop+ZephFuWayKSTH+fN/Bg0OvTLFhDeP e2+2FrRs9kq69rBxgbrMFK/l9BLyRNVtxoIxTztRP5p6kI8o6ReEPuQHY7eY1BLkXtwW bg1A== 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=Uglm2CsJyJ/ur7DrCB/MwDEPCUr4bD15/Hm2Eb2ewoH8rIoJZ0aY7goiPV+O0Mx2/L mUK7gZonbRTUVukeHeAxml7LIRqmArlHxI7z7zE7bQRwQnXALqbrF07XY2GJNYAWZch1 4+OoPT8o+o4pYp6e8HXQqceNCnf1pGthEya9WswWcRHyK+LozHzSOaRjl4Yy39aXueHA qK8EZrn+XeJb232pXW+aihohIuOgkkIVnRV+1yPs74tgfDTT70QFY1ahK99+xJluzNt0 UvzaKUviMvEp2TSzD+TeltV7buDn8Mpr2wrY7Ivchz+Uk6NhJpmfdKApGZXkn2UAlbYv hlmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yT56D7Mp; 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 bh14si7264505ejb.45.2021.01.18.06.19.53; Mon, 18 Jan 2021 06:19:53 -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=yT56D7Mp; 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 S2390590AbhAROKR (ORCPT + 13 others); Mon, 18 Jan 2021 09:10:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:39830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390581AbhARLpR (ORCPT ); Mon, 18 Jan 2021 06:45:17 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B457B224B0; Mon, 18 Jan 2021 11:44:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610970281; bh=wVV3BCtfzIvXLkYXkqcyqAzDHYnCOQhOOdj/8U9rf2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yT56D7MpkZHy+6x+e2+zWY0JSTwrJSb52BmvqsFVsiottqV0weQBKfiUmRjKe3RPm vnVM6BHVN9QDzcfqV73sx6DjV22ZP+p6wGjOJFZIG8oArCf8j1N/u6zayhLwquhOyc D0VrMJqd4zHDtEfQJSLT7fygQf1bgsE/MgGu24Qc= 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.10 114/152] ASoC: meson: axg-tdm-interface: fix loopback Date: Mon, 18 Jan 2021 12:34:49 +0100 Message-Id: <20210118113358.194868207@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210118113352.764293297@linuxfoundation.org> References: <20210118113352.764293297@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[] = {