From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.46 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796122326; b=3E22WxSLjYWxUVYOG1TOuDjz7lcqgmasGE1+OCWuH5QB78oQEgSDTxPzlGMNFiWYJCaa 9NiCl1Afgni4IrKzalaDeagMc7nO0eeCKkUFaKHwRXj5FnHPfXERH0zjCTSpDaxEik3yd B2iwLBFyc4ILsC+NMYST8ft6VZCIr/5JyDA9PO9iVBGTolCA90A3uyHKcHFQItHS0I8Tc Q0zQQdNWdL3dqTilRYDWDHCKZFsvTSdCOdDQHEtaySSlVsijCH3IueYmb0ctYjBhyfFzP 6N46mc232NloDeY+vXXTrT19ClPuFC97DiFSZwjuR4F7bAbhL/djsYSdvVnIeGIqhVg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796122326; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Type; bh=yo4/FtwI6FCP7+LJW7dtsD3QRgMYJ8EIBe90X5oA7ZA=; b=y9HkNFFyHh0MCDGipw+gaYF86zq1hLMQzTqdKfUFqKwc9P0y50x3PPznp5/YxRgIoTWu 1SezDyJ/Y+4QOJKCRWQielM4XAlxR9xmNClpOVl/dggRrbL0+ugXXKvDmhC56BQozRbmk z3unNwKV1ZSTjQW32IadLtkf6HU/2l1mPNaLixPFeQzuoHLn432v+ZOV7RdXcXiQhUbgp xHxRoZylIwEcHlBsG/jRxJqqNotLLfTVWc1NX0+dXdL7kKBI+gM+rLu20RzKqOfgnUFB8 JtU3E9PTRPhVP/9UCI4UD98ihj/bOBFAZFmTq55QUWx4UuzF0wB6AoXQer754NMo9cw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=arduino.cc; spf=pass smtp.mailfrom=arduino.cc; dkim=pass header.d=arduino.cc header.i=@arduino.cc header.a=rsa-sha256 header.s=google header.b="AsUjQ/ig"; arc=none smtp.remote-ip=209.85.221.46 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B332606A325 for ; Tue, 1 Dec 2026 10:52:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6B332606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=arduino.cc Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arduino.cc Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arduino.cc header.i=@arduino.cc header.a=rsa-sha256 header.s=google header.b=AsUjQ/ig Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-4a42b34e930so10242835f8f.2 for ; Tue, 01 Dec 2026 02:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arduino.cc; s=google; t=1796122325; x=1796727125; darn=vger.kernel.org; h=content-type:mime-version:references:in-reply-to:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=yo4/FtwI6FCP7+LJW7dtsD3QRgMYJ8EIBe90X5oA7ZA=; b=AsUjQ/ig8Qsa2ZeANpd7zRw9riHRwui2af++Zx4ET73lkvQFPz+Lnh6pJpwQu0REM0 dMs5pP32Oj3mssUe+y4GlM7KZxxT5bTULBN6oEgMq1QrfURArHqSHMtYkMsFDHGy9xxz 823GCtDLmNydFlqky8wslGyRLJlmUUWt3nsxE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796122325; x=1796727125; h=content-type:mime-version:references:in-reply-to:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=yo4/FtwI6FCP7+LJW7dtsD3QRgMYJ8EIBe90X5oA7ZA=; b=J5okMRE+hemhYmLxhKfD/PWM/p+of4Y2wQINhz/UwQ7KxKBnj3PMM/d7Up5n6u5xZE gMUXaHgjzaV7cNTdYfiVhsR9VFH7s91/yYUIxsJHRObFF8MblMPAcvQWMsNUDM+Q1yUs P6t3l6F5RL5Emx7VfbVrckACg139WFN1k/6Uz2YmDFN9cjIzICt7C75eR96YVnSw6TIj 9vFQCzF4tVT8LRDq9X+jqwFxcTxHk41Ijohdpl0UWrbaQy6zvxp0Oa+7RrmH4yQKHjTL TAbVauYNXXaIh+OEDJL01fpEscze/8QTwDAjX9pThdkAn84ug9W1qH+QaDVHKANqjTpN 6arQ== X-Forwarded-Encrypted: i=1; AL+hErGx5Vr5XwfxNQ4fendABdP0ypb+9+l9eYPSbuYLdV6m+Dil2Yf7mmj/FDF/Nq8ys+fFOFhBkyl9OvULkv8=@vger.kernel.org X-Gm-Message-State: APuU4Z+RcWV+ONaX0C4Mrtyyjxz+eKOX3QqFhF8IhWuOyvCkBB5MYJsQ 2U5ayBTBlFoWIMIKjAK3m4qWn5S54miPw2BWS42lCFDj4cJQwNz5bxaogOvpuU3Dxqa3amI1PLZ LK3DWPEAVtNvpw7KlFnG4EHMOim87jhSVdUJ3lIyJ7uGo5CrbSr9Y9U4r2+Y= X-Gm-Gg: AZFdTZf4SlbC2DUfXqjHzSyoDi4jm6TJA8LpvkuEK64UIQ6kQg92DHaah5VOsWcSq+g b55/7hoXBqITGgYeMAMnz8pkiOcJhSc0UTf/kH/U6AsOdOUYnPej4c5ApYu2A0oDNpLr8WT2coM lr7cZmsiOMcMHDMxdSSE71XO8PVdZDhDFl3yTmucxGdDvzQ11wOhjoTuXl2IbfDk6qsgwZESfYF FyG57vlUQxiwtVfWz8U/xvN77f7bjkMyxL6BSRyFv/D14qrszDD/YCIjhT46hodvVMQnLHbBRYD zYrgb2/02/lFCdRdj4uC4O4ORoEonMpLCWBv+dXLhh3Y5yPQEN8pzu9p71nEgO21DwUwobVa8gE EB7mX4k5DAVoi1ZaWGMBHcn7lJUfum88BGcof7dNDAqBiYBO2QlqGLLQTOzh9/rW1BevRaa7ToN 9GKLHzzILtnA0Gvtsq6Oqb2+xZEZ6395BWmDtuhPnyuPLpOHCP5P25kPfE89s9GKPXjEZcm7bVR WbicyDlE9lOoFLJkHr5EEumYmowT4b5Nsy1UfbtZb3cdWu6OqSpqPWqRVFbxt2VmXsbV/1hF5QB yGf1i1Umwv29pSHlHCzz5ov3eiiwXu6qzYFNkYA7Z5dHI1AIdLG2DS4RlMms7g== X-Received: by 2002:a05:6000:4616:b0:4a8:714:7ae2 with SMTP id ffacd0b85a97d-4abb32a3f61mr70817815f8f.29.1796122324872; Tue, 01 Dec 2026 02:52:04 -0800 (PST) Received: from riccardo-work (public.toolboxoffice.it. [213.215.163.27]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab69bf680fsm80377311f8f.14.2026.12.01.02.52.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 02:52:04 -0800 (PST) From: Riccardo Mereu To: Srinivas Kandagatla Cc: Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Kuninori Morimoto , Michael McAllister , Mohammad Rafi Shaik , Prasad Kumpatla , linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] ASoC: qcom: q6asm: fix 24-bit PCM level via media format V4/V5 Date: Tue, 1 Dec 2026 11:52:02 +0100 Message-ID: <20261201105202.143108-1-r.mereu.kernel@arduino.cc> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261126115738.1765949-2-srinivas.kandagatla@oss.qualcomm.com> References: <20261126115738.1765949-2-srinivas.kandagatla@oss.qualcomm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Hi Srinivas, On Thu, Nov 26, 2026 at 11:57:37AM +0000, Srinivas Kandagatla wrote: > Both the V4 and V5 multichannel PCM media formats carry the sample word size I see Mark has already applied both patches, so just a test report for the record. Tested on the Arduino UNO Q (QRB2210), on next-20261127 with our DP audio patches on top. ADSP firmware ADSP.VT.5.4.1.c4-00013-KAMORTA (Debian firmware-qcom-dsp 0~20261019). The ADSP reports ASM API version 2, so this board takes the V5 path for both playback and capture, on every frontend and format (bps/word size 16/16, 24/24, 32/32), with no DSP errors. The 8-entry channel map in the V5 structs works fine on this firmware. DP playback (MultiMedia4 -> SEC_MI2S_RX -> ANX7625), checked on the I2S lines with a logic analyser (32-bit slots, BCLK 3.072 MHz, WS 48 kHz): format left marker right marker bit walk S16_LE 0x40010000 0x20020000 15 bits, slot 30..16 S24_3LE 0x40000100 0x20000200 23 bits, slot 30..8 S32_LE 0x40000001 0x20000002 31 bits, slot 30..0 S24_3LE, 0xbfffff00 0xdffffe00 sign in bit 31 negated All bit-exact, and S16/S24/S32 have the same loudness on a DP monitor (before, S24 played about 48 dB too quiet). Headphones (codec DMA) play S16_LE, S24_3LE and S32_LE without plug conversion, at the same level. Headset mic capture (MultiMedia3 <- TX_CODEC_DMA_TX_3): S16_LE and S24_3LE are now within 2 dB of each other with the same speech and sound clean; before, S24 capture crackled. The low 8 bits of S24_3LE are always zero here, but that is expected: the codec DMA backend runs at S16_LE, so the DSP only pads. PipeWire, without our S16 workaround, now opens DP and headphones at S32_LE and the headset at S24_3LE, and all sound right. Also fine: 20 open/close cycles in a row, 44.1 kHz S24_3LE resampled to the 48 kHz backend, and DP plus headphones running at the same time. Tested-by: Riccardo Mereu Two nits, if you touch this code again: > + * uses V4, which the QDSP6 firmware has supported since its introduction. (The > + * old V2 format, which lacks the word size, is no longer used for playback.) Capture moved to V4/V5 too (__q6asm_open_read() and q6asm_enc_cfg_blk_pcm_format_support()), so "no longer used" without "for playback" would be more accurate. After this patch ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V2 and struct asm_multi_channel_pcm_enc_cfg_v2 have no users left in q6asm.c. Unrelated to this series, but found while testing: since commit 55207a5b6959 ("soundwire: qcom: add multi-master support") every boot on this board hits the WARN_ON_ONCE() in qcom_swrm_port_target(), on the first prepare of the codec DMA path. qcom_swrm_compute_params() leaves port_params zeroed for ports whose qcom,ports-word-length is 0xff (agatti.dtsi has several), and qcom_swrm_port_params() then writes 0xffffffff to DPn_BLOCK_CTRL_1(offset, 0). The write itself is old, the WARN only made it visible. I've sent a small fix that skips those ports: "soundwire: qcom: skip DPn_BLOCK_CTRL_1 for ports without a word length". https://lore.kernel.org/r/20261201104714.142340-1-r.mereu.kernel@arduino.cc Thanks, Riccardo -- Privacy and Confidentiality Notice: This email and all attachments are confidential and for the designated recipient(s) only. They may also be privileged. If you are not the intended recipient or among the intended recipients, you may not use, read, retransmit, disseminate, store/copy the information in any medium or take any action in reliance upon it. Please notify the sender that you have received it in error and immediately delete the entire communication, including any attachments.