public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-kernel/asahi-sources/, sys-kernel/asahi-sources/files/
@ 2024-07-18  8:06 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2024-07-18  8:06 UTC (permalink / raw
  To: gentoo-commits

commit:     32e34f32409cfe76a974e6f53f48872e894ad83a
Author:     James Calligeros <jcalligeros99 <AT> gmail <DOT> com>
AuthorDate: Thu Jul 18 02:53:40 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jul 18 08:04:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32e34f32

sys-kernel/asahi-sources: drop stale SPI patch

This patch to SPI breaks M1 series SoCs and should have been dropped
with the 6.8 series.

Signed-off-by: James Calligeros <jcalligeros99 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/37599
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ..._p1.ebuild => asahi-sources-6.9.8_p1-r1.ebuild} |  1 -
 ..._p5.ebuild => asahi-sources-6.9.9_p5-r1.ebuild} |  1 -
 .../asahi-6.8.2_revert_spi_stable_asahi.patch      | 46 ----------------------
 3 files changed, 48 deletions(-)

diff --git a/sys-kernel/asahi-sources/asahi-sources-6.9.8_p1.ebuild b/sys-kernel/asahi-sources/asahi-sources-6.9.8_p1-r1.ebuild
similarity index 96%
rename from sys-kernel/asahi-sources/asahi-sources-6.9.8_p1.ebuild
rename to sys-kernel/asahi-sources/asahi-sources-6.9.8_p1-r1.ebuild
index ef7185794376..551f5fbce65e 100644
--- a/sys-kernel/asahi-sources/asahi-sources-6.9.8_p1.ebuild
+++ b/sys-kernel/asahi-sources/asahi-sources-6.9.8_p1-r1.ebuild
@@ -58,7 +58,6 @@ DEPEND="
 UNIPATCH_STRICTORDER="yes"
 UNIPATCH_LIST="
 	${FILESDIR}/asahi-6.8-config-gentoo-Drop-RANDSTRUCT-from-GENTOO_KERNEL_SEL.patch
-	${FILESDIR}/asahi-6.8.2_revert_spi_stable_asahi.patch
 	${DISTDIR}/linux-${ASAHI_TAG}.patch
 "
 

diff --git a/sys-kernel/asahi-sources/asahi-sources-6.9.9_p5.ebuild b/sys-kernel/asahi-sources/asahi-sources-6.9.9_p5-r1.ebuild
similarity index 96%
rename from sys-kernel/asahi-sources/asahi-sources-6.9.9_p5.ebuild
rename to sys-kernel/asahi-sources/asahi-sources-6.9.9_p5-r1.ebuild
index 4b6fa5c16640..c7a931cddb78 100644
--- a/sys-kernel/asahi-sources/asahi-sources-6.9.9_p5.ebuild
+++ b/sys-kernel/asahi-sources/asahi-sources-6.9.9_p5-r1.ebuild
@@ -58,7 +58,6 @@ DEPEND="
 UNIPATCH_STRICTORDER="yes"
 UNIPATCH_LIST="
 	${FILESDIR}/asahi-6.8-config-gentoo-Drop-RANDSTRUCT-from-GENTOO_KERNEL_SEL.patch
-	${FILESDIR}/asahi-6.8.2_revert_spi_stable_asahi.patch
 	${DISTDIR}/linux-${ASAHI_TAG}.patch
 "
 

diff --git a/sys-kernel/asahi-sources/files/asahi-6.8.2_revert_spi_stable_asahi.patch b/sys-kernel/asahi-sources/files/asahi-6.8.2_revert_spi_stable_asahi.patch
deleted file mode 100644
index fc6522e205b8..000000000000
--- a/sys-kernel/asahi-sources/files/asahi-6.8.2_revert_spi_stable_asahi.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
-index 46f153548760..d1b297f438f1 100644
---- a/drivers/spi/spi.c
-+++ b/drivers/spi/spi.c
-@@ -1042,14 +1042,10 @@ static void spi_set_cs(struct spi_device *spi, bool enable, bool force)
- 	if (spi->mode & SPI_CS_HIGH)
- 		enable = !enable;
- 
--	/*
--	 * Handle chip select delays for GPIO based CS or controllers without
--	 * programmable chip select timing.
--	 */
--	if ((spi_is_csgpiod(spi) || !spi->controller->set_cs_timing) && !activate)
--		spi_delay_exec(&spi->cs_hold, NULL);
--
- 	if (spi_is_csgpiod(spi)) {
-+		if (!spi->controller->set_cs_timing && !activate)
-+			spi_delay_exec(&spi->cs_hold, NULL);
-+
- 		if (!(spi->mode & SPI_NO_CS)) {
- 			/*
- 			 * Historically ACPI has no means of the GPIO polarity and
-@@ -1083,16 +1079,16 @@ static void spi_set_cs(struct spi_device *spi, bool enable, bool force)
- 		if ((spi->controller->flags & SPI_CONTROLLER_GPIO_SS) &&
- 		    spi->controller->set_cs)
- 			spi->controller->set_cs(spi, !enable);
-+
-+		if (!spi->controller->set_cs_timing) {
-+			if (activate)
-+				spi_delay_exec(&spi->cs_setup, NULL);
-+			else
-+				spi_delay_exec(&spi->cs_inactive, NULL);
-+		}
- 	} else if (spi->controller->set_cs) {
- 		spi->controller->set_cs(spi, !enable);
- 	}
--
--	if (spi_is_csgpiod(spi) || !spi->controller->set_cs_timing) {
--		if (activate)
--			spi_delay_exec(&spi->cs_setup, NULL);
--		else
--			spi_delay_exec(&spi->cs_inactive, NULL);
--	}
- }
- 
- #ifdef CONFIG_HAS_DMA


^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-kernel/asahi-sources/, sys-kernel/asahi-sources/files/
@ 2024-02-06  3:26 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2024-02-06  3:26 UTC (permalink / raw
  To: gentoo-commits

commit:     d1163041a2fda197faedefb0e7f2410fc62db297
Author:     James Calligeros <jcalligeros99 <AT> gmail <DOT> com>
AuthorDate: Sun Feb  4 03:12:37 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb  6 03:24:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1163041

sys-kernel/asahi-sources: new package, add 6.6.0_p15

Signed-off-by: James Calligeros <jcalligeros99 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-kernel/asahi-sources/Manifest                  |  1 +
 .../asahi-sources/asahi-sources-6.6.0_p15.ebuild   | 69 +++++++++++++++++++
 ...-sources-6.6.0_p15-enable-speakers-stage1.patch | 78 ++++++++++++++++++++++
 ...-sources-6.6.0_p15-enable-speakers-stage2.patch | 47 +++++++++++++
 sys-kernel/asahi-sources/metadata.xml              | 18 +++++
 5 files changed, 213 insertions(+)

diff --git a/sys-kernel/asahi-sources/Manifest b/sys-kernel/asahi-sources/Manifest
new file mode 100644
index 000000000000..42188bc6d33d
--- /dev/null
+++ b/sys-kernel/asahi-sources/Manifest
@@ -0,0 +1 @@
+DIST asahi-sources-6.6.0_p15.tar.gz 229858421 BLAKE2B f0cdce0421bb8637d52e82d2ff0b7e07c29e828783c7cb8733f1582916be81bfd14a0b6a98f51f633ee9da3d10aa1fff6b27c5779bd9fa55c1d04615173d6d4b SHA512 b261e3813f1c0f5bae3a24e7ed0dce41470cfe2ee965ab0121d41793aa08f72d0d91be633f7ba0317f265a6e98a7a134cf86a29e7d48dbb58c5f5f7a3a13cc53

diff --git a/sys-kernel/asahi-sources/asahi-sources-6.6.0_p15.ebuild b/sys-kernel/asahi-sources/asahi-sources-6.6.0_p15.ebuild
new file mode 100644
index 000000000000..f462385c5aac
--- /dev/null
+++ b/sys-kernel/asahi-sources/asahi-sources-6.6.0_p15.ebuild
@@ -0,0 +1,69 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+K_SECURITY_UNSUPPORTED="1"
+ETYPE="sources"
+#K_WANT_GENPATCHES="base extras experimental"
+#K_GENPATCHES_VER="5"
+K_NODRYRUN="1"
+
+inherit kernel-2
+detect_version
+detect_arch
+
+if [[ ${PV} != ${PV/_rc} ]] ; then
+	# $PV is expected to be of following form: 6.0_rc5_p1
+	MY_TAG="$(ver_cut 6)"
+	MY_P="asahi-$(ver_rs 2 - $(ver_cut 1-4))-${MY_TAG}"
+else
+	# $PV is expected to be of following form: 5.19.0_p1
+	MY_TAG="$(ver_cut 5)"
+	MY_P="asahi-$(ver_cut 1-2)-${MY_TAG}"
+fi
+
+DESCRIPTION="Asahi Linux kernel sources"
+HOMEPAGE="https://asahilinux.org"
+KERNEL_URI="https://github.com/AsahiLinux/linux/archive/refs/tags/${MY_P}.tar.gz -> ${PN}-${PV}.tar.gz"
+SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
+
+KEYWORDS="~arm64"
+IUSE="rust"
+
+DEPEND="
+	${DEPEND}
+	rust? ( || ( dev-lang/rust[rust-src]
+				 dev-lang/rust-bin[rust-src]
+			)
+			dev-util/bindgen
+		)
+"
+
+PATCHES=(
+		"${FILESDIR}/${P}-enable-speakers-stage1.patch"
+		"${FILESDIR}/${P}-enable-speakers-stage2.patch"
+)
+
+src_unpack() {
+	unpack ${PN}-${PV}.tar.gz
+	mv linux-${MY_P} linux-${KV_FULL} || die "Could not move source tree"
+}
+
+src_prepare() {
+	default
+	cd "${WORKDIR}/linux-${KV-FULL}" || die
+	# XXX: Genpatches do not yet work with Rust kernels
+	#handle_genpatches --set-unipatch-list
+	#[[ -n ${UNIPATCH_LIST} || -n ${UNIPATCH_LIST_GENPATCHES} || -n ${UNIPATCH_LIST_DEFAULT} ]] && \
+	#	unipatch "${UNIPATCH_LIST_DEFAULT} ${UNIPATCH_LIST_GENPATCHES} ${UNIPATCH_LIST}"
+	#unpack_fix_install_path
+	#env_setup_xmakeopts
+	echo "-${MY_TAG}" > localversion.10-pkgrel || die
+	cd "${S}" || die
+}
+
+pkg_postinst() {
+	einfo "For more information about Asahi Linux please visit ${HOMEPAGE},"
+	einfo "or consult the Wiki at https://github.com/AsahiLinux/docs/wiki."
+	kernel-2_pkg_postinst
+}

diff --git a/sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p15-enable-speakers-stage1.patch b/sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p15-enable-speakers-stage1.patch
new file mode 100644
index 000000000000..1e5d9c74f1c1
--- /dev/null
+++ b/sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p15-enable-speakers-stage1.patch
@@ -0,0 +1,78 @@
+From 385ea7b5023486aba7919cec8b6b3f6a843a1013 Mon Sep 17 00:00:00 2001
+From: Hector Martin <marcan@marcan.st>
+Date: Fri, 15 Dec 2023 20:38:32 +0900
+Subject: [PATCH] READ COMMIT MESSAGE! macaudio: Enable first round of models
+
+Enables j313, j293, j493, j314, j414, j274, j375, j473, j474, j475
+
+*** WARNING FOR DISTRO PACKAGERS WANTING TO APPLY THIS: ***
+*** YOU ABSOLUTELY NEED THIS PATCH IN YOUR LSP-PLUGINS PACKAGE ***
+
+https://github.com/lsp-plugins/lsp-dsp-lib/pull/20
+
+Do NOT enable speakers without that patch, on any model. It can/will
+result in nasty noise that could damage them.
+
+Signed-off-by: Hector Martin <marcan@marcan.st>
+---
+ sound/soc/apple/macaudio.c | 20 ++++++++++++--------
+ 1 file changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/sound/soc/apple/macaudio.c b/sound/soc/apple/macaudio.c
+index f5b349057a67e1..d2ced87e88c0e1 100644
+--- a/sound/soc/apple/macaudio.c
++++ b/sound/soc/apple/macaudio.c
+@@ -1490,23 +1490,27 @@ struct macaudio_platform_cfg macaudio_j180_cfg = {
+ 	false,	AMP_SN012776,	SPKR_1W1T,	false,	10,	-20,
+ };
+ struct macaudio_platform_cfg macaudio_j274_cfg = {
+-	false,	AMP_TAS5770,	SPKR_1W,	false,	20,	-20,
++	true,	AMP_TAS5770,	SPKR_1W,	false,	20,	-20,
+ };
+
+ struct macaudio_platform_cfg macaudio_j293_cfg = {
+-	false,	AMP_TAS5770,	SPKR_2W,	true,	15,	-20,
++	true,	AMP_TAS5770,	SPKR_2W,	true,	15,	-20,
+ };
+
+ struct macaudio_platform_cfg macaudio_j313_cfg = {
+-	false,	AMP_TAS5770,	SPKR_1W,	true,	10,	-20,
++	true,	AMP_TAS5770,	SPKR_1W,	true,	10,	-20,
+ };
+
+-struct macaudio_platform_cfg macaudio_j314_j316_cfg = {
++struct macaudio_platform_cfg macaudio_j314_cfg = {
++	true,	AMP_SN012776,	SPKR_2W1T,	true,	15,	-20,
++};
++
++struct macaudio_platform_cfg macaudio_j316_cfg = {
+ 	false,	AMP_SN012776,	SPKR_2W1T,	true,	15,	-20,
+ };
+
+ struct macaudio_platform_cfg macaudio_j37x_j47x_cfg = {
+-	false,	AMP_SN012776,	SPKR_1W,	false,	20,	-20,
++	true,	AMP_SN012776,	SPKR_1W,	false,	20,	-20,
+ };
+
+ struct macaudio_platform_cfg macaudio_j413_cfg = {
+@@ -1522,7 +1526,7 @@ struct macaudio_platform_cfg macaudio_j45x_cfg = {
+ };
+
+ struct macaudio_platform_cfg macaudio_j493_cfg = {
+-	false,	AMP_SN012776,	SPKR_2W,	true,	15,	-20,
++	true,	AMP_SN012776,	SPKR_2W,	true,	15,	-20,
+ };
+
+ struct macaudio_platform_cfg macaudio_fallback_cfg = {
+@@ -1558,9 +1562,9 @@ static const struct of_device_id macaudio_snd_device_id[]  = {
+ 	/* j313    AID4    tas5770     10      2× 1W */
+ 	{ .compatible = "apple,j313-macaudio", .data = &macaudio_j313_cfg },
+ 	/* j314    AID8    sn012776    15      2× 2W+1T */
+-	{ .compatible = "apple,j314-macaudio", .data = &macaudio_j314_j316_cfg },
++	{ .compatible = "apple,j314-macaudio", .data = &macaudio_j314_cfg },
+ 	/* j316    AID9    sn012776    15      2× 2W+1T */
+-	{ .compatible = "apple,j316-macaudio", .data = &macaudio_j314_j316_cfg },
++	{ .compatible = "apple,j316-macaudio", .data = &macaudio_j316_cfg },
+ 	/* j375    AID10   sn012776    15      1× 1W */
+ 	{ .compatible = "apple,j375-macaudio", .data = &macaudio_j37x_j47x_cfg },
+ 	/* j413    AID13   sn012776    15      2× 1W+1T */

diff --git a/sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p15-enable-speakers-stage2.patch b/sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p15-enable-speakers-stage2.patch
new file mode 100644
index 000000000000..5a83346337fa
--- /dev/null
+++ b/sys-kernel/asahi-sources/files/asahi-sources-6.6.0_p15-enable-speakers-stage2.patch
@@ -0,0 +1,47 @@
+From 6a24102c06c95951ab992e2d41336cc6d4bfdf23 Mon Sep 17 00:00:00 2001
+From: Hector Martin <marcan@marcan.st>
+Date: Fri, 15 Dec 2023 20:40:53 +0900
+Subject: [PATCH] READ COMMIT MESSAGE! macaudio: Enable second round of models
+
+Enables j316, j413, j415, j416
+
+*** WARNING FOR DISTRO PACKAGERS WANTING TO APPLY THIS: ***
+*** YOU ABSOLUTELY NEED THIS PATCH IN YOUR LSP-PLUGINS PACKAGE ***
+
+https://github.com/lsp-plugins/lsp-dsp-lib/pull/20
+
+Do NOT enable speakers without that patch, on any model. It can/will
+result in nasty noise that could damage them.
+
+Signed-off-by: Hector Martin <marcan@marcan.st>
+---
+ sound/soc/apple/macaudio.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/sound/soc/apple/macaudio.c b/sound/soc/apple/macaudio.c
+index d2ced87e88c0e1..f347f08b7ad01e 100644
+--- a/sound/soc/apple/macaudio.c
++++ b/sound/soc/apple/macaudio.c
+@@ -1506,7 +1506,7 @@ struct macaudio_platform_cfg macaudio_j314_cfg = {
+ };
+
+ struct macaudio_platform_cfg macaudio_j316_cfg = {
+-	false,	AMP_SN012776,	SPKR_2W1T,	true,	15,	-20,
++	true,	AMP_SN012776,	SPKR_2W1T,	true,	15,	-20,
+ };
+
+ struct macaudio_platform_cfg macaudio_j37x_j47x_cfg = {
+@@ -1514,11 +1514,11 @@ struct macaudio_platform_cfg macaudio_j37x_j47x_cfg = {
+ };
+
+ struct macaudio_platform_cfg macaudio_j413_cfg = {
+-	false,	AMP_SN012776,	SPKR_1W1T,	true,	15,	-20,
++	true,	AMP_SN012776,	SPKR_1W1T,	true,	15,	-20,
+ };
+
+ struct macaudio_platform_cfg macaudio_j415_cfg = {
+-	false,	AMP_SN012776,	SPKR_2W1T,	true,	15,	-20,
++	true,	AMP_SN012776,	SPKR_2W1T,	true,	15,	-20,
+ };
+
+ struct macaudio_platform_cfg macaudio_j45x_cfg = {

diff --git a/sys-kernel/asahi-sources/metadata.xml b/sys-kernel/asahi-sources/metadata.xml
new file mode 100644
index 000000000000..c0d62b1d2362
--- /dev/null
+++ b/sys-kernel/asahi-sources/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person">
+    <email>jcalligeros99@gmail.com</email>
+    <name>James Calligeros</name>
+  </maintainer>
+  <maintainer type="project">
+    <email>asahi@gentoo.org</email>
+  </maintainer>
+  <use>
+    <flag name="symlink">Automatically symlink the kernel sources to /usr/src/linux</flag>
+    <flag name="rust">Pull in the Rust For Linux dependencies</flag>
+  </use>
+  <upstream>
+    <remote-id type="github">AsahiLinux/linux</remote-id>
+  </upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-18  8:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-18  8:06 [gentoo-commits] repo/gentoo:master commit in: sys-kernel/asahi-sources/, sys-kernel/asahi-sources/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-02-06  3:26 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox