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 32E29C77B7A for ; Tue, 16 May 2023 06:46:11 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9294982A; Tue, 16 May 2023 08:45:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9294982A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684219568; bh=cZUuRrcZzh6YY+JIAByZlAntE+weuW6yGV2MBUoYulg=; h=From:To:In-Reply-To:References:Subject:Date:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=M/8VEPjuzVsXuTfwAOuWycAG4ynqVSzEMMbbgHwDGXna1I7jH4bigDBhlRPKpqj9a LZW1ktl9YBRFsAzT+8F4S2isgLaBL75gk2MALIDOtNVlc8v9ixCDpeSE3f2D/1WHkO 7Drihq5xxCeOm4YgEQTPCznPv3H6EmbMj1klYcqU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 063B8F80548; Tue, 16 May 2023 08:45:17 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7C89EF80272; Tue, 16 May 2023 08:45:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A7B7EF80552; Tue, 16 May 2023 08:44:10 +0200 (CEST) Received: from webhooks-bot.alsa-project.org (vmi242170.contaboserver.net [207.180.221.201]) by alsa1.perex.cz (Postfix) with ESMTP id 31F7EF80272 for ; Tue, 16 May 2023 08:44:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 31F7EF80272 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: GitHub issues - edited To: alsa-devel@alsa-project.org In-Reply-To: <1684219448763803482-webhooks-bot@alsa-project.org> References: <1684219448763803482-webhooks-bot@alsa-project.org> Subject: external rate plugin: broken 16-bit stereo stream conversion (interleaved -> non-interleaved) Message-Id: <20230516064410.A7B7EF80552@alsa1.perex.cz> Date: Tue, 16 May 2023 08:44:10 +0200 (CEST) Message-ID-Hash: RCL7BG7XAGKAFADOZO3ZYTEPSVTP5G3B X-Message-ID-Hash: RCL7BG7XAGKAFADOZO3ZYTEPSVTP5G3B X-MailFrom: github@alsa-project.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: alsa-project/alsa-lib issue #320 was edited from ossilator: this setup: ``` Plug PCM: Rate conversion PCM (44100, sformat=S16_LE) Converter: libspeex (external) Protocol version: 10003 Its setup is: stream : PLAYBACK access : RW_INTERLEAVED format : S16_LE subformat : STD channels : 2 rate : 48000 exact rate : 48000 (48000/1) msbits : 16 buffer_size : 17832 period_size : 4458 period_time : 92879 tstamp_mode : NONE tstamp_type : MONOTONIC period_step : 1 avail_min : 4458 period_event : 0 start_threshold : 17832 stop_threshold : 17832 silence_threshold: 0 silence_size : 0 boundary : 5019261784704417792 Slave: Hardware PCM card 0 'E-MU 0404b PCI [MAEM8852]' device 3 subdevice 0 Its setup is: stream : PLAYBACK access : MMAP_NONINTERLEAVED format : S16_LE subformat : STD channels : 2 rate : 44100 exact rate : 44100 (44100/1) msbits : 16 buffer_size : 16384 period_size : 4096 period_time : 92879 tstamp_mode : NONE tstamp_type : MONOTONIC period_step : 1 avail_min : 4096 period_event : 0 start_threshold : 16384 stop_threshold : 16384 silence_threshold: 0 silence_size : 0 boundary : 4611686018427387904 appl_ptr : 0 hw_ptr : 0 ``` garbles the output rather impressively, though it's still recognizable as the input, more or less. it happens both when up-sampling and down-sampling. it doesn't happen when not re-sampling. it doesn't happen when the hardware takes 32-bit samples, so i guess it's somewhere in the optimized s16 paths. it doesn't happen with mono. this is not reproducible with the upstream emu10k1 driver, as the multichannel device demands 16 channels, which causes the route conversion plugin to be inserted, which sidesteps the issue. and the regular pcm device accepts any rate. Issue URL : https://github.com/alsa-project/alsa-lib/issues/320 Repository URL: https://github.com/alsa-project/alsa-lib