From nobody Sat Mar 22 15:57:22 2025 X-Original-To: dev-commits-src-all@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 4ZKkTv4tnxz5qfCH; Sat, 22 Mar 2025 15:57:23 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZKkTt4N3cz3smJ; Sat, 22 Mar 2025 15:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742659042; 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=koL6p+TKKZ36AjA86xLsNSPPaMmixDJt5+RD90+2XlQ=; b=HXWpaKQ/XgWlwcjc9Mo1nhdQnhkgRYcudnZul9U1IyqS0dacqMbwvRffkldAsWEQOdBQXb CWbDnrulnc29or4tVEPJNfEZwYxj+LH7yB38gp2MQeWA8PbNJsT9JRPLPOIw7RyW8MXf4W lN9kgav74OHCtQJoptVa+Yk5CSaYcJnDd7Hc56zTn2xJ4dn5XpkTo/NdT7cNLrgMGdaN3i IQ8hoWENnB4YiRDTNrFqHhXdyExedisxwSygR7i0Z2U3G32RkeS/Go6JCDMbNh7q6EJc0Q cm11llPGMtWttSRhvx25eUQqHvPbGhSu2RgnAle43qhCpvrEB0JDeh6b9ZD0NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742659042; a=rsa-sha256; cv=none; b=WCLTWT15RcVLx6lkYk57JYNv25TU3Dv23RqzwKn58mrVa8aOxFRsgqLSe+AIFphYveyXev sv1b63QN+Xoz6fw4n9U4wuYrx7cgQBoahyuJmt4PTd8jZ3f9dyiyCj2rqolvAYTiFMTWRa Vq3ZewRheFWpbtAr0BCAifm60ZfWKEDA97bYaclGD/aDFJRhHUqvaLw61CuIBzBQ6JaD4T 7QfSbUjJ0/cC/Rt88F0F+sLL5Haf+3TMk0N/M5HQYZkThO/689wkMIa4uCMrjLjgdjC+aF z5IPJhMqTwDYmqDXtZEbNhoAmpmMJaNVBqWzjOsvHeODTDBM/y27D891YsVqng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742659042; 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=koL6p+TKKZ36AjA86xLsNSPPaMmixDJt5+RD90+2XlQ=; b=Yrn2Hy85149cKStUN2OIYfynvOjwUiEVlsneyYhSDY1pfOJybF6nGasceRHDEwIQBxAbIE vfGHnymSZDsFvrMdv+AbqA6Qno5swyeZJAm9/wkiT9CnURQ3G3rLXCMqejrBtM4w5A+Z7d XWPhTt5jH7T4Xsa5L9kF/8rIkKjfZWPckgHmW1uQ8lxGNnfSrlc/1t218Y0kSTr03r77AS h5Phi1x3zX/mtUMlq0HpoVQthWbe3aTPWFjY0nVi0TBNYfQK0n0Zsr6b0r512KoMPSX8qM I8mZZXqqPXH5/hIx2liz8iXs8dt+4NCRvTCigsxtYTHxlG+qEJasteTt5hkSGA== 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 4ZKkTt3x62zCBB; Sat, 22 Mar 2025 15:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52MFvMjp003202; Sat, 22 Mar 2025 15:57:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52MFvMn9003199; Sat, 22 Mar 2025 15:57:22 GMT (envelope-from git) Date: Sat, 22 Mar 2025 15:57:22 GMT Message-Id: <202503221557.52MFvMn9003199@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 23db5fccb60a - main - hda: add macbook air 6,1 and 6,2 GPIO to enable amplifier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23db5fccb60a1b008c7cbd3a6b88f9a6b1bac167 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=23db5fccb60a1b008c7cbd3a6b88f9a6b1bac167 commit 23db5fccb60a1b008c7cbd3a6b88f9a6b1bac167 Author: Adrian Chadd AuthorDate: 2023-01-24 07:37:14 +0000 Commit: Adrian Chadd CommitDate: 2025-03-22 15:56:34 +0000 hda: add macbook air 6,1 and 6,2 GPIO to enable amplifier GPIO0 needs to be flipped on to enable the amplifier. The CS4208 looks /sort/ of like previous cirrus logic codecs, enough for audio to work. This actually provides working audio on my mbair 6,2 but it doesn't yet detect the jack. That requires patches to the pin configs, which is going to need some further work. Differential Revision: https://reviews.freebsd.org/D49350 Reviewed by: christos --- sys/dev/sound/pci/hda/hdaa.c | 2 +- sys/dev/sound/pci/hda/hdaa_patches.c | 6 ++++++ sys/dev/sound/pci/hda/hdac.h | 3 +++ sys/dev/sound/pci/hda/hdacc.c | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index ac62c04b5374..1e486b01b168 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -2912,7 +2912,7 @@ hdaa_dump_gpo(struct hdaa_devinfo *devinfo) data = hda_command(dev, HDA_CMD_GET_GPO_DATA(0, devinfo->nid)); for (i = 0; i < HDA_PARAM_GPIO_COUNT_NUM_GPO(devinfo->gpio_cap); i++) { - device_printf(dev, " GPO%d: state=%d", i, + device_printf(dev, " GPO%d: state=%d\n", i, (data >> i) & 1); } } diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index 8ad1c845c254..0e88a63e2423 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -113,6 +113,12 @@ static const struct { { APPLE_MACBOOKAIR31, HDA_CODEC_CS4206, HDA_MATCH_ALL, 0, 0, HDAA_GPIO_SET(1) | HDAA_GPIO_SET(3) }, + { HDA_MATCH_ALL, HDA_CODEC_CS4208, APPLE_MACBOOKAIR61, + 0, 0, + HDAA_GPIO_SET(0) }, + { HDA_MATCH_ALL, HDA_CODEC_CS4208, APPLE_MACBOOKAIR62, + 0, 0, + HDAA_GPIO_SET(0) }, { APPLE_MACBOOKPRO55, HDA_CODEC_CS4206, HDA_MATCH_ALL, 0, 0, HDAA_GPIO_SET(1) | HDAA_GPIO_SET(3) }, diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 9b11dcba32a8..231839327530 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -426,6 +426,8 @@ */ #define APPLE_INTEL_MAC 0x76808384 #define APPLE_MACBOOKAIR31 0x0d9410de +#define APPLE_MACBOOKAIR61 0x106b7100 +#define APPLE_MACBOOKAIR62 0x106b7200 #define APPLE_MACBOOKPRO55 0xcb7910de #define APPLE_MACBOOKPRO71 0xcb8910de @@ -540,6 +542,7 @@ #define CIRRUSLOGIC_VENDORID 0x1013 #define HDA_CODEC_CS4206 HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4206) #define HDA_CODEC_CS4207 HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4207) +#define HDA_CODEC_CS4208 HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4208) #define HDA_CODEC_CS4210 HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4210) #define HDA_CODEC_CSXXXX HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0xffff) diff --git a/sys/dev/sound/pci/hda/hdacc.c b/sys/dev/sound/pci/hda/hdacc.c index b4321a5bf998..4198982c9c2a 100644 --- a/sys/dev/sound/pci/hda/hdacc.c +++ b/sys/dev/sound/pci/hda/hdacc.c @@ -74,6 +74,7 @@ static const struct { } hdacc_codecs[] = { { HDA_CODEC_CS4206, 0, "Cirrus Logic CS4206" }, { HDA_CODEC_CS4207, 0, "Cirrus Logic CS4207" }, + { HDA_CODEC_CS4208, 0, "Cirrus Logic CS4208" }, { HDA_CODEC_CS4210, 0, "Cirrus Logic CS4210" }, { HDA_CODEC_ALC215, 0, "Realtek ALC215" }, { HDA_CODEC_ALC221, 0, "Realtek ALC221" },