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=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,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 38AA9C433E0 for ; Tue, 2 Jun 2020 15:16:48 +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 B826D20659 for ; Tue, 2 Jun 2020 15:16:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="ZwzllMz0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B826D20659 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de 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 50FC51615; Tue, 2 Jun 2020 17:15:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 50FC51615 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1591111006; bh=cCy8PmTFhbqrxD5Ows2EQLrQOX3kRGnKzXFxxvZFrSM=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ZwzllMz0bRkVx2lC1i4vze1sj1S17axlB/o/A+t6pqZbNPNQ2arsdmiy6vh/gjuUz nVCPQjXxdFhqEyHSu/HgSj8eJmL1JClj18RbikGa+Xg/LRnaxclb1CgUJTFkUX9dgY qw0K7QkVyg1S5KX0005F8wStxygrR54vMIV93pWo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BDF58F80260; Tue, 2 Jun 2020 17:15:55 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 51683F8026F; Tue, 2 Jun 2020 17:15:53 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EA788F800B8 for ; Tue, 2 Jun 2020 17:15:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EA788F800B8 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DE0F4AC50; Tue, 2 Jun 2020 15:15:49 +0000 (UTC) Date: Tue, 02 Jun 2020 17:15:47 +0200 Message-ID: From: Takashi Iwai To: Alexander Tsoy Subject: Re: [PATCH] Add duplex sound support for USB devices using implicit feedback In-Reply-To: <91ff53c08ddbb84ca0fcf9f16c86d890f8e06277.camel@tsoy.me> References: <2410739.SCZni40SNb@alpha-wolf> <6103f3aba91020ea345e9146da82e52823b7c298.camel@tsoy.me> <1674042.U9NR2fmVFg@alpha-wolf> <91ff53c08ddbb84ca0fcf9f16c86d890f8e06277.camel@tsoy.me> 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=UTF-8 Content-Transfer-Encoding: 8bit Cc: alsa-devel@alsa-project.org, Erwin Burema 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 Mon, 01 Jun 2020 18:37:38 +0200, Alexander Tsoy wrote: > > В Вс, 24/05/2020 в 10:37 +0200, Takashi Iwai пишет: > > On Sat, 23 May 2020 20:09:31 +0200, > > Erwin Burema wrote: > > > On zaterdag 23 mei 2020 19:53:49 CEST Alexander Tsoy wrote: > > > > В Вс, 10/05/2020 в 20:29 +0200, Erwin Burema пишет: > > > > > For USB sound devices using implicit feedback the endpoint used > > > > > for > > > > > this feedback should be able to be opened twice, once for > > > > > required > > > > > feedback and second time for audio data. This way these devices > > > > > can > > > > > be put in duplex audio mode. Since this only works if the > > > > > settings of > > > > > the endpoint don't change a check is included for this. > > > > > > > > > > This fixes bug 207023 ("MOTU M2 regression on duplex audio") > > > > > and > > > > > should also fix bug 103751 ("M-Audio Fast Track Ultra usb audio > > > > > device will not operate full-duplex") > > > > > > > > > > Signed-off-by: Erwin Burema > > > > > --- > > > > > > > > This patch seems to cause kernel panic on my system. This happens > > > > during boot when gdm (with pulseaudio) is starting up. > > > > > > > > > > That's interesting, not running gnome (and thus also not running > > > gdm, > > > currently KDE with SDDM) here so would need to take some time > > > troubleshooting. > > > Suspect I missed something in the check if both input and output > > > are similarly > > > configured. > > > > > > Will see if I can reproduce it and where exactly it goes wrong, in > > > the > > > meantime would it be possible to test if 5.6 or later show the same > > > issue > > > since I intially developed the patch against that release? > > > > Judging from the point triggering the bug (memset()), this can be a > > leftover URB handling that is performed even after the capture stream > > is closed. If so, the procedure would be: > > - start capture > > - start playback > > - stop capture while keeping playback running > > > > If my guess is correct, can the patch below work around the issue? > > Unfortunately, I can no longer reproduce kernel panic, so can't really > test this patch. That's interesting, because it was 100% reproducible > on my hw a week ago. It's a pity, but interesting. If so, it might be different from what I've though in the above, and we might need a different fix... Let me know if you can trigger the bug more or less reliably. thanks, Takashi