diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-04-16 18:24:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:24:32 -0400 |
commit | 7bbd827750e630003896c96d0212962276ee5d91 (patch) | |
tree | 71bb72cddbb08f9de68b2c7c05b4f5c03e8ed0bd /include/asm-ppc | |
parent | b20af5f59797796d28b701f5d337e47c8a142eb2 (diff) |
[PATCH] ppc64: very basic desktop g5 sound support
This patch hacks the current PowerMac Alsa driver to add some basic support
of analog sound output to some desktop G5s. It has severe limitations
though:
- Only 44100Khz 16 bits
- Only work on G5 models using a TAS3004 analog code, that is early
single CPU desktops and all dual CPU desktops at this date, but none
of the more recent ones like iMac G5.
- It does analog only, no digital/SPDIF support at all, no native
AC3 support
Better support would require a complete rewrite of the driver (which I am
working on, but don't hold your breath), to properly support the diversity
of apple sound HW setup, including dual codecs, several i2s busses, all the
new codecs used in the new machines, proper clock switching with digital,
etc etc etc...
This patch applies on top of the other PowerMac sound patches I posted in
the past couple of days (new powerbook support and sleep fixes).
Note: This is a FAQ entry for PowerMac sound support with TI codecs: They
have a feature called "DRC" which is automatically enabled for the internal
speaker (at least when auto mute control is enabled) which will cause your
sound to fade out to nothing after half a second of playback if you don't
set a proper "DRC Range" in the mixer. So if you have a problem like that,
check alsamixer and raise your DRC Range to something reasonable.
Note2: This patch will also add auto-mute of the speaker when line-out jack
is used on some earlier desktop G4s (and on the G5) in addition to the
headphone jack. If that behaviour isn't what you want, just disable
auto-muting and use the manual mute controls in alsamixer.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-ppc')
-rw-r--r-- | include/asm-ppc/dbdma.h | 2 | ||||
-rw-r--r-- | include/asm-ppc/keylargo.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/asm-ppc/dbdma.h b/include/asm-ppc/dbdma.h index 6047f288c70b..8973565f95d3 100644 --- a/include/asm-ppc/dbdma.h +++ b/include/asm-ppc/dbdma.h | |||
@@ -88,7 +88,7 @@ struct dbdma_cmd { | |||
88 | #define WAIT_ALWAYS 3 /* always wait */ | 88 | #define WAIT_ALWAYS 3 /* always wait */ |
89 | 89 | ||
90 | /* Align an address for a DBDMA command structure */ | 90 | /* Align an address for a DBDMA command structure */ |
91 | #define DBDMA_ALIGN(x) (((unsigned)(x) + sizeof(struct dbdma_cmd) - 1) \ | 91 | #define DBDMA_ALIGN(x) (((unsigned long)(x) + sizeof(struct dbdma_cmd) - 1) \ |
92 | & -sizeof(struct dbdma_cmd)) | 92 | & -sizeof(struct dbdma_cmd)) |
93 | 93 | ||
94 | /* Useful macros */ | 94 | /* Useful macros */ |
diff --git a/include/asm-ppc/keylargo.h b/include/asm-ppc/keylargo.h index 457c75a4622f..a669a3f0f5a2 100644 --- a/include/asm-ppc/keylargo.h +++ b/include/asm-ppc/keylargo.h | |||
@@ -228,6 +228,11 @@ | |||
228 | 228 | ||
229 | #define K2_FCR1_PCI1_BUS_RESET_N 0x00000010 | 229 | #define K2_FCR1_PCI1_BUS_RESET_N 0x00000010 |
230 | #define K2_FCR1_PCI1_SLEEP_RESET_EN 0x00000020 | 230 | #define K2_FCR1_PCI1_SLEEP_RESET_EN 0x00000020 |
231 | #define K2_FCR1_I2S0_CELL_ENABLE 0x00000400 | ||
232 | #define K2_FCR1_I2S0_RESET 0x00000800 | ||
233 | #define K2_FCR1_I2S0_CLK_ENABLE_BIT 0x00001000 | ||
234 | #define K2_FCR1_I2S0_ENABLE 0x00002000 | ||
235 | |||
231 | #define K2_FCR1_PCI1_CLK_ENABLE 0x00004000 | 236 | #define K2_FCR1_PCI1_CLK_ENABLE 0x00004000 |
232 | #define K2_FCR1_FW_CLK_ENABLE 0x00008000 | 237 | #define K2_FCR1_FW_CLK_ENABLE 0x00008000 |
233 | #define K2_FCR1_FW_RESET_N 0x00010000 | 238 | #define K2_FCR1_FW_RESET_N 0x00010000 |