Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp837611rwr; Wed, 3 May 2023 06:56:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Zz2sLcTunvvXaOGea5grW1UseXcHXpZJmJnExukt9HHcf64Pz4SyzR9BWMdDkBijiBYFu X-Received: by 2002:a17:902:eccc:b0:1a9:581b:fbaa with SMTP id a12-20020a170902eccc00b001a9581bfbaamr7803035plh.2.1683122162907; Wed, 03 May 2023 06:56:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683122162; cv=none; d=google.com; s=arc-20160816; b=pM7R/HdfHkxcbKWQmaT8/d4+NXmHrZeRPBnfEiuYmOLoTJ2XD9jrY0gPRDQSVtMNb3 TOaCsJwz6h+BhN8VdbRC5hkG80IhrTJMIgPKq5O1btHJ9Yllu9DbCEirrv2WQlfm6tdn eZe3jsKM5DDVHXTAUcUG4K+vy+zK3HzTR0wjDdUZHiXY3uHK2iaq8DHQiIBzKM1FEr5G BrGV+3AHCrNP8BtVmIG0cu9eVkiSKlrbC/JSK1tJpi9e8MCUkJfxf8QUbITY2B+kBdCG AHGsPcbo8nEcQ68xkpKedeRp7jmGsMBgAgh2ASY3BLcHdfAdU52q0J1Prp6SK2OZS2U5 41uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature:dkim-signature; bh=tYm+9t8/2tPC3QCxt5IjR+SXsI1QF/Sb+k/pBTc2UiE=; b=GytlrKP/5omC3Oi9+DoNnBdndSXcg/soWgXi1I95htQT044JvANdGDvgoQz3jGpB5r efHpE47ogxNBy/02qZhZ4E8AwBCqMh9+lMzaU1S2hGtNLB2NqIHxcO5ERyF7/EJx+Ukl labpWy6Zj0X27hA7s8Ez7e7y6QeolJ6bCtytk+2Ztpxd2luZS3UVShIIbkshW873Jwk9 Y9oT8U02acW9PyW1dHoW4/zUW7nL9/vUYURdqDEWtrK/HPXN1lEsJKobo6oGzrfZEnJC quvZvIy7gXptpDC9V5Pr8IlAAicBrg8+PhsMfMSUtnD06IFGyoT+wDE0TjZ3/ANcUAl/ HjAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=h6+qwXC2; 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 h14-20020a170902f7ce00b001ab23391d6asi749552plw.590.2023.05.03.06.55.51; Wed, 03 May 2023 06:56:02 -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=h6+qwXC2; 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 S230078AbjECNpE (ORCPT + 99 others); Wed, 3 May 2023 09:45:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbjECNpD (ORCPT ); Wed, 3 May 2023 09:45:03 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D155CB8 for ; Wed, 3 May 2023 06:45:01 -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-out1.suse.de (Postfix) with ESMTPS id 8198822850; Wed, 3 May 2023 13:45:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683121500; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tYm+9t8/2tPC3QCxt5IjR+SXsI1QF/Sb+k/pBTc2UiE=; b=h6+qwXC2AwgXnxr8OdlDZkE+zd2SBwHIJ+YmbGO0iFHSIWHcV4rV+io7G6xL10AhEHDCpM nfTMwt2T2gdVsdVqsgSdzq60nymvOr+D7rT9bUUUJwUdZopGv+vWr9CuzPtBJUU5s0vWRW 5OuwdlJzLigH6Hlz3OpsNtVJvG/9NUc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683121500; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tYm+9t8/2tPC3QCxt5IjR+SXsI1QF/Sb+k/pBTc2UiE=; b=n0K0go0+LzDOeWfJHGY8WTr7dA3aiS/GWRTMZ5w/B2rhLrDVn2Cs1Dn7fTp9Yri7hFKCtQ sIXsxW70rXAo5KCw== 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 6CA5313584; Wed, 3 May 2023 13:45:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ovIVGlxlUmSCKgAAMHmgww (envelope-from ); Wed, 03 May 2023 13:45:00 +0000 Date: Wed, 03 May 2023 15:44:59 +0200 Message-ID: <87a5ylcyw4.wl-tiwai@suse.de> From: Takashi Iwai To: Jeff Chua Cc: Takashi Iwai , Bagas Sanjaya , Oswald Buddenhagen , lkml Subject: Re: linux-6.4 alsa sound broken In-Reply-To: References: <63bcc1eb-b0f5-4da1-0a22-31e0c86c0851@gmail.com> <07f50016-5e24-56f8-0d02-df8d237059b6@gmail.com> <87jzxqne3z.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=UTF-8 Content-Transfer-Encoding: 8bit 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 Wed, 03 May 2023 14:19:54 +0200, Jeff Chua wrote: > > On Wed, May 3, 2023 at 2:06 PM Takashi Iwai wrote: > > > > On Wed, 03 May 2023 06:37:48 +0200, > > Bagas Sanjaya wrote: > > > > > > On 5/3/23 11:34, Bagas Sanjaya wrote: > > > >> Just send .. in another email. If the atttachment got stripped off, > > > >> please let me know. > > > >> > > > >> > > > > > > > > I don't see your attachment. Can you please post the link > > > > to your test file on file storage hosting instead? > > > > > > > > > > Oops, I don't see the attachment on your reply at [1]. Sorry for the > > > inconvenience. > > > > > > [1]: https://lore.kernel.org/lkml/CAAJw_ZveoPfnBsSkHZqmLiVWATcOosR--6Ds4cdekdi=t1yV7A@mail.gmail.com/ > > > > I see no attachment of the recorded sound. In the mail above, only > > Side_Right.wav was attached, and this is the same file in > > /usr/share/sounds/alsa/. > > > > But, I wonder how you played a mono channel file with "hw:1,0" PCM. > > Isn't this a HD-audio device? > > Usually HD-audio codec can't play a mono file. For example, on my > > machine with a Realtek codec fails like: > > > > % aplay -Dhw:0,0 Side_Right.wav > > Playing WAVE 'Side_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono > > aplay: set_params:1358: Channels count non available > > > > So, if it works on yours, please show the output of playback with > > aplay -v option. This will show more details. > > # aplay -v > Playing WAVE '/local/share/sounds/alsa/Side_Right.wav' : Signed 16 bit > Little Endian, Rate 48000 Hz, Mono > Plug PCM: Route conversion PCM (sformat=S32_LE) > Transformation table: > 0 <- 0 > 1 <- 0 > Its setup is: > stream : PLAYBACK > access : RW_INTERLEAVED > format : S16_LE > subformat : STD > channels : 1 > rate : 48000 > exact rate : 48000 (48000/1) > msbits : 16 > buffer_size : 16384 > period_size : 1024 > period_time : 21333 > tstamp_mode : NONE > tstamp_type : MONOTONIC > period_step : 1 > avail_min : 1024 > period_event : 0 > start_threshold : 16384 > stop_threshold : 16384 > silence_threshold: 0 > silence_size : 0 > boundary : 4611686018427387904 > Slave: Soft volume PCM > Control: PCM Playback Volume > min_dB: -51 > max_dB: 0 > resolution: 256 > Its setup is: > stream : PLAYBACK > access : MMAP_INTERLEAVED > format : S32_LE > subformat : STD > channels : 2 > rate : 48000 > exact rate : 48000 (48000/1) > msbits : 32 > buffer_size : 16384 > period_size : 1024 > period_time : 21333 > tstamp_mode : NONE > tstamp_type : MONOTONIC > period_step : 1 > avail_min : 1024 > period_event : 0 > start_threshold : 16384 > stop_threshold : 16384 > silence_threshold: 0 > silence_size : 0 > silence_size : 0 > boundary : 4611686018427387904 > Slave: Direct Stream Mixing PCM > Its setup is: > stream : PLAYBACK > access : MMAP_INTERLEAVED > format : S32_LE > subformat : STD > channels : 2 > rate : 48000 > exact rate : 48000 (48000/1) > msbits : 32 > buffer_size : 16384 > period_size : 1024 > period_time : 21333 > tstamp_mode : NONE > tstamp_type : MONOTONIC > period_step : 1 > avail_min : 1024 > period_event : 0 > start_threshold : 16384 > stop_threshold : 16384 > silence_threshold: 0 > silence_size : 0 > boundary : 4611686018427387904 > Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0 > Its setup is: > stream : PLAYBACK > access : MMAP_INTERLEAVED > format : S32_LE > subformat : STD > channels : 2 > rate : 48000 > exact rate : 48000 (48000/1) > msbits : 32 > buffer_size : 16384 > period_size : 1024 > period_time : 21333 > tstamp_mode : ENABLE > tstamp_type : MONOTONIC > period_step : 1 > avail_min : 1024 > period_event : 0 > start_threshold : 1 > stop_threshold : 4611686018427387904 > silence_threshold: 0 > silence_size : 4611686018427387904 > boundary : 4611686018427387904 > appl_ptr : 0 > hw_ptr : 0 OK, that explains. This is a completely different from the configuration with hw:X,Y I expected from your description. So, this is with dmix, and it indeed relies on the auto-silencing, so the commit must be relevant. > > Last but not least, please double-check that the problem is really > > gone after reverting the commit 9f656705c5fa. The commit is about the > > auto-silencing, and it should be irrelevant unless the application > > gives non-zero silence_size sw_params, and aplay doesn't set up it at > > all. > > 100% sure. I just compiled the latest linux git pull. Rebooted. Tested > that the problem exists, and revert just that patch > (9f656705c5faa18afb26d922cfc64f9fd103c38d), and the problem went away! > > Sorry about the recorded.wav file that I attached earlier ... didn't > realized that when I recorded via the loop-back, I could heard that it > was "corrupted" on the unpatched kernel, but when I play back the same > file on the "patched" kernel, the sound played ok. > > So, loop-back using the following did not capture the problem ... > # arecord -D hw:1,0,0 -f S16_LE -r 48000 recorded.wav > # aplay -D hw:1,1,0 /local/share/sounds/alsa/Side_Right.wav > > Attached is the problem file captured using my iPhone. bad1.m4a. > > I've uploaded to > https://github.com/jeffersonchua/linux-6.4-alsa/blob/main/bad1.m4a in > case the attachment got stripped-off. Ah, the arecord and aplay above with -Dhw:1,1 is for a different (still working) card? Better to explain it more clearly... Takashi