From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41]) (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 0F81C3A4F2F for ; Sat, 1 Aug 2026 06:07:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785564429; cv=none; b=eIFt354smkaMqlby/32l2X69LR+9Re6YqSW3H9NJnLo0FgeV45+/qM1OaKk+7W5T6pQFXGN9tDyIvaoLKUehxEyPbr1x8LgZrRbHJ0F/t5we/Aj2cmYI3Id5EGhKSo3aycHIoBGm/WkRaTR4+0e8iTX+orCmGYeEtI6cQHsbjIw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785564429; c=relaxed/simple; bh=IHo604GjEFu2C0i4DOUpP6NtZKA9wAW+t4+Q/9HZoMk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=inHB27sVTTW+wUP2CHQmutU6VGSVT64LnFzPIRRp9jz3gzEcYmTtM9GwyHxHG/CCZPSp60R2FJXxoLTvqPwWTm28SGDa5udTSpczrzKlLdlc7Fp8IX2RwxEJxk9egrTU3Gz9ULbxsi/4bUT09t8Irla+vzbOzLW6uIljoRg6AcE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=pRXkxEsJ; arc=none smtp.client-ip=209.85.160.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pRXkxEsJ" Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-44cf70de986so699033fac.0 for ; Fri, 31 Jul 2026 23:07:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785564427; x=1786169227; darn=vger.kernel.org; h=content-transfer-encoding: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=hY1VNQWMZbcTYVOzkOemBoCdeDcj66ehp8AMGX233Z8=; b=pRXkxEsJwjFQEf+AZ9+dX1urVKH3C2/6mpDHb17GnxZAD95/ySY8vIy/NVZCLJF9N5 DzNjGFZpomyj8gdhab3r0VlWtIjef4TGrniFDab0bgsIeWIsDQ9FDDC2GDNhIufP5381 z/bGbWRLQuzKfpisb8HnB4baYfiq0/4yzJo1GDlg4hutfMGMD9Cl8xuEM5A5OC+v6i+K NeuaRkbr8LENIsGdhSeZS1Wal8S+L2CkYPG+DQY3sCi1NhA7nGyCdZPkK4jwfEMvxQjF GoYeAbpHVeB+iuqJMzSIPwcuW/CLCgPlMDiElkkmybeBYYU/Cd4PQYy9Se8xnpRqneYb kD6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785564427; x=1786169227; h=content-transfer-encoding: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=hY1VNQWMZbcTYVOzkOemBoCdeDcj66ehp8AMGX233Z8=; b=pczJlGUF73yTqD5chFkB1TDqhbBSpKwUxiLyJ4c10iFieSS0nM2tOC0V/OXbibsLgX F3eLtLvljSx7NglvMs8jJ01OEYShUeLVIDXIUnjgLMyiIV6Kdwm7tbF1T1yIt6PvvCOL 9IM1esibZxoh4jxiWj4pRlyUfRJSsPP0A0E/GQlL66ZBERXOS2STvgHwidwhcfQBI75Z h4Q4mzRPYapv1Zsrl2jyFSMif8gTL7Kv2NdDn0KhfrR1GeEU+EXKQ+4plFJVXm5d27IL EoSaQaVUhXJsws02s6T0tqojglfs8XTzJUB9b0AClsqzOOpbnijUxI5a700znvDdoME7 cxBg== X-Forwarded-Encrypted: i=1; AHgh+RrAUjOMVwHbG70aiejXOXj1hE2KGgBLrpk7zb1QzzR6X1xmW4pMlGfzyYZ9iGTxw9Ffg9XdL5J49DzyV44=@vger.kernel.org X-Gm-Message-State: AOJu0YyyC9bc1znSPnYL7jxo9Plr0SOqnNYMNBfGhZN12VkvBwXX99Lv BJrUPh3n+Y9Pcb3ONU/Nmf5n6xs7lTE56smyeA5TVll6YH2NcYFom66zgGMDurwfLjQ= X-Gm-Gg: AR+sD128eH1OnQBPWZyS3TLKNXDomzslxQor4mqRsQfVyDkjJmbuwMy+I43PkTofHcm aiusT8uaRJNdjHkLqlg+GAN9OoQiz/Bca/pWpTLUzdlbFA+vgBborycmqA8QBX3cG16Su13DOoL WCfoE4nKRL4zv7znDtJn5c9s92tDoVWCSRzZFwM64amFUt7+pjM5hJin1D1DFVDihXW0iMIOrG0 9t9Tb4mmgkpdBfnYsX/d+9T+tHuP9zts3tihbfNCnWaW8IAe1Xmn5L67K8vbrhn9o9o+z4K93GQ 7rLarb0WBqsZIkl9iNnKo3jeDQ3a702YU0apED2nrbKhAOY9jWO/gg5CWYpNaw+f601YujihY0W JC4P9yJTKoZ1sV743OLI3id1SUwvaG+fxFiI/7G01/9Pk4IuJ+yiZ/Z4DD+OKV8kT6hJ6MZjCZQ snJTH28Z1TBgGXCDThBq5Jy9gchxOhg+vQjYcZFielPbK/RxkbrFMnUSge3Z2OjOVdsetc26yL+ BQDzPyv0ZHLZuakHQ== X-Received: by 2002:a05:6871:a86d:b0:447:7605:ed4f with SMTP id 586e51a60fabf-459057af577mr5369428fac.6.1785564426687; Fri, 31 Jul 2026 23:07:06 -0700 (PDT) Received: from u-ThinkPad-X1-Extreme-Gen-4i ([192.3.12.183]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-458f664d812sm3473404fac.9.2026.07.31.23.07.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 23:07:06 -0700 (PDT) From: Aaron Ma To: Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Zhang Heng , Kailang Yang , Damien Dagorn , Aaron Ma , Bob Song , marco_giunta@outlook.it Subject: [PATCH 3/3] ALSA: hda/realtek: Rename headphone jack kcontrol on Legion machines Date: Sat, 1 Aug 2026 14:06:30 +0800 Message-ID: <20260801060630.2768318-3-mapengyu@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260801060630.2768318-1-mapengyu@gmail.com> References: <20260801060630.2768318-1-mapengyu@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The Lenovo Legion machines pairing an ALC287 codec with two AW88399 smart amplifiers report the headphone and headset functions in the same jack group. With a kcontrol named "Headphone Jack", GNOME treats them as two candidate devices of one port group and prompts the user to choose between them on every plug event. Rename the control to "Dock Headphone Jack", following the ThinkPad naming convention, so the jack is presented as a distinct port and no selection dialog appears. Signed-off-by: Aaron Ma --- sound/hda/codecs/realtek/alc269.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index 42fcdfe54225a..83bb74c94b785 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -3280,15 +3280,26 @@ static const struct snd_pcm_chmap_elem aw88399_pcm_quad_chmaps[] = { static void aw88399_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action) { struct alc_spec *spec = cdc->spec; + struct snd_ctl_elem_id id = { + .iface = SNDRV_CTL_ELEM_IFACE_CARD, + }; + struct snd_kcontrol *kctl; if (action == HDA_FIXUP_ACT_PRE_PROBE) spec->gen.suppress_auto_mic = 1; comp_generic_fixup(cdc, action, "i2c", "AWDZ8399", "-%s:00-aw88399-hda.%d", 2); /* the second speaker pair is full-range rear, not LFE */ - if (action == HDA_FIXUP_ACT_BUILD) + if (action == HDA_FIXUP_ACT_BUILD) { spec->gen.pcm_rec[0]->stream[SNDRV_PCM_STREAM_PLAYBACK].chmap = aw88399_pcm_quad_chmaps; + + strscpy(id.name, "Headphone Jack", sizeof(id.name)); + kctl = snd_ctl_find_id(cdc->card, &id); + if (kctl) + snd_ctl_rename(cdc->card, kctl, + "Dock Headphone Jack"); + } } static void cs35l41_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action) -- 2.53.0