From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B6A2C433E0 for ; Tue, 11 Aug 2020 11:04:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B1652076B for ; Tue, 11 Aug 2020 11:04:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gerhold.net header.i=@gerhold.net header.b="d+qdLXSB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728653AbgHKLEY (ORCPT ); Tue, 11 Aug 2020 07:04:24 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.52]:17993 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728448AbgHKLEY (ORCPT ); Tue, 11 Aug 2020 07:04:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1597143860; s=strato-dkim-0002; d=gerhold.net; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=zmGqtyvDjnPl9SF3eHck7clcf6r4U0VaDRO31hZb3o4=; b=d+qdLXSBv6QDhgBQVDigRdPZMhyqciRmS1qhnmw+3KSrfQhbqj41S15Tzcbmfu9zhc z/opV4OpNXZiDWO7J6b7tb3vbovk8gDdR0IRb4KZDSp3vD4VbRCS1eMFFypT9R493Z9o zezUEpNh4rMSqDJrk4ZOAPFts+eqDYYygZ1zFVU57CUN3IXpox4vfXP5u2SOJ9edDTlA A5x+mTLpriXUB93wmcmPWinlvS5RhZKW0ZTvH5w4hFzx5bfVQATOnxPakqY9MRTXInqB w2DCvbx1MMJPEVEUCMuNuTIBM2kHuZS3W7gpai+B7qay/yS7Z3w57oJ5YU5su5IVhBhJ UfCg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQ/OcYgojyw4j34+u26zEodhPgRDZ8j9IczHboo=" X-RZG-CLASS-ID: mo00 Received: from gerhold.net by smtp.strato.de (RZmta 46.10.5 DYNA|AUTH) with ESMTPSA id Y0939ew7BB4HjIj (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 11 Aug 2020 13:04:17 +0200 (CEST) Date: Tue, 11 Aug 2020 13:04:09 +0200 From: Stephan Gerhold To: Srinivas Kandagatla Cc: broonie@kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, tiwai@suse.com, john.stultz@linaro.org Subject: Re: [PATCH 1/2] ASoC: q6afe-dai: add dummy register read function Message-ID: <20200811110409.GA1481@gerhold.net> References: <20200811102552.26975-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200811102552.26975-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 11, 2020 at 11:25:51AM +0100, Srinivas Kandagatla wrote: > Most of the DAPM widgets for DSP ASoC components reuse reg field > of the widgets for its internal calculations, however these are not > real registers. So read/writes to these numbers are not really > valid. However ASoC core will read these registers to get default > state during startup. > Actually q6afe-dai does not seem to make use of the register number. The DAPM widgets all look like SND_SOC_DAPM_AIF_IN("HDMI_RX", NULL, 0, 0, 0, 0), /* (wname, stname, wchan, wreg, wshift, winvert) Wouldn't it be better to replace wreg = 0 with SND_SOC_NOPM in this case so the read/write won't happen at all? q6routing on the other hand does make use of wreg, so this would not work there... Also: If I remember correctly the ASoC core will also attempt to write to these "registers" when starting to play some audio, so you might also need to implement component->write(). Stephan From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD9E5C433E0 for ; Tue, 11 Aug 2020 11:05:21 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C5F02075D for ; Tue, 11 Aug 2020 11:05:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="oFFmXBBV"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gerhold.net header.i=@gerhold.net header.b="d5H6E6+x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C5F02075D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gerhold.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B23031614; Tue, 11 Aug 2020 13:04:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B23031614 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1597143919; bh=cCgrk9TPuvbYs4UoP/71ihEu3FGORv8rSn0s+PU8D50=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=oFFmXBBVDfuc7uLUJyi+w8Wnl61s3XFiQ559XW43gLjqQbRYhKmCQJOBtOJSUmhMT jDMS58JysYrAtb6ng3ojcBNm5uQ8sP1uIsrGAvlW2IJjoeQ82tYNAk36wa3MZzFUMc 4h4yRqdHtwfkrz0xKWWhUx9d+l05jWYnJFx2wer8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 40BD5F80118; Tue, 11 Aug 2020 13:04:29 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2587EF8014C; Tue, 11 Aug 2020 13:04:28 +0200 (CEST) Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [81.169.146.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CDEE4F800D3 for ; Tue, 11 Aug 2020 13:04:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CDEE4F800D3 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gerhold.net header.i=@gerhold.net header.b="d5H6E6+x" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1597143864; s=strato-dkim-0002; d=gerhold.net; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=zmGqtyvDjnPl9SF3eHck7clcf6r4U0VaDRO31hZb3o4=; b=d5H6E6+xioQHUWuGUTsAbtpplFjuk/+hDVSAQ4JaHLf8KvwniPaxjFdS3F0xrzes41 ECx3B0j/ky3R36bTH1dFMoCUVcf7063o9IYum5LRY6qRyF3rzIzudUXobJhl3eBYbZ4M oY/p2cxtyfo7UhgzP/i+FzW7SrHgrsd0ClFJGw6PQYNP7kmjdTTYXBi/aWJiTCS5RSUe kXXFnmeKh5YdF9/7rqEDJ9q5RsVKnr4iEo7MCQSqR/Yx6VOKYDq6hEytQ9b6nQpdPgrz 6Vxu6HSkB7m3akq/UWSwAcF5TebP237a0Im5PrmycmgyZ9sughF6CZuZRYeuPthqoDZp scRg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQ/OcYgojyw4j34+u26zEodhPgRDZ8j9IczHboo=" X-RZG-CLASS-ID: mo00 Received: from gerhold.net by smtp.strato.de (RZmta 46.10.5 DYNA|AUTH) with ESMTPSA id Y0939ew7BB4HjIj (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 11 Aug 2020 13:04:17 +0200 (CEST) Date: Tue, 11 Aug 2020 13:04:09 +0200 From: Stephan Gerhold To: Srinivas Kandagatla Subject: Re: [PATCH 1/2] ASoC: q6afe-dai: add dummy register read function Message-ID: <20200811110409.GA1481@gerhold.net> References: <20200811102552.26975-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200811102552.26975-1-srinivas.kandagatla@linaro.org> Cc: alsa-devel@alsa-project.org, lgirdwood@gmail.com, tiwai@suse.com, linux-kernel@vger.kernel.org, broonie@kernel.org, john.stultz@linaro.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Tue, Aug 11, 2020 at 11:25:51AM +0100, Srinivas Kandagatla wrote: > Most of the DAPM widgets for DSP ASoC components reuse reg field > of the widgets for its internal calculations, however these are not > real registers. So read/writes to these numbers are not really > valid. However ASoC core will read these registers to get default > state during startup. > Actually q6afe-dai does not seem to make use of the register number. The DAPM widgets all look like SND_SOC_DAPM_AIF_IN("HDMI_RX", NULL, 0, 0, 0, 0), /* (wname, stname, wchan, wreg, wshift, winvert) Wouldn't it be better to replace wreg = 0 with SND_SOC_NOPM in this case so the read/write won't happen at all? q6routing on the other hand does make use of wreg, so this would not work there... Also: If I remember correctly the ASoC core will also attempt to write to these "registers" when starting to play some audio, so you might also need to implement component->write(). Stephan