From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E837278E53 for ; Wed, 26 Nov 2025 18:44:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764182647; cv=none; b=YT5WtmGhzHg68zMcRChWUyrIWyUiBTB5aj7cRCGJl928ADwwW+VhPHweVjzHR3Wt3LTZ/qs4+4fk3mL2vbHmqWZ/lckK7CgQ7qcwtLZfxGCqUZvTb7qPhRdzDdOsUWU36X/XjrLDvsVtUYcP/EkyLQJQGaqNcaHsQ8hFRoJwgG8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764182647; c=relaxed/simple; bh=gODucceURXLAZAeRwxxIiFVKMzlCXxDmuBNn0+OsE2A=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=jbr+r81jLN3gSDJOwC6r9Og/bISbPcU0quUm9nn0f1uWHnSVGtu+dwrUlKd6g+2hfLiYquOXMbtSO7BTTS9+1Axx060kX0ylw9anZ4lmAQXfiyNcYBsL1kCVJzdsU7k2lus5Dirrfi/3h4o4skyXKMYW9k6MCWpbUxfY9ag6PLU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=sOoUDvg9; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sOoUDvg9" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-42b32a5494dso83968f8f.2 for ; Wed, 26 Nov 2025 10:44:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764182642; x=1764787442; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0xv6F5N4oE/AmW5+gi206/SuXoxVH3RxFlJrHQKwWM8=; b=sOoUDvg9DWQXsPrCh925yBopoEx1L1BqOFEja/UiuHhPxpfWR99nSgdz+9LX9xVSaS VaFnLBskRYmrKdzB5XO+Cd8uPTZW7pWf3NQlKdYwK+NiPiBl+J4y0s6RJGop7KcQtNlL S9z3nsJbHe2BAGrjG6tOSncgKS29f1HuYKuWU7KDzAq76ng6AEB2pjjJ0rnXj81m7l8E wUlfqB0dqbzXEOjspyqGYbqBnwcdj5+lcNvTQ9vP0EehPqmRPTPWiymiEGXDFnBlHX9T GCp1zejLdtj7nW3oakcarK7vOjppqHqvVkkFuWOfzCTbypgeu+itXr2ckLOVr8IDyqmG i/cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764182642; x=1764787442; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=0xv6F5N4oE/AmW5+gi206/SuXoxVH3RxFlJrHQKwWM8=; b=ZMWIPDgGyqKWhRqVZD09b5SOUREUSfm/OCBVrPfOozjwIKFxXEEIm4eJarNUantGIJ sSK2FzpYrF2vhj51JkXQsqmTspLei4uRKn62zY7TJi2812fpEI69iD29Y7t9VsmYadpU A4Gx8jAQW+sEA7D2h79LbdsX9WU2lE3M9shiIZylZHgqRb7ZIylz2C0FDkiMyC0m5N1R Z4VJ2PEwrFXXvssG/7zEVkgx9HKTjxRhaFPL9esF42kWDROsE590jjv5v1DFeFomCBBZ k7x6gasTMcmJhqNlnQyHTlGf7LHB2E3oTNSdVnIWOUf+8sRrE0wfibKz4MvEDc+fGCDN fH+Q== X-Forwarded-Encrypted: i=1; AJvYcCWTykDGAJ+v28srevn39F/D0hVZ3mSe9AKRvKzCKeSDns0OpCVb9fodxAyE1O2HTX9bfQE1BZBKkD5dhYA=@vger.kernel.org X-Gm-Message-State: AOJu0YxZu1MAJNDObwb8aWg/aNnS4RQapXLnbgg/fxCUABJ+81IpBkL2 1hAfPHqkAij7Tg4z+FcG7FvxIWEfLxm01qNnWUjMohxZHvs2BuwhtyNRFsyzXCrlG+4= X-Gm-Gg: ASbGncuMacg/2Xk4ZMrr4xsXBSUu4tlyQu8mrbLQxYFnCqwNzH6/QQXdNg1b0ugGe8o 2fpqNWfOcOZKsCtZGJ1mCg/r4228RQQw/Esn+u+IbjP4ytNHdw+r99nx+01XU5qZ5X6mA23Hyne GO8EazJUoRhwdkIuz7mwR4X8a/c9rh5SGD+xy/vu4j/TQU9VNvF27pUJWihhmC7Q2UFVG5pu7Gf rvfQ/YvHibL02oBS7oJH51T6nMkT7TKqRyw2Cs1gpbXWkqerBXbiW544fZpF/w2fw4i1zQPzF6W HlRgxwm2b5rLcRQ9+N3tikhFSTLnLWeV9TL9gxWnOmEDPpIQJBA/Hcgf63rG0r8aTB4lj9+9DDZ rBpCDvHnh4vvihJNRseRu/R/iify7UImESqHzhXml5+hvsKOkkynkNxFN6LyKysxFPW2BjvEVdB X1gxW0iBBoijKp+oM= X-Google-Smtp-Source: AGHT+IEp/IyLELcI0uOZQfhum7V44+vF6YOIJkzlS9XBmb/UdkI5bYp9WJHzf72QiNHrX+cRfeCHAA== X-Received: by 2002:a5d:64e6:0:b0:42b:36f4:cd20 with SMTP id ffacd0b85a97d-42cc1d2e292mr23068136f8f.27.1764182642424; Wed, 26 Nov 2025 10:44:02 -0800 (PST) Received: from localhost ([2a02:c7c:7259:a00:a911:f33a:3163:4511]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42cc231dc6esm32613035f8f.7.2025.11.26.10.44.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Nov 2025 10:44:01 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 26 Nov 2025 18:44:00 +0000 Message-Id: Cc: , "Liam Girdwood" , "Mark Brown" , "Jaroslav Kysela" , "Takashi Iwai" , "Krzysztof Kozlowski" , "Neil Armstrong" , "open list:QCOM AUDIO (ASoC) DRIVERS" , "open list" Subject: Re: [PATCH 1/6] ASoC: codecs: wsa884x: remove mute_unmute_on_trigger From: "Alexey Klimov" To: "Jonathan Marek" , "Srinivas Kandagatla" , "Srinivas Kandagatla" X-Mailer: aerc 0.20.0 References: <20251124064850.15419-1-jonathan@marek.ca> <20251124064850.15419-2-jonathan@marek.ca> <2758401b-e9b5-4f10-bb01-0a1fe4e09430@oss.qualcomm.com> <5f15fc5b-375a-1e75-b32d-0d543fa1014d@marek.ca> In-Reply-To: <5f15fc5b-375a-1e75-b32d-0d543fa1014d@marek.ca> On Mon Nov 24, 2025 at 2:55 PM GMT, Jonathan Marek wrote: > On 11/24/25 9:08 AM, Srinivas Kandagatla wrote: >> On 11/24/25 6:45 AM, Jonathan Marek wrote: >>> trigger is atomic (non-schedulable), and soundwire register writes are = not >>> safe to run in an atomic context. (bus is locked with a mutex, and qcom >>> driver's callback can also sleep if the FIFO is full). >>> >> Thanks Jonathan for the patch, >>=20 >> We have nonatomic=3D1 flag set for all the Qualcomm sound cards, Did you >> hit any schedule while atomic bug? > > Right, I missed that. I'm using a different driver which does not set=20 > nonatomic. But this driver to not need nonatomic -=20 > mute_unmute_on_trigger is a hack, if there is a timing requirement -=20 > then it needs to be explicit, the different timing with this flag is not= =20 > reliable). > >> In-fact this change has helped suppress most of the click and pop noises >> on laptops, specially with wsa codecs as they accumulate static if the >> ports are kept open without sending any data. >>=20 > > 28b0b18d5346 is important to fix the click and pop noises. But the=20 > useful part is the rest of the commit, not the mute_unmute_on_trigger=20 > flag. As long as the mute_stream() happens while the soundwire stream is= =20 > enabled (between sdw_enable_stream and sdw_disable_stream), there should= =20 > be no pop click. > > AFAIK the pop/click is because of PDM: zeros (soundwire stream off)=20 > represent the minimum (negative maximum) amplitude, and the soundwire=20 > stream needs to be enabled to output a zero amplitude (alternating=20 > ones/zeros). Turning on the amp while the soundwire stream is not=20 > enabled will cause jumps between the minimum and zero amplitude. >>> - .mute_unmute_on_trigger =3D true, FWIW for wsa881x in analog mode on RB1/RB2 boards I noticed that pop/clicks sound behaviour is much better when mute_unmute_on_trigger is false. Although, for wsa881x in soundwire mode the mute_unmute_on_trigger =3D true gives decent result of supressing pop/clicks noise on the devices I have. Maybe it varies from platform to platform and from board to board. BR, Alexey