From nobody Sun Feb 18 17:08:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TdBvG5Vpqz5BDG1; Sun, 18 Feb 2024 17:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TdBvG4yG6z4Qd6; Sun, 18 Feb 2024 17:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708276090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KQX/d0gQ+GXJ/tGJEk3bHoy552oNZbPPDu9T7US2+E=; b=mOE/WhlvTqKu66k1xaLaRvbuTRqT0ABv2WeypK3zC/nvwqqJtxvzRIC1gr/B1JE8+pXOKB ft524/dR+xf7kkwIPUfSu1jwMPtATeuoK/RbN+/9VVzme4APm8UipEtSWHNZCllxFeH12+ UkqH0NkhGg7/QpeYnVz/VsD2gQ4ql5tOv6M87EDrP/4xrOTCey4Rv/UlH+sVGBqCeepBQu /mrgk4pVZROy2FmiVgYMH1KX2T8YjvD9fZh1INIOCxXkJeJfgwIyHvceyoZXWscKHEEgH3 pVfRoRlcyKSq0wloo1tzrpWcONUnmNUITSdNtcM7aEpSPEyLdM3VxU6thjanxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708276090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KQX/d0gQ+GXJ/tGJEk3bHoy552oNZbPPDu9T7US2+E=; b=s20jmaOgczPoC6OWS6jZOJfFfJg/j52BdtUq3roxnLKgmh+tV1vOmWDWGiWehnL8mjjshx qbfO5XdLc+QMw7nmpMBwUtDXlS04eo3UizPfC0ECkpkkp1VqlADzuLTikFoFc0YNnZKgyY JsTHoMX6oS4IOlUHTghK4K1KJNqhGiK8/gmxKKTohCk9//Wb9h85+ucu3PVkWlFhUtOEaJ IJo9w+uPA9egIeZ4BrpORjEjEY50IxuG8gJratJBvQz6tr6c/uQy6xJXZn88djwKqGkIu7 crcaO9Fy8o22VOfIfKUAjuSG2qqg+4JdFJ0gKmMXumgDm7rwdsh3hgFXU/eC0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708276090; a=rsa-sha256; cv=none; b=xIy6wnZLVHSHxiVwYHdNdsWSCt0QOF7VKURuQHSLbnikS+Wfhaj10cZIyHj+DLTHDcufDX fn36H44hoY6wKeUwTapb954CohkdIXYhoM5dIycZyC/ezsINrywTGyEfRkfZAm0b25wxHO e0mB0BctO6zPnFBfEdF0RFktKsaj4rrWCtD6xhxtIHgWwFJuvyRy92fuVZTYSSIhykdMEK yflGc2UV7MVTt/efFwmDx5u3mVES+fPPg/qEuPouIlOEnRhYHbmJqF6ACbufJHiIRjQnIk 6ujbd3d0LDtc4y3yg/Jy14sc7QCgVXmJV2Dv8ZslSacwkPK4PlB+4TEt7cSx1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TdBvG3jFMz10N3; Sun, 18 Feb 2024 17:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41IH8AQX097462; Sun, 18 Feb 2024 17:08:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41IH8AOY097459; Sun, 18 Feb 2024 17:08:10 GMT (envelope-from git) Date: Sun, 18 Feb 2024 17:08:10 GMT Message-Id: <202402181708.41IH8AOY097459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 5968e477a560 - main - snd_hda: Add patches for the Lenovo Ideapad 330-15 and ThinkPad X230 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5968e477a560406c480d78ebe438a04f57121119 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5968e477a560406c480d78ebe438a04f57121119 commit 5968e477a560406c480d78ebe438a04f57121119 Author: Dmitry Lukhtionov AuthorDate: 2024-02-18 17:07:39 +0000 Commit: Christos Margiolis CommitDate: 2024-02-18 17:07:39 +0000 snd_hda: Add patches for the Lenovo Ideapad 330-15 and ThinkPad X230 PR: 259640 MFC after: 2 weeks Reviewed by: delphij, markj Differential Revision: https://reviews.freebsd.org/D43804 --- sys/dev/sound/pci/hda/hdaa_patches.c | 20 ++++++++++++++++++++ sys/dev/sound/pci/hda/hdac.h | 2 ++ sys/dev/sound/pci/hda/hdacc.c | 1 + 3 files changed, 23 insertions(+) diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index 5bb4dcd79af7..3a7dfc63637a 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -338,6 +338,26 @@ hdac_pin_patch(struct hdaa_widget *w) patch_str = "as=3 seq=15 color=Black loc=Left"; break; } + } else if (id == HDA_CODEC_ALC230 && + subid == LENOVO_I330_SUBVENDOR) { + switch (nid) { + case 20: + patch_str = "as=1 seq=0 device=Speaker"; + break; + case 33: + patch_str = "as=1 seq=15 device=Headphones"; + break; + } + } else if (id == HDA_CODEC_ALC269 && + subid == LENOVO_X230_SUBVENDOR) { + switch (nid) { + case 21: + patch_str = "as=1 seq=15"; + break; + case 24: + patch_str = "as=4 seq=15"; + break; + } } else { /* * loop over hdaa_model_pin_patch diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index c3951edd362c..31bdc9130d9b 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -377,6 +377,7 @@ #define LENOVO_L5AMD_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x381b) #define LENOVO_L5INTEL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x380f) #define LENOVO_3000_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e) +#define LENOVO_I330_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3808) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) /* Samsung */ @@ -537,6 +538,7 @@ #define HDA_CODEC_ALC221 HDA_CODEC_CONSTRUCT(REALTEK, 0x0221) #define HDA_CODEC_ALC222 HDA_CODEC_CONSTRUCT(REALTEK, 0x0222) #define HDA_CODEC_ALC225 HDA_CODEC_CONSTRUCT(REALTEK, 0x0225) +#define HDA_CODEC_ALC230 HDA_CODEC_CONSTRUCT(REALTEK, 0x0230) #define HDA_CODEC_ALC231 HDA_CODEC_CONSTRUCT(REALTEK, 0x0231) #define HDA_CODEC_ALC233 HDA_CODEC_CONSTRUCT(REALTEK, 0x0233) #define HDA_CODEC_ALC234 HDA_CODEC_CONSTRUCT(REALTEK, 0x0234) diff --git a/sys/dev/sound/pci/hda/hdacc.c b/sys/dev/sound/pci/hda/hdacc.c index f815e39392d4..123c64d9c487 100644 --- a/sys/dev/sound/pci/hda/hdacc.c +++ b/sys/dev/sound/pci/hda/hdacc.c @@ -79,6 +79,7 @@ static const struct { { HDA_CODEC_ALC221, 0, "Realtek ALC221" }, { HDA_CODEC_ALC222, 0, "Realtek ALC222" }, { HDA_CODEC_ALC225, 0, "Realtek ALC225" }, + { HDA_CODEC_ALC230, 0, "Realtek ALC230" }, { HDA_CODEC_ALC231, 0, "Realtek ALC231" }, { HDA_CODEC_ALC233, 0, "Realtek ALC233" }, { HDA_CODEC_ALC234, 0, "Realtek ALC234" },