From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05B634E2F06; Wed, 30 Sep 2026 16:13:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790784828; cv=none; b=aM6ODSy71m57j5NyAdI5sJqqHxCPM8jdeg8c8Xshx4FVyMp/8xwCSLNqxd7eeqNBroV/tDjrcANb2daSnGbCTKOEhXkOaer3RxEIkTExD5CsmMnlg4+R6wD1jQ0cUMiH7YFLYnELfxnczegSZ0sQ+7uxxFKjWw7TxurC60ETUXM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790784828; c=relaxed/simple; bh=hwvsxuhRhAs0VEjztauGqbmUFRg6iVXtt93noBBlj+w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UC5EuSpR3GUO/iT2NeDa7CSrL65GKBoqDEfI205EhYSk24/7KEqLS/aw8SxPWj576Fv3hAc1QEDbsp6k4v67AXPZhSFFKMiJZPt+N7RyPDIbbE+cNrC0wzLMOX03g2OOiBn5tDc7mS6+Kl39kllCMpJqZdtPT03p5+O82Yom4O4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sMsXtclg; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sMsXtclg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EA341F000FF; Wed, 30 Sep 2026 16:13:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790784824; bh=76u0Q3wa1MXmp7gJXgsR9BWf7CnVJT5VcampYbegASg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sMsXtclgl4uTmIsq5wngWJd3Ds2FNU/7WtbGpskZakXoYWOuSHuMWhb+I0rdWWV2Z WokH1nKnh5ps7Zvsv8O9CTcbmHU66u4zetq3gE4ZmkBGGkDeqShxpgUVj4krUmFoLy bADijw5nr7UNVsm5wm8W5XddXPDQfM5P6uR68CYU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Rudi Heitbaum , Mark Brown , Sasha Levin Subject: [PATCH 6.1 291/982] ASoC: rt5645: Perform the initial jack detect at probe Date: Wed, 30 Sep 2026 17:17:07 +0200 Message-ID: <20260930152423.057213295@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152416.775402466@linuxfoundation.org> References: <20260930152416.775402466@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rudi Heitbaum [ Upstream commit 54b279699279411c77c8afbc73b83c70740a7303 ] The only initial jack detect is the rt5645_irq(0, rt5645) at the end of rt5645_set_jack_detect(). A card described with simple-audio-card has no machine driver to call that, so jack state is only ever sampled from an edge on hp-detect-gpios. A headphone already in the socket at boot is therefore never noticed, and the card is silent with every mixer control set correctly. rt5645_jack_detect() is what force enables the "LDO2" and "Mic Det Power" supplies that the "HP amp" widget depends on, and what programs RT5645_CHARGE_PUMP away from its reset value, so without it "HP amp" cannot power up. Unplugging and replugging the jack is the only way to recover. Do the detect at the end of the component probe when the driver owns a hp-detect GPIO and the codec's own jack detect is unused, which is the case that has no other trigger. A machine driver calling rt5645_set_jack_detect() later just repeats it. Signed-off-by: Rudi Heitbaum Link: https://patch.msgid.link/anNU3tOUR7rOReSB@5e001e58230e Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/rt5645.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 0bb70066111b7..7d4ebef1edfd7 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -3453,6 +3453,10 @@ static int rt5645_probe(struct snd_soc_component *component) if (!rt5645->eq_param) return -ENOMEM; + /* no machine driver to call rt5645_set_jack_detect(), so detect here */ + if (!rt5645->pdata.jd_mode && rt5645->gpiod_hp_det) + rt5645_irq(0, rt5645); + return 0; } -- 2.53.0