From patchwork Sun Feb 20 21:38:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linux User #330250 X-Patchwork-Id: 83755 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 09C36B750A for ; Mon, 21 Feb 2011 08:38:41 +1100 (EST) Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by ozlabs.org (Postfix) with SMTP id 0135DB7185 for ; Mon, 21 Feb 2011 08:38:34 +1100 (EST) Received: (qmail invoked by alias); 20 Feb 2011 21:38:31 -0000 Received: from 91-113-115-136.adsl.highway.telekom.at (EHLO hexablack.localnet) [91.113.115.136] by mail.gmx.net (mp015) with SMTP; 20 Feb 2011 22:38:31 +0100 X-Authenticated: #31574488 X-Provags-ID: V01U2FsdGVkX18vWBdd4oAvzLR/3puIjIhKy1a4voJ3PoBfPLG20u GHU4tjcPlDZnS1 From: "Linux User #330250" To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] Add support for PowerMac3,5 in snd-aoa ALSA sound module Date: Sun, 20 Feb 2011 22:38:28 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.38-rc5-git2-4; KDE/4.4.5; x86_64; ; ) MIME-Version: 1.0 Message-Id: <201102202238.28517.linuxuser330250@gmx.net> X-Y-GMX-Trusted: 0 Cc: Takashi Iwai , Johannes Berg X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Hello again! Sorry for sending the patch three times. (This is the fourth...) About the sign-off: I use the name I've been using since I started participating. The document $LINUX/Documentation/SubmittingPatches clearly states that one has to use real names. I'm breaking this rule, but I'm not ready to reveal my real name here or at any other place at this time. Sorry. If this patch is not accepted due to this, well… that's life. BTW my real given name is Andreas. So, here's the patch, this time with a (pseudonym) sign-off: This patch makes the snd-aoa ALSA sound module support the TAS3001C codec of my Apple Power Mac G4 "Quicksilver" (2001 model). I suppose it will also work for the "Quicksilver 2002", since both identify as PowerMac3,5. The patch also changes a few comments to name the exact Power Mac model more accurately in sound/aoa/fabrics/layout.c. Signed-off-by: Andreas aka Linux User #330250 diff -Naur linux-2.6.38-rc5-git2/sound/aoa/fabrics/layout.c linux-2.6.38-rc5-git2-aoa-PowerMac3,5/sound/aoa/fabrics/layout.c --- linux-2.6.38-rc5-git2/sound/aoa/fabrics/layout.c 2011-01-05 01:50:19.000000000 +0100 +++ linux-2.6.38-rc5-git2-aoa-PowerMac3,5/sound/aoa/fabrics/layout.c 2011-02-17 18:43:26.000000000 +0100 @@ -111,6 +111,7 @@ MODULE_ALIAS("sound-layout-100"); MODULE_ALIAS("aoa-device-id-14"); +MODULE_ALIAS("aoa-device-id-21"); MODULE_ALIAS("aoa-device-id-22"); MODULE_ALIAS("aoa-device-id-35"); @@ -333,14 +334,14 @@ .connections = topaz_input, }, }, - /* Quad PowerMac (analog in, analog/digital out) */ + /* PowerMac11,2 (G5 Dual-Core and Quad) (analog in, analog/digital out) */ { .layout_id = 68, .codecs[0] = { .name = "onyx", .connections = onyx_connections_nomic, }, }, - /* Quad PowerMac (digital in) */ + /* PowerMac11,2 (G5 Dual-Core and Quad) (digital in) */ { .layout_id = 69, .codecs[0] = { .name = "topaz", @@ -521,14 +522,21 @@ .connections = onyx_connections_noheadphones, }, },--- - /* PowerMac3,4 */ + /* PowerMac3,4 (Digital Audio) */ { .device_id = 14, .codecs[0] = { .name = "tas", .connections = tas_connections_noline, }, }, - /* PowerMac3,6 */ + /* PowerMac3,5 (Quicksilver) */ + { .device_id = 21, + .codecs[0] = { + .name = "tas", + .connections = tas_connections_noline, + }, + }, + /* PowerMac3,6 (Mirrored Drive Doors) */ { .device_id = 22, .codecs[0] = { .name = "tas", diff -Naur linux-2.6.38-rc5-git2/sound/aoa/soundbus/i2sbus/core.c linux-2.6.38-rc5-git2-aoa-PowerMac3,5/sound/aoa/soundbus/i2sbus/core.c --- linux-2.6.38-rc5-git2/sound/aoa/soundbus/i2sbus/core.c 2011-01-05 01:50:19.000000000 +0100 +++ linux-2.6.38-rc5-git2-aoa-PowerMac3,5/sound/aoa/soundbus/i2sbus/core.c 2011-02-17 18:44:36.000000000 +0100 @@ -200,7 +200,7 @@ * We probably cannot handle all device-id machines, * so restrict to those we do handle for now. */ - if (id && (*id == 22 || *id == 14 || *id == 35)) { + if (id && (*id == 22 || *id == 21 || *id == 14 || *id == 35)) { snprintf(dev->sound.modalias, 32, "aoa-device-id-%d", *id); ok = 1;