Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp998855rwr; Wed, 3 May 2023 08:56:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ncXiUl+48GWssTncutj+9e6EIcKD9ph58q4/Qa+oHEfhgsCtZgDKONiDYBCuOx+i1HKXU X-Received: by 2002:a05:6a21:339a:b0:fc:8e7e:9290 with SMTP id yy26-20020a056a21339a00b000fc8e7e9290mr3529938pzb.6.1683129386499; Wed, 03 May 2023 08:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683129386; cv=none; d=google.com; s=arc-20160816; b=yF7f6irSUHovaFpaPHYABFwYQCvFlOktqdOzaksAtZ5oTBVW/7TljE0JLdUVHJaYFG n/dyjgv/SbrRQ3YfBAx425wwn/u4qO/i1tP/K7NF0WA+3q7UqItrZ3uPC04rG82ybxkK zuYA81o03Z9nnze0SKlvO/to4KMbJrzEeVVhYxEFsxP4cAi+vHlI5YxzvrU1aZVwftqB nO9cVz9lL91mwdnqm2UwBen2vZs2C+Dux5u2Y/rW/JPePdp/FnXVvZdmQRSyeSiXZNEn JoJ46ELppK3Aj+wv2gcKAVIoCcYOCEQVOMS1oTuL7M2V0QSNypO4RO4tZ9fUu+jlEE28 kt7g== 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=9H5tPG0mP0o9lp1KWPeQvdb+q0hdkjVEkN1tewN2nIc=; b=izWsopPd5n5cwoJCX0ju/07kN0HBgFiSM/Ma9u/CP9EnmBfROLURc5MYxdERGRSF8P uAPTbpFpOq0RszcIBjaRlpLp25uMvR7Z35hkV+VAdzszTtZ4RsElXHKlnebo5SJdaNCZ co5wrI129PmICb+hCMKgwQZDkfAVFU2gC4ZdGOoeDJGYLGY7NMDHDgVA3/J4QgKBnsYA ez1rUwfOY/+ZWIZJT+SXurVCXRIsO9oY3w2dFkGh18nuFbaW0ka8KV8MRWZSU5cSrY0z 1IPdswooTW90sjWjhGIFybOMdxqz67PyLxeBLL908lCWQkV9Ix97kGP+aSmubpmk53cR 6WNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Q42NDkCn; dkim=neutral (no key) header.i=@suse.de header.b=RgYlGkDL; 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 w62-20020a638241000000b0050300a5cf3csi36299421pgd.469.2023.05.03.08.56.13; Wed, 03 May 2023 08:56:26 -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=Q42NDkCn; dkim=neutral (no key) header.i=@suse.de header.b=RgYlGkDL; 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 S230338AbjECPrK (ORCPT + 99 others); Wed, 3 May 2023 11:47:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbjECPrJ (ORCPT ); Wed, 3 May 2023 11:47:09 -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 CD0765FF9 for ; Wed, 3 May 2023 08:47:07 -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 46154204EE; Wed, 3 May 2023 15:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683128826; 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=9H5tPG0mP0o9lp1KWPeQvdb+q0hdkjVEkN1tewN2nIc=; b=Q42NDkCnpxT2N/Mvr1eFVBKqka3qMj3SkO3gwBCqcApVk/pHL0YJ3ypbXfl9Xyeyk9Z1D0 4g0MiMOPLliOhXY4NiNoB0+1vSKU4GGhvYZDSQ9I6vYj5AJ9s2B0TerX/uu5wx10ex+q9K Nqdj8t2Xk88F5M/UPWd71k5rl7/1n5Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683128826; 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=9H5tPG0mP0o9lp1KWPeQvdb+q0hdkjVEkN1tewN2nIc=; b=RgYlGkDLxLa7D7eENKp6i/rffLfoQqFAc1bFXABI9rJJEXef7sF/XQ44oszQEhe2sdIoYE QxrNBRCSuxw4uhAQ== 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 1C8CD13584; Wed, 3 May 2023 15:47:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id atjsBfqBUmQ6cAAAMHmgww (envelope-from ); Wed, 03 May 2023 15:47:06 +0000 Date: Wed, 03 May 2023 17:47:05 +0200 Message-ID: <87354do1s6.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> <87a5ylcyw4.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 17:06:16 +0200, Jeff Chua wrote: > > On Wed, May 3, 2023 at 9:45 PM Takashi Iwai wrote: > > > > 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... > > I use this to record the sound, but it's the playback that's having > the issue ... > > # modprobe snd-aloop > # 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 > > The issue is still without reversing the patch, I'm getting the bad > audio (bad1.m4a) > > Just let me know what else I can provide. I'm not sure what's need, > and don't want to bombard everyone with diagnostics that are > irrelavant. Thanks, now the situation got clearer. Will investigate. Takashi