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 34919C433F5 for ; Thu, 29 Sep 2022 09:39:52 +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 EAE95846; Thu, 29 Sep 2022 11:39:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EAE95846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1664444391; bh=RtRv/rkQ/6umPfMGjbcpbybAEf60DvjIjLr1IuvLmq8=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RDAgvGlwmU1Kf/Yvq93JCB9HWSecyVpGDCyR7BYzuz/ApbDRuzeC/cMdbINDuKUhc zzgcehFD4ZZUQ0tuqPS4BvhR+GkVCFtZPRUUbFWywrCxb7pac9mvmywq9gWTKZPCVL gJ6XEkad6x0946IBvlay1V30Y2ygvDfElg3V2RBg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 78736F8016D; Thu, 29 Sep 2022 11:39:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5A63EF8023A; Thu, 29 Sep 2022 11:38:59 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) (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 D7602F80109 for ; Thu, 29 Sep 2022 11:38:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D7602F80109 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="zV4Jc4N5"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="U7cH9/ZQ" 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-out1.suse.de (Postfix) with ESMTPS id 547A221E53; Thu, 29 Sep 2022 09:38:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1664444336; 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=jHNjHwNhLr6putWTALtOmPGpZYE6MAPvEerSU3xYtkc=; b=zV4Jc4N5rruhv+BGtL1YfYkz5zV53w/OcO9vrHmYyoAl+ssmfJRMwidQvNzdRNk+BP3v59 nUEyKP+0iIB0m168oZ3QleKrXlprLwdF3Ftane2iUPLHofzWxiSRbadCGdsBsw+uLcOQcd rDX4PGbgH1ALKOpR47wkf3Wj0RJMlA0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1664444336; 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=jHNjHwNhLr6putWTALtOmPGpZYE6MAPvEerSU3xYtkc=; b=U7cH9/ZQLuaiCDBRD3ln3OTRVP8h5jW839Z/xFH5KZTFmjAztoToiRd/gMcSWzRpF5/4e6 g1RmG5gCzg1XSqDw== 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 3F66C1348E; Thu, 29 Sep 2022 09:38:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +om8DrBnNWOOOwAAMHmgww (envelope-from ); Thu, 29 Sep 2022 09:38:56 +0000 Date: Thu, 29 Sep 2022 11:38:55 +0200 Message-ID: <87h70q8qq8.wl-tiwai@suse.de> From: Takashi Iwai To: Hans de Goede Subject: Re: Sound broken (first couple of seconds play looping) on Sony Vaio VPX11S1E (HDA, ALC262) In-Reply-To: References: <3e8697e1-87c6-7a7b-d2e8-b21f1d2f181b@redhat.com> <87y1uqbfmo.wl-tiwai@suse.de> <87tu5ebdc8.wl-tiwai@suse.de> <61bd7097-afac-5a2d-46a2-aada444a890c@redhat.com> <87y1u290cv.wl-tiwai@suse.de> 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 Cc: "alsa-devel@alsa-project.org" 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, 29 Sep 2022 11:05:47 +0200, Hans de Goede wrote: > > Hi, > > On 9/29/22 08:10, Takashi Iwai wrote: > > On Wed, 28 Sep 2022 18:33:55 +0200, > > Hans de Goede wrote: > >> > >> Hi, > >> > >> On 9/11/22 09:05, Takashi Iwai wrote: > >>> On Sun, 11 Sep 2022 08:15:59 +0200, > >>> Takashi Iwai wrote: > >>>> > >>>> On Sat, 10 Sep 2022 19:52:36 +0200, > >>>> Hans de Goede wrote: > >>>>> > >>>>> Hi All, > >>>>> > >>>>> To test some kernel work (backlight refactor) which I have been doing > >>>>> I have booted Debian Testing with a 6.0 kernel on a Sony Vaio VPX11S1E > >>>>> (which is ancient). > >>>>> > >>>>> I noticed that when tab-completing something in a terminal the > >>>>> terminal bell sound would keep repeating and playing another longer > >>>>> sound sample gets stuck with the first couple of seconds of that > >>>>> sample looping. > >>>>> > >>>>> This is under GNOME3 with pulseaudio as sound server. > >>>>> > >>>>> I accidentally found an interesting workaround if I run: > >>>>> > >>>>> aplay -Dplughw:CARD=MID,DEV=0 /usr/share/sounds/alsa/Front_Left.wav > >>>>> > >>>>> once, then that works properly and after that the problem is gone... > >>>>> > >>>>> Note that this laptop does have only 1 speaker AFAICT. > >>>>> > >>>>> alsa-info output below. > >>>>> > >>>>> I would be happy to test any patches / module-options which might > >>>>> fix this. > >>>> > >>>> Could you check the very latest Linus tree (6.0-rc5)? > >>>> There has been a regression fix for HD-audio, and possibly this might > >>>> be your case. > >>> > >>> And if this doesn't change the behavior, try snoop=0 option for > >>> snd-hda-intel module. > >> > >> Thanks, I've just tried with 6.0-rc6 both with and without snoop=0 > >> and neither helps I'm afraid. > > > > Then one another thing could be position_fix option of snd-hda-intel. > > Otherwise we need bisection -- supposing it worked well in the past. > > Thanks, position_fix=1 does the trick (I did not try any of > the other possible values). > > I see there is a snd_pci_quirk position_fix_list, so I guess > I should prepare a patch adding a quirk for this? I guess this is rather controller issue, so I'd patch for Poulsbo like below. Let me know if it works, then I'll cook a proper patch. > Or are some other position_fix values preferred and should > I try those first? LPIB should suffice, so no further test about the option needed. thanks, Takashi -- 8< -- --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2547,7 +2547,8 @@ static const struct pci_device_id azx_ids[] = { .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM }, /* Poulsbo */ { PCI_DEVICE(0x8086, 0x811b), - .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE }, + .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE | + AZX_DCAPS_POSFIX_LPIB }, /* Oaktrail */ { PCI_DEVICE(0x8086, 0x080a), .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE },