All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch] sound/aoa: Add support for iBook G4 (powerbook6,5)
@ 2023-03-01  8:30 ` Thaison Nguyen
  0 siblings, 0 replies; 2+ messages in thread
From: Thaison Nguyen @ 2023-03-01  8:30 UTC (permalink / raw)
  To: johannes; +Cc: alsa-devel, linuxppc-dev

The audio on my iBook G4 (powerbook65) has not been working.
This is because the ids of the device were missing in the aoa audio driver.
With this patch, the IDs of Powerbook6,4 and Powerbook6,5 are added to the driver.

Signed-off-by: Thaison Nguyen <mail@thaison-nguyen.de>
---
 sound/aoa/fabrics/layout.c       | 15 +++++++++++++++
 sound/aoa/soundbus/i2sbus/core.c |  2 +-
 2 files changed, 16 insertions(+), 1 deletions(-)

diff a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c
--- a/sound/aoa/fabrics/layout.c
+++ b/sound/aoa/fabrics/layout.c
@@ -111,7 +111,9 @@
 MODULE_ALIAS("aoa-device-id-14");
 MODULE_ALIAS("aoa-device-id-22");
 MODULE_ALIAS("aoa-device-id-31");
 MODULE_ALIAS("aoa-device-id-35");
+MODULE_ALIAS("aoa-device-id-38");
+MODULE_ALIAS("aoa-device-id-40");
 MODULE_ALIAS("aoa-device-id-44");
 
 /* onyx with all but microphone connected */
@@ -368,7 +368,20 @@
 		.connections = tas_connections_nolineout,
 	  },
 	},
+	/* PowerBook6,4 */
+	{ .device_id = 40,
+	  .codecs[0] = {
+		.name = "tas",
+		.connections = tas_connections_all,
+	  },
+	},
 	/* PowerBook6,5 */
+	{ .device_id = 38,
+	  .codecs[0] = {
+		.name = "tas",
+		.connections = tas_connections_all,
+	  },
+	},
 	{ .device_id = 44,
 	  .codecs[0] = {
 		.name = "tas",
diff a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c
--- a/sound/aoa/soundbus/i2sbus/core.c
+++ b/sound/aoa/soundbus/i2sbus/core.c
@@ -197,7 +197,7 @@
 			 * so restrict to those we do handle for now.
 			 */
 			if (id && (*id == 22 || *id == 14 || *id == 35 ||
-				   *id == 31 || *id == 44)) {
+				   *id == 31 || *id == 44 || *id == 40 || *id == 38)) {
 				snprintf(dev->sound.modalias, 32,
 					 "aoa-device-id-%d", *id);
 				ok = 1;



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

* [Patch] sound/aoa: Add support for iBook G4 (powerbook6,5)
@ 2023-03-01  8:30 ` Thaison Nguyen
  0 siblings, 0 replies; 2+ messages in thread
From: Thaison Nguyen @ 2023-03-01  8:30 UTC (permalink / raw)
  To: johannes; +Cc: linuxppc-dev, alsa-devel, 'Christophe Leroy'

The audio on my iBook G4 (powerbook65) has not been working.
This is because the ids of the device were missing in the aoa audio driver.
With this patch, the IDs of Powerbook6,4 and Powerbook6,5 are added to the driver.

Signed-off-by: Thaison Nguyen <mail@thaison-nguyen.de>
---
 sound/aoa/fabrics/layout.c       | 15 +++++++++++++++
 sound/aoa/soundbus/i2sbus/core.c |  2 +-
 2 files changed, 16 insertions(+), 1 deletions(-)

diff a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c
--- a/sound/aoa/fabrics/layout.c
+++ b/sound/aoa/fabrics/layout.c
@@ -111,7 +111,9 @@
 MODULE_ALIAS("aoa-device-id-14");
 MODULE_ALIAS("aoa-device-id-22");
 MODULE_ALIAS("aoa-device-id-31");
 MODULE_ALIAS("aoa-device-id-35");
+MODULE_ALIAS("aoa-device-id-38");
+MODULE_ALIAS("aoa-device-id-40");
 MODULE_ALIAS("aoa-device-id-44");
 
 /* onyx with all but microphone connected */
@@ -368,7 +368,20 @@
 		.connections = tas_connections_nolineout,
 	  },
 	},
+	/* PowerBook6,4 */
+	{ .device_id = 40,
+	  .codecs[0] = {
+		.name = "tas",
+		.connections = tas_connections_all,
+	  },
+	},
 	/* PowerBook6,5 */
+	{ .device_id = 38,
+	  .codecs[0] = {
+		.name = "tas",
+		.connections = tas_connections_all,
+	  },
+	},
 	{ .device_id = 44,
 	  .codecs[0] = {
 		.name = "tas",
diff a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c
--- a/sound/aoa/soundbus/i2sbus/core.c
+++ b/sound/aoa/soundbus/i2sbus/core.c
@@ -197,7 +197,7 @@
 			 * so restrict to those we do handle for now.
 			 */
 			if (id && (*id == 22 || *id == 14 || *id == 35 ||
-				   *id == 31 || *id == 44)) {
+				   *id == 31 || *id == 44 || *id == 40 || *id == 38)) {
 				snprintf(dev->sound.modalias, 32,
 					 "aoa-device-id-%d", *id);
 				ok = 1;



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

end of thread, other threads:[~2023-03-01 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-01  8:30 [Patch] sound/aoa: Add support for iBook G4 (powerbook6,5) Thaison Nguyen
2023-03-01  8:30 ` Thaison Nguyen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.