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 6C9CCC77B78 for ; Wed, 3 May 2023 16:11:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230498AbjECQLA (ORCPT ); Wed, 3 May 2023 12:11:00 -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 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