From patchwork Tue Mar 17 15:12:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 193252 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=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT 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 64CCCC10F29 for ; Tue, 17 Mar 2020 15:15:34 +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 E0F8220714 for ; Tue, 17 Mar 2020 15:15:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="uBfoM5C1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WmxBBoG5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0F8220714 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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 2D4691750; Tue, 17 Mar 2020 16:14:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2D4691750 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1584458132; bh=lRFem7qQgAk+KJPqvOX4YqkMWp1hcYJxLSBbQ3Xzma0=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=uBfoM5C15nBieX655ZtCK9tRTibSv50Y2gG7ud7QaRLLqwS7kSrT9R+4luo8D9Iu3 nPmIb+c95ejGfjpAagV+gcztGsotHdEEt81mosvLk61KsIqkOvsNcc7SFDzr8Umd2S UYetB3dtDH1WT/Pr/a4a9B5HQh3k0mBMctqIY+iw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 578BCF80269; Tue, 17 Mar 2020 16:13:08 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7036CF800C0; Tue, 17 Mar 2020 16:12:59 +0100 (CET) Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B8DEDF80217 for ; Tue, 17 Mar 2020 16:12:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B8DEDF80217 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WmxBBoG5" Received: by mail-wm1-x343.google.com with SMTP id 25so21880676wmk.3 for ; Tue, 17 Mar 2020 08:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qSvV6OpvBf1rvB8ZBQIuOtC3wOEjkhtAfFvjmoSxpKM=; b=WmxBBoG5elQBlBCwz/IKHCH6X8PLjSl3o7xDvcMXnSYgcDH0kY8VRjtCj4hcRNV6A7 fk8jrU2lU4vRGuUNpGtbaCAEw5Mvk/hmhCOG/Hgy0Mjn4wCpCmTgXalHUGZqaFietR4i CjUlos6iU1ZwxhBrMZeQipNk22v/IRLWfubb5Yro3QO0ODAntEvNngOuRTlm0O/QjLYM s5mDVj5YXXSU3y9GQUmUlsGfv+p+qJb8OykUFdiwyat8H+1ysUWqrw8CgOE/3NtKS357 fPBQWxhTvv+j5ahpe5nauXfhZBCQO7sfepDmqjVpZXpz8Rd4aWEiZKb8VcCIjSRskYQf 9OGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qSvV6OpvBf1rvB8ZBQIuOtC3wOEjkhtAfFvjmoSxpKM=; b=dIxxfhZM029ZhH7kXZ2FxXnT4bS+Lir5QQwndiya5+J4w9Ayk5Kh+Ca7k0cnlWxsYx O6qG8NKaR1dJpjw2jm1V4kh42e4DnUwCbDmE4R5OpIF3u/H2KXgSkFMhGvFZCihMsNoC Vtm8AV5KFpqBfPKjFDgPUO8jav83VbCCVW1XC6RonSU/dpzqjBqZnr9uuN5388z6Kat0 Sww9cfNgfxUARx5Ynu8J1kxxmlI+geW6CWJXxerRA6bsRxoe372dVrAvH80+0V7nVVgB qbJgUiu3IHSC0N+c4HTBE3BqFfyEgdN4x9i4n/NcyJNAQbgO621t6PRxA8oz9a1eoKJ8 963g== X-Gm-Message-State: ANhLgQ09ZvowSVLZzdaL5q48Eca6QR3ABfHqWKFu5OMBQ5ZH0Iqw2Lul HL3Is1Egpuc53F7SWrVbuGbtpxEQA4I= X-Google-Smtp-Source: ADFU+vtqacOkLRon1SKHEZrSi/5Duy8tSRlCpBE1YWumTSvdeh3MQP9RyTMTg8QT2IBi3zf9JuGpng== X-Received: by 2002:a1c:8090:: with SMTP id b138mr5983445wmd.55.1584457969777; Tue, 17 Mar 2020 08:12:49 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id u8sm4711089wrn.69.2020.03.17.08.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Mar 2020 08:12:48 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Subject: [PATCH v2 0/2] ASoC: sdm845: fix soundwire stream handling Date: Tue, 17 Mar 2020 15:12:31 +0000 Message-Id: <20200317151233.8763-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, vkoul@kernel.org, Srinivas Kandagatla 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" Recent addition of SoundWire stream state-machine checks in linux-next have shown an existing issue with handling soundwire streams in codec drivers. In general soundwire stream prepare/enable/disable can be called from either codec/machine/controller driver. However calling it in codec driver means that if multiple instances(Left/Right speakers) of the same codec is connected to the same stream then it will endup calling stream prepare/enable/disable more than once. This will mess up the stream state-machine checks in the soundwire core. Moving this stream handling to machine driver would fix this issue and also allow board/platform specfic power sequencing. Changes since v1: - removed false error check while setting sruntime. Srinivas Kandagatla (2): ASoC: qcom: sdm845: handle soundwire stream ASoC: codecs: wsa881x: remove soundwire stream handling sound/soc/codecs/wsa881x.c | 44 +------------------------ sound/soc/qcom/Kconfig | 2 +- sound/soc/qcom/sdm845.c | 67 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 44 deletions(-)