Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2475348pxb; Mon, 18 Jan 2021 20:28:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbLl0rhjXiVY+wURlF5eluD6vzIuU9fcywpgyiky1RReZtoATf0AF5/9YkXI2fh2MSYhxN X-Received: by 2002:a17:906:1712:: with SMTP id c18mr1816276eje.417.1611030494606; Mon, 18 Jan 2021 20:28:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611030494; cv=none; d=google.com; s=arc-20160816; b=vYjnjjX1Dw3i0PudZh9XoQe5DbsNwZnkIwffMOpwXaffTjQW/GPXb7RXAn2u82XsTd Zyzg+4VwgSPCuUmDKtzBRgu+3rOr+OcZnu80klLuW7h3QYdMU5i4rAzHeMMkL+DSlt4x ZfIiQ+ttcOGYOtp4lnOAjCDXfZD8mvQROKtCuFY7HF2MefqJQFdnpU+c7ag+g41P8mnP bWJo7MgW8t3T7T9I17SVDN4DuHQNfdZMx14Bg2UjZcf087BizmDpnqg390YwQzgbNTmO JbfKSEyXy+R6TuqoPNp/4Njf6kmOJf5Gd9RSBA0J+AZY7C5svfi7Wb0s1lSbBk8vXhBc Eo0g== 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=SZw0ug0QyZeS1jthGZIpG8+XCcYEUHNg7LjrdV9CD2nEnK7S1efD5GZCSns21uuDVH D++9QNLrg263gRJ35h3CWMy9vpn4lZlQUosuHnVf0KPco5yv8DkiigtIYqeunP6+ENmn 3Q0wbJw+vMswNYqpqvGV+Fw1MnjdjnAg3hSZ5iztYV5nLueKXjgiUa68L1LkrWMUt66j 3S8nJysddgtEwwxw48al2twPRv1rdVzIsW/Jd49+ejVe+PILWahauzbPI/Uk+oSwEP4l lGUc0parlfE/5ZMUqkh/iopb9RssS746b83DeAml1rFdsSIB5+UJYN0YR8I0qrqZTaZX Ixeg== 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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z13si1514913edc.537.2021.01.18.20.27.37; Mon, 18 Jan 2021 20:28:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2404741AbhAROLL (ORCPT + 99 others); Mon, 18 Jan 2021 09:11:11 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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[] = {