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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C3633C433F5 for ; Thu, 21 Apr 2022 16:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-reply-to: Date:Subject:Cc:To:From:References:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=E+JuUUFOm+mHah6l1No4rmoH9wXpHGwO0/iZqxRrxt8=; b=heWiwv79/pVScO F6XIKyb8A48b8jHSf/Ol58zUwTxnKqx+XUCgw5tAxV5NfW3viGIcjbM2b/0A6fiq8Kbe0Ay1mbtJ2 gJTSEH9P5Uig8mdJrzihTt//z1FSJ1jKjjCALyDTfBJUy1GD4pZeef84uoXv3ebAzDB7FosEYpc4n p2AinRjgLXf+1BkASkh4H5Nj7lLV/clsHiQjlyLFt+AjriakZQ8PcwpYDOJsMI9bE9eHb7IPL+JnH HHwYq89D4sJyXJ19BbRdDUpDFgScrZjB4spsuhwhpSF1DHC5hNHUw8jq052q0wbUJl5v02MMmvW2z URRHwf99ZC5yXVWqEs6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhZgD-00EEXW-BR; Thu, 21 Apr 2022 16:29:17 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhZg9-00EETn-0n for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 16:29:15 +0000 Received: by mail-wm1-x331.google.com with SMTP id p189so3522351wmp.3 for ; Thu, 21 Apr 2022 09:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=vrEs/2pEILP9d1ISDp34/8wtCsJViJ6D/+Hs3vTnWsI=; b=kiRnNazcdTuefZZxff/Lv7MqYKxC82ka2qvvv0JcQaQ5eXgb3C1Td1A6Yjqd9oSHjW cMbnQC3KtAdteb6sdIvj+QXOwx4ornXjnKbeU5vSxw0jCC17VrGZfmOrM4sXwlVVndEH JPAKQS8ZxSqC6VQv1Z9KYKx9e6oAIIg3+US9C7QWCuam4Z+S244I7ecKXVgyO9+PsZvW esjoVzMxM+KA87KPOtThU5FRSN9h4WqEZXzc7y2IlFAi9oejv6HKiIsgCkuGcnDbUzeV qWmJ6gqtGwT9I3hN8m64D4R4cyImSkG161BjeGoRFRYFJOzDk+XHe3yAisQDlDb7PhdY Xa9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=vrEs/2pEILP9d1ISDp34/8wtCsJViJ6D/+Hs3vTnWsI=; b=SGPNhVzL1jjdA64G/okqRCHSXlA9md9aqHcFg487Li1IGfnr9vnAL1ct/zbFu+iaB2 4sYqM77E3Q+lyS1zSuSFK4IzFkeSPAAnVcd6PIlpBG2z1xuN5ULqz1z61TY4bUwXchAG hhPk98Os75YpS5iDEVdQnZWB8eZPOoMbNSRY/bXEbC445i5+aX7cZ13rVVmW5w1RU5xB oKWFqcrjb3BLUPTEbovnau5/VFbXM4nDHkZyvOweOL3hPrdUVQ1noXtQ3Yku1R94SOu/ 7SfvKeEUDbaGyV29ZtsX1jPGgyEen9BXfI3LadJworhoe6ntJtmRM0HnQ8HstQGtn7zh eOKw== X-Gm-Message-State: AOAM532o+5KiiyGQDN1h9AeGmUAZ972xS4rP8GlARLHMPVQi57txHke3 SutPVyU6zMoVimMo31ppu8difQ== X-Google-Smtp-Source: ABdhPJyQaNKtS9rLLBu7H6jeDjbWV36SMhQuTvDDlstfthSmDE74vKvCmC4ESH0lxl25edccn/nitw== X-Received: by 2002:a05:600c:a06:b0:37b:fdd8:4f8 with SMTP id z6-20020a05600c0a0600b0037bfdd804f8mr9664089wmp.41.1650558550287; Thu, 21 Apr 2022 09:29:10 -0700 (PDT) Received: from localhost (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id bg20-20020a05600c3c9400b0037fa5c422c8sm2576235wmb.48.2022.04.21.09.29.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 09:29:09 -0700 (PDT) References: <20220421155725.2589089-1-narmstrong@baylibre.com> User-agent: mu4e 1.6.10; emacs 27.1 From: Jerome Brunet To: Neil Armstrong , broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Dmitry Shmidt Subject: Re: [PATCH 1/2] Revert "ASoC: meson: axg-tdm-interface: manage formatters in trigger" Date: Thu, 21 Apr 2022 18:17:02 +0200 In-reply-to: <20220421155725.2589089-1-narmstrong@baylibre.com> Message-ID: <1jwnfixuwc.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_092913_115171_B66488D2 X-CRM114-Status: GOOD ( 10.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu 21 Apr 2022 at 17:57, Neil Armstrong wrote: > This reverts commit bf5e4887eeddb48480568466536aa08ec7f179a5 because > the following and required commit e138233e56e9829e65b6293887063a1a3ccb2d68 > causes the following system crash when using audio: > BUG: sleeping function called from invalid context at kernel/locking/mutex.c:282 > > Reported-by: Dmitry Shmidt > Signed-off-by: Neil Armstrong For both: Acked-by: Jerome Brunet The main reason for the this was to be able to configure the start order between the DPCM Backend and Frontend. Only the trigger() callback has that capability for now. This HW require the BE to start before FE, otherwise channels get randomly shifted in the output stream if there is more than 2 slots on the link, mainly on the capture path. This HW require mutexes to handle the TDM formatters (because it uses the CCF API). This why I moved to non-atomic to use trigger(), forgetting that doing so would make period_elapsed() take a mutex from the IRQ ... :/ To properly fix this, I'll need to extend ASoC so the prepare() callback BE/FE call order can also be configured. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6C1ADC433EF for ; Thu, 21 Apr 2022 16:29:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-reply-to: Date:Subject:Cc:To:From:References:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/2wke/xHT1Zohgk8vvGpVjEgV4l2iWuq9+4RhG5hN9s=; b=oUaYaYokECyWyF EYOTHZ4zvKYb0jN7vADJRkDvPTUmTYc0HltXIHOHyCs+L7dq5FzkQMhMbK240w8FxUYK5aT+EFqDb jbDKtulyZSyeGeGo0p+9HWkmSNkWws8yF4OM1cC2ONioY+imn6h3QznCwld1ye3x/AtCDx97OmO1H bphFSu9Aj5BPW4Q4jYZsLYF4vNhen1qY1T6oBxLAvL3rKspZTaj+vCp4Jp30r9P3julYtk6S2eWIz EeXN6g710MSm6QVGqoxFLGQMvgkTOf0mSxj3MmANrNyEFouGV0Dp7+kFf+bbtRhS/g9/Usp6hOIFE gEQzCpzVxpz2YacJacrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhZgM-00EEaI-Uu; Thu, 21 Apr 2022 16:29:26 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhZg9-00EETm-R8 for linux-amlogic@lists.infradead.org; Thu, 21 Apr 2022 16:29:15 +0000 Received: by mail-wm1-x334.google.com with SMTP id q20so3532655wmq.1 for ; Thu, 21 Apr 2022 09:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=vrEs/2pEILP9d1ISDp34/8wtCsJViJ6D/+Hs3vTnWsI=; b=kiRnNazcdTuefZZxff/Lv7MqYKxC82ka2qvvv0JcQaQ5eXgb3C1Td1A6Yjqd9oSHjW cMbnQC3KtAdteb6sdIvj+QXOwx4ornXjnKbeU5vSxw0jCC17VrGZfmOrM4sXwlVVndEH JPAKQS8ZxSqC6VQv1Z9KYKx9e6oAIIg3+US9C7QWCuam4Z+S244I7ecKXVgyO9+PsZvW esjoVzMxM+KA87KPOtThU5FRSN9h4WqEZXzc7y2IlFAi9oejv6HKiIsgCkuGcnDbUzeV qWmJ6gqtGwT9I3hN8m64D4R4cyImSkG161BjeGoRFRYFJOzDk+XHe3yAisQDlDb7PhdY Xa9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=vrEs/2pEILP9d1ISDp34/8wtCsJViJ6D/+Hs3vTnWsI=; b=BLWdiyApK7EdO8xdxOuoQg1HEJ4zt1JNmMIgqZrQdyw2iPRIxNWRBehKKq2eVEWyN7 6nq4DTZC5WEEp0pnXbxLxIQxOOqHH6dP6T0jR7mAViFjERXlvqvRwTjOKA4t+HE8sjhR p6SayXxlPRKHk8HJFrzzYwafTjLj7uV0JyQocCwqs7Cx2WaR/8mrsb+73/V+tJWxcVqW s20+rsk1TFCikdMyCUTLBMjvEDI8dYuT4a9cT8Gm8PApvju4ZmeR5Ryb1BhkjHckaeYq WHyqxCMhW3FO1vNiQojhbC/IUhTgjRP2AIi6eL0pive9nHSfRstPsl7ubZYoFqYoaLEG KATw== X-Gm-Message-State: AOAM532uL6uVDF/S5WCEV2F+8SoWrsp4meNNN+vBS5aKFiKoan/rT9W5 mft76K5ntjxmaieVbDKBVMF8dw== X-Google-Smtp-Source: ABdhPJyQaNKtS9rLLBu7H6jeDjbWV36SMhQuTvDDlstfthSmDE74vKvCmC4ESH0lxl25edccn/nitw== X-Received: by 2002:a05:600c:a06:b0:37b:fdd8:4f8 with SMTP id z6-20020a05600c0a0600b0037bfdd804f8mr9664089wmp.41.1650558550287; Thu, 21 Apr 2022 09:29:10 -0700 (PDT) Received: from localhost (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id bg20-20020a05600c3c9400b0037fa5c422c8sm2576235wmb.48.2022.04.21.09.29.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 09:29:09 -0700 (PDT) References: <20220421155725.2589089-1-narmstrong@baylibre.com> User-agent: mu4e 1.6.10; emacs 27.1 From: Jerome Brunet To: Neil Armstrong , broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Dmitry Shmidt Subject: Re: [PATCH 1/2] Revert "ASoC: meson: axg-tdm-interface: manage formatters in trigger" Date: Thu, 21 Apr 2022 18:17:02 +0200 In-reply-to: <20220421155725.2589089-1-narmstrong@baylibre.com> Message-ID: <1jwnfixuwc.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_092913_934688_8F933BF7 X-CRM114-Status: UNSURE ( 8.69 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org On Thu 21 Apr 2022 at 17:57, Neil Armstrong wrote: > This reverts commit bf5e4887eeddb48480568466536aa08ec7f179a5 because > the following and required commit e138233e56e9829e65b6293887063a1a3ccb2d68 > causes the following system crash when using audio: > BUG: sleeping function called from invalid context at kernel/locking/mutex.c:282 > > Reported-by: Dmitry Shmidt > Signed-off-by: Neil Armstrong For both: Acked-by: Jerome Brunet The main reason for the this was to be able to configure the start order between the DPCM Backend and Frontend. Only the trigger() callback has that capability for now. This HW require the BE to start before FE, otherwise channels get randomly shifted in the output stream if there is more than 2 slots on the link, mainly on the capture path. This HW require mutexes to handle the TDM formatters (because it uses the CCF API). This why I moved to non-atomic to use trigger(), forgetting that doing so would make period_elapsed() take a mutex from the IRQ ... :/ To properly fix this, I'll need to extend ASoC so the prepare() callback BE/FE call order can also be configured. _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5EE7C433FE for ; Thu, 21 Apr 2022 16:31:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231872AbiDUQeB (ORCPT ); Thu, 21 Apr 2022 12:34:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbiDUQdn (ORCPT ); Thu, 21 Apr 2022 12:33:43 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B40B54990A for ; Thu, 21 Apr 2022 09:29:11 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id o20-20020a05600c511400b0038ebbbb2ad8so3788723wms.0 for ; Thu, 21 Apr 2022 09:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=vrEs/2pEILP9d1ISDp34/8wtCsJViJ6D/+Hs3vTnWsI=; b=kiRnNazcdTuefZZxff/Lv7MqYKxC82ka2qvvv0JcQaQ5eXgb3C1Td1A6Yjqd9oSHjW cMbnQC3KtAdteb6sdIvj+QXOwx4ornXjnKbeU5vSxw0jCC17VrGZfmOrM4sXwlVVndEH JPAKQS8ZxSqC6VQv1Z9KYKx9e6oAIIg3+US9C7QWCuam4Z+S244I7ecKXVgyO9+PsZvW esjoVzMxM+KA87KPOtThU5FRSN9h4WqEZXzc7y2IlFAi9oejv6HKiIsgCkuGcnDbUzeV qWmJ6gqtGwT9I3hN8m64D4R4cyImSkG161BjeGoRFRYFJOzDk+XHe3yAisQDlDb7PhdY Xa9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=vrEs/2pEILP9d1ISDp34/8wtCsJViJ6D/+Hs3vTnWsI=; b=GLGqAxitR+/xm/7/w6Hx8Gmt1XgykhTQCtFxgpHAgewYKIbTDPZ3FlSDSnbRtVFMmK RcDI1ZAHNFTR9hZCA2UW14GJfQsoOpVsenkzPTg84Qo8xhMv5tH5xIgNh/vg9hN6o+AP 95GFw/UDRCqYj9BXMUtWyvmVTeulkqaIzYYPlIxYiJVBA8G0sJkKPPSL8013GYyih/XE EB/7/2bF1L9eNs43WBj/cN9rcPaD4zhfj0ddGpg09ybyhBw9T+gQUHTt3A9n4Z+dnok7 KN/TT19gACoJiaGMrTpSfx0LViqmGuFjyeJX2lxk+W97oXG08mRGJlsv3Aab3/v9TWSH LKdw== X-Gm-Message-State: AOAM533jXD3QLRiAENsoSKQ3xWSJ8TT+MgnQFvk16TkQluuEfbGOTo7d OXz6qUHRWXQGwLIJBEz5xbKwyg== X-Google-Smtp-Source: ABdhPJyQaNKtS9rLLBu7H6jeDjbWV36SMhQuTvDDlstfthSmDE74vKvCmC4ESH0lxl25edccn/nitw== X-Received: by 2002:a05:600c:a06:b0:37b:fdd8:4f8 with SMTP id z6-20020a05600c0a0600b0037bfdd804f8mr9664089wmp.41.1650558550287; Thu, 21 Apr 2022 09:29:10 -0700 (PDT) Received: from localhost (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id bg20-20020a05600c3c9400b0037fa5c422c8sm2576235wmb.48.2022.04.21.09.29.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 09:29:09 -0700 (PDT) References: <20220421155725.2589089-1-narmstrong@baylibre.com> User-agent: mu4e 1.6.10; emacs 27.1 From: Jerome Brunet To: Neil Armstrong , broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Dmitry Shmidt Subject: Re: [PATCH 1/2] Revert "ASoC: meson: axg-tdm-interface: manage formatters in trigger" Date: Thu, 21 Apr 2022 18:17:02 +0200 In-reply-to: <20220421155725.2589089-1-narmstrong@baylibre.com> Message-ID: <1jwnfixuwc.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 21 Apr 2022 at 17:57, Neil Armstrong wrote: > This reverts commit bf5e4887eeddb48480568466536aa08ec7f179a5 because > the following and required commit e138233e56e9829e65b6293887063a1a3ccb2d68 > causes the following system crash when using audio: > BUG: sleeping function called from invalid context at kernel/locking/mutex.c:282 > > Reported-by: Dmitry Shmidt > Signed-off-by: Neil Armstrong For both: Acked-by: Jerome Brunet The main reason for the this was to be able to configure the start order between the DPCM Backend and Frontend. Only the trigger() callback has that capability for now. This HW require the BE to start before FE, otherwise channels get randomly shifted in the output stream if there is more than 2 slots on the link, mainly on the capture path. This HW require mutexes to handle the TDM formatters (because it uses the CCF API). This why I moved to non-atomic to use trigger(), forgetting that doing so would make period_elapsed() take a mutex from the IRQ ... :/ To properly fix this, I'll need to extend ASoC so the prepare() callback BE/FE call order can also be configured. 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3F4F1C433EF for ; Thu, 21 Apr 2022 16:30:14 +0000 (UTC) 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 DB4751654; Thu, 21 Apr 2022 18:29:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DB4751654 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1650558611; bh=GPA2eJSOAsJuxgsx3hYopaNOvAXCHZuUwk5FjjilgpI=; h=References:From:To:Subject:Date:In-reply-to:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=m/IUpXs+zQQV39FB1K/DA8+8kDkhR/kPnothS4ly+acaNrapbWIGbSFdUOtBmbQxF fyz/i7DGVOMeAcnBd4omdLlNsZbzReHXB5Yl187XkkqtWSY1ZOjqztPKIMypqqiMPa Q9XJsirhjysnwHxwf+8KgLJ1SEh6TxD7ihp0gNJo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7D686F80125; Thu, 21 Apr 2022 18:29:21 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 187DDF8032D; Thu, 21 Apr 2022 18:29:20 +0200 (CEST) Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 6E283F80125 for ; Thu, 21 Apr 2022 18:29:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6E283F80125 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="kiRnNazc" Received: by mail-wm1-x332.google.com with SMTP id bg25so2819171wmb.4 for ; Thu, 21 Apr 2022 09:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=vrEs/2pEILP9d1ISDp34/8wtCsJViJ6D/+Hs3vTnWsI=; b=kiRnNazcdTuefZZxff/Lv7MqYKxC82ka2qvvv0JcQaQ5eXgb3C1Td1A6Yjqd9oSHjW cMbnQC3KtAdteb6sdIvj+QXOwx4ornXjnKbeU5vSxw0jCC17VrGZfmOrM4sXwlVVndEH JPAKQS8ZxSqC6VQv1Z9KYKx9e6oAIIg3+US9C7QWCuam4Z+S244I7ecKXVgyO9+PsZvW esjoVzMxM+KA87KPOtThU5FRSN9h4WqEZXzc7y2IlFAi9oejv6HKiIsgCkuGcnDbUzeV qWmJ6gqtGwT9I3hN8m64D4R4cyImSkG161BjeGoRFRYFJOzDk+XHe3yAisQDlDb7PhdY Xa9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=vrEs/2pEILP9d1ISDp34/8wtCsJViJ6D/+Hs3vTnWsI=; b=Nz3+fdleVabpTaD/04hISTeip0keFemoN9EeUykOrIkYGxdxgVnksRiI6E9b7+GIp5 BK+wUOIFeDojyiCZ6NUm7/yDk6dyHXmTp7bVu9u0Xi0g12mMUfrlGRhPueZr0+t3xJGb cBwC1jokrRvpLPmMtX3IaB/bFr2qf87+n138OdJ8GTD8R1ve44E3qjhcMHeS0Kt65lqq 7IAxGECfHLmTfesONcsVJBHLARpaFUkM3c5oPYaw2O4NHxSYhN5NI8ysgSRlTyINFKsh ynOBNI/gAqPqWUmaApIgxqoONYjK+xePmB0iVxIgiMdTDeH3gcUHHsEpzXE36iEFp8+p SgMw== X-Gm-Message-State: AOAM531LS8YQP7Ouk62ZgfzRy97KsKdABVbNW+W8JFoIveVkZpbznqUy SyhOjd5vzch8kHIFSqEdvzJ8GA== X-Google-Smtp-Source: ABdhPJyQaNKtS9rLLBu7H6jeDjbWV36SMhQuTvDDlstfthSmDE74vKvCmC4ESH0lxl25edccn/nitw== X-Received: by 2002:a05:600c:a06:b0:37b:fdd8:4f8 with SMTP id z6-20020a05600c0a0600b0037bfdd804f8mr9664089wmp.41.1650558550287; Thu, 21 Apr 2022 09:29:10 -0700 (PDT) Received: from localhost (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id bg20-20020a05600c3c9400b0037fa5c422c8sm2576235wmb.48.2022.04.21.09.29.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 09:29:09 -0700 (PDT) References: <20220421155725.2589089-1-narmstrong@baylibre.com> User-agent: mu4e 1.6.10; emacs 27.1 From: Jerome Brunet To: Neil Armstrong , broonie@kernel.org Subject: Re: [PATCH 1/2] Revert "ASoC: meson: axg-tdm-interface: manage formatters in trigger" Date: Thu, 21 Apr 2022 18:17:02 +0200 In-reply-to: <20220421155725.2589089-1-narmstrong@baylibre.com> Message-ID: <1jwnfixuwc.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Cc: linux-amlogic@lists.infradead.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dmitry Shmidt 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 Thu 21 Apr 2022 at 17:57, Neil Armstrong wrote: > This reverts commit bf5e4887eeddb48480568466536aa08ec7f179a5 because > the following and required commit e138233e56e9829e65b6293887063a1a3ccb2d68 > causes the following system crash when using audio: > BUG: sleeping function called from invalid context at kernel/locking/mutex.c:282 > > Reported-by: Dmitry Shmidt > Signed-off-by: Neil Armstrong For both: Acked-by: Jerome Brunet The main reason for the this was to be able to configure the start order between the DPCM Backend and Frontend. Only the trigger() callback has that capability for now. This HW require the BE to start before FE, otherwise channels get randomly shifted in the output stream if there is more than 2 slots on the link, mainly on the capture path. This HW require mutexes to handle the TDM formatters (because it uses the CCF API). This why I moved to non-atomic to use trigger(), forgetting that doing so would make period_elapsed() take a mutex from the IRQ ... :/ To properly fix this, I'll need to extend ASoC so the prepare() callback BE/FE call order can also be configured.