From patchwork Fri Jun 30 14:45:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oswald Buddenhagen X-Patchwork-Id: 697998 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 95814EB64DC for ; Fri, 30 Jun 2023 14:47:59 +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 754AC857; Fri, 30 Jun 2023 16:47:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 754AC857 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1688136477; bh=uVGsqNZPXwuLbM4ckGcS7Zngg92qCuT0iMwYBwVFlig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=uUxdLnls4FJAd3biG+UuZgLC74h8aX1D4yxbWq+xM2oFaIEJqgopmvkpL3JHbzvkt MSmTnz5YRGaOZP0AkTuvS0iDuhIovCULxF2WbvN2ab9PTd9r/7bE0AZKyvsw9Vwkb/ JmYnufYSFn8M4fQT9bH2XlJ3NKZX9W98nTjN7vy8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D513DF8057F; Fri, 30 Jun 2023 16:46:12 +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 322C0F8057A; Fri, 30 Jun 2023 16:46:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 03EC5F8053B; Fri, 30 Jun 2023 16:46:04 +0200 (CEST) Received: from bluemchen.kde.org (bluemchen.kde.org [209.51.188.41]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EF890F80534 for ; Fri, 30 Jun 2023 16:45:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EF890F80534 Received: from ugly.fritz.box (localhost [127.0.0.1]) by bluemchen.kde.org (Postfix) with ESMTP id 81363242E7; Fri, 30 Jun 2023 10:45:43 -0400 (EDT) Received: by ugly.fritz.box (masqmail 0.3.4, from userid 1000) id 1qFFNW-mnL-00; Fri, 30 Jun 2023 16:45:42 +0200 From: Oswald Buddenhagen To: alsa-devel@alsa-project.org Cc: Takashi Iwai , Jaroslav Kysela Subject: [PATCH v2 3/8] ALSA: emu10k1: set the "no filtering" bits on PCM voices Date: Fri, 30 Jun 2023 16:45:37 +0200 Message-Id: <20230630144542.664190-4-oswald.buddenhagen@gmx.de> X-Mailer: git-send-email 2.40.0.152.g15d061e6df In-Reply-To: <20230630144542.664190-1-oswald.buddenhagen@gmx.de> References: <20230630144542.664190-1-oswald.buddenhagen@gmx.de> MIME-Version: 1.0 Message-ID-Hash: A56C6FS46YUH4EIJ2ICZUPQ3T34Y6SPH X-Message-ID-Hash: A56C6FS46YUH4EIJ2ICZUPQ3T34Y6SPH X-MailFrom: ossi@kde.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: ... on Audigy, when we are not pitch-shifting. The only observable effect is that the Z1/Z2/FXBUS registers don't have a stray bit set for negative numbers anymore. The bit is below the ones significant for output, but it would mess with 32-bit sample recombination, which we are about to add. kX-project does that, but I had to figure out myself why. Signed-off-by: Oswald Buddenhagen --- sound/pci/emu10k1/emupcm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c index a6fb0647d80a..bd222de7ea9f 100644 --- a/sound/pci/emu10k1/emupcm.c +++ b/sound/pci/emu10k1/emupcm.c @@ -318,9 +318,10 @@ static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu, REGLIST_END); // Setup routing if (emu->audigy) { + u32 unfiltered = (evoice->epcm->pitch_target == PITCH_48000) ? 0x80808080 : 0; snd_emu10k1_ptr_write_multiple(emu, voice, - A_FXRT1, snd_emu10k1_compose_audigy_fxrt1(send_routing), - A_FXRT2, snd_emu10k1_compose_audigy_fxrt2(send_routing), + A_FXRT1, snd_emu10k1_compose_audigy_fxrt1(send_routing) | unfiltered, + A_FXRT2, snd_emu10k1_compose_audigy_fxrt2(send_routing) | unfiltered, A_SENDAMOUNTS, snd_emu10k1_compose_audigy_sendamounts(send_amount), REGLIST_END); for (int i = 0; i < 4; i++) {