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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 12291C4332D for ; Tue, 22 Dec 2020 14:16:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C584C2313F for ; Tue, 22 Dec 2020 14:16:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727483AbgLVOP7 (ORCPT ); Tue, 22 Dec 2020 09:15:59 -0500 Received: from mx2.suse.de ([195.135.220.15]:52494 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727310AbgLVOP7 (ORCPT ); Tue, 22 Dec 2020 09:15:59 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C36D4B74C; Tue, 22 Dec 2020 14:15:17 +0000 (UTC) Date: Tue, 22 Dec 2020 15:15:17 +0100 Message-ID: From: Takashi Iwai To: Ravulapati Vishnu vardhan rao Cc: , Liam Girdwood , Mark Brown , Jaroslav Kysela , "Takashi Iwai" , Akshu Agrawal , Dan Carpenter , Vijendar Mukunda , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: Re: [PATCH] ASoC: amd:Replacing MSI with Legacy IRQ model In-Reply-To: <20201222115929.11222-1-Vishnuvardhanrao.Ravulapati@amd.com> References: <20201222115929.11222-1-Vishnuvardhanrao.Ravulapati@amd.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 22 Dec 2020 12:59:18 +0100, Ravulapati Vishnu vardhan rao wrote: > > When we try to play and capture simultaneously we see that > interrupts are genrated but our handler is not being acknowledged, > After investigating further more in detail on this issue we found > that IRQ delivery via MSI from the ACP IP is unreliable and so sometimes > interrupt generated will not be acknowledged so MSI model shouldn't be used > and using legacy IRQs will resolve interrupt handling issue. > > This patch replaces MSI interrupt handling with legacy IRQ model. > > Issue can be reproduced easily by running below python script: > > import subprocess > import time > import threading > > def do2(): > cmd = 'aplay -f dat -D hw:2,1 /dev/zero -d 1' > subprocess.call(cmd, stdin=subprocess.PIPE, > stderr=subprocess.PIPE, shell=True) > print('Play Done') > > def run(): > for i in range(1000): > do2() > > def do(i): > cmd = 'arecord -f dat -D hw:2,2 /dev/null -d 1' > subprocess.call(cmd, stdout=subprocess.PIPE, > stderr=subprocess.PIPE, shell=True) > print(datetime.datetime.now(), i) > > t = threading.Thread(target=run) > t.start() > for i in range(1000): > do(i) > > t.join() > > After applying this patch issue is resolved. > > Signed-off-by: Ravulapati Vishnu vardhan rao Is this specific to Raven, i.e. Renoir doesn't need the same fix? If so, it should be mentioned in the patch description. thanks, Takashi