Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1035676rwr; Wed, 3 May 2023 09:20:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6LhWkpo2xwvw0yRrOJz+UH7ueOp+wyXLXyFKi+nCLlWWXP+58MuX8OY0NNjYvtO78LXw4a X-Received: by 2002:a17:902:ecc7:b0:1a0:53ba:ff1f with SMTP id a7-20020a170902ecc700b001a053baff1fmr8056453plh.0.1683130828608; Wed, 03 May 2023 09:20:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683130828; cv=none; d=google.com; s=arc-20160816; b=rf2+b9MUs9dDn1P93i1ChvxYUeaXvKctLuLQUBJ7oG5g3cmEMJiqT4VvXF/vM6SqVR ibw+D5A0ZyCebXnqOJ9QED8oL9dshlxvD2+bANLA56P33OhaMll4DGF9AxkDnCLysERK oLFwgcBQj1agtLqvokfpFWZzzgUTAgX7KmLT8V2DOqdw/LxvcW31uGs0fr6h3Kbk6IuE R+Bx56rCO618Zt40f0QQUht9WXDE6eVbw0FkmZ03N6l4jaQrF4JkI2rGgk8/IZG7t7bW 0bIDhG6KNWSiQuABcZOEtZ+HqDH5VURzp5sPG0l6TZCMJdOX2MB7K9Fy6FafdJK3D6YV fmEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=TnCya75sRUhQpUzbtpvjYrIjYkQFYHaB1ZVmZiFKq5M=; b=gLCL4dVyL+nTk1azJOtF8CXekBH+UumsKtwsom8JDG4OhEw7Ga4fy2OgHgnXbdfVkY AXh1qywga4kfABsiuL2hxg3P91wfZPQ/naj9ZA7J+vCRHZMSd+hcTfBZfqBzmnTxjBhq Yd+Tx+juh78edM5Tmp0KFt9IucsGLlajGNGizEieFwZRnRIchxZWcpVIY1r8II6YUOBa ETyc+8HEfEn1CrChmS0eMaf7c1K7vG5tNrxPhqvqX3RaLGb6LHvZtJUb3SIIXxDNZzEf TujMoJqKWAOaMwG13vK6pGD0wNsKJ64m0rjndfi3v/ApuDH9rI6fSzvTOyPF/zswmXoN iTrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=pGGUO647; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bo13-20020a17090b090d00b0024e22853a90si4886062pjb.170.2023.05.03.09.19.47; Wed, 03 May 2023 09:20:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=pGGUO647; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230425AbjECQK7 (ORCPT + 99 others); Wed, 3 May 2023 12:10:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230367AbjECQK5 (ORCPT ); Wed, 3 May 2023 12:10:57 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE3435598 for ; Wed, 3 May 2023 09:10:44 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 79CDE20523; Wed, 3 May 2023 16:10:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683130243; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TnCya75sRUhQpUzbtpvjYrIjYkQFYHaB1ZVmZiFKq5M=; b=pGGUO64796gWKcPumbiplfH5y8f1p6xJn2q8eBbBx+Kr1raue4vuSM1jbtYS/lhk/A7bL0 bXQKgO8MiILv7DHHTpUGd7M638/SndTPtiPoXQGnv2oO3DaFHCyjzKggGDjNiSQZURjlYb MkfR6K2EZbgS9v/yE+4IeHfL62cicjc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683130243; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TnCya75sRUhQpUzbtpvjYrIjYkQFYHaB1ZVmZiFKq5M=; b=xV8AFgh0Mk01Q8ueRBoWFyLyqJc7zWIJfgbgGPyJl6H7JJmQLwfRtrOPmR5NYXhDQAdLKJ K421JIjeKkKZ1dCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5177013584; Wed, 3 May 2023 16:10:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id JUHrEoOHUmTCfAAAMHmgww (envelope-from ); Wed, 03 May 2023 16:10:43 +0000 Date: Wed, 03 May 2023 18:10:42 +0200 Message-ID: <87wn1pmm4d.wl-tiwai@suse.de> From: Takashi Iwai To: Oswald Buddenhagen Cc: Jeff Chua , lkml , Bagas Sanjaya , Takashi Iwai Subject: Re: linux-6.4 alsa sound broken In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 01 May 2023 09:17:20 +0200, Oswald Buddenhagen wrote: > > On Mon, May 01, 2023 at 11:59:12AM +0800, Jeff Chua wrote: > > Latest git pull from Linus's tree ... playing a simple sound file will > > resulted in a lot of echo. > > > how _exactly_ does it sound? > have you recorded a file through loopback for us to investigate? best > would be a short sample of a clean wave (sine or sawtooth) with some > leading and trailing silence. > > > Running on Lenovo X1 with .. > > 00:1f.3 Audio device: Intel Corporation Alder Lake PCH-P High > > Definition Audio Controller (rev 01) > > > > I've bisected and reverted the following patch fixed the problem. > > > this seems weird. so my first thought is: are you _sure_ that your > bisect isn't "contaminated" somehow? is the effect consistent across > several reboots with the same build? does re-applying my patch > immediately re-introduce the problem? > > - this code is about silencing. getting dropouts or no playback at all > would be plausible, while echo (that is, repetition) seems surprising. > theoretically, the driver may be setting a bad fill_silence() > callback which copies some garbage instead of zeroing, but the HDA > driver doesn't set one at all (i.e., uses the default one). > - this code must be explicitly enabled, which for all i know is done > by almost nothing. what players did you try? did you get consistent > results? did you try taking out audio servers from the equation? > - the affected hardware belongs to the extremely widely used HDA > family, which at the layer the patch is even remotely connected with > is completely standardized. so _a lot_ of people should be affected, > and we should be getting reports like yours by the dozen. are we? > > of course i can't exclude the possibility that my patch is affected by > an uninitialized variable or memory corruption (or in the worst case > causes it), which would of course have very hard to predict > effects. but that should be investigated properly instead of just > reverting, lest we might be papering over a much more serious problem. Oswald, this looks like a real regression by the patch. Specially, this happens with dmix, and the issue doesn't seem specific to the driver. It happens also with USB-audio, not only with HD-audio. Just aplay /usr/share/sounds/alsa/Side_Left.wav or whatever there with the dmix config showed the problem. The dmix uses the silence_size=boundary as a fill-all operation, and it's a free-wheel mode, so supposedly something was overlooked in your code refactoring. Could you check it and address quickly? I'd like to fix it before 6.4-rc1 release, so if no fix comes up in a couple of days, I'll have to revert the change for 6.4-rc1. thanks, Takashi