aboutsummaryrefslogtreecommitdiffstats
path: root/sound/ppc/pmac.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-04-16 18:24:32 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:24:32 -0400
commit7bbd827750e630003896c96d0212962276ee5d91 (patch)
tree71bb72cddbb08f9de68b2c7c05b4f5c03e8ed0bd /sound/ppc/pmac.h
parentb20af5f59797796d28b701f5d337e47c8a142eb2 (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 'sound/ppc/pmac.h')
-rw-r--r--sound/ppc/pmac.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/ppc/pmac.h b/sound/ppc/pmac.h
index a699b01210ee..dc6c99dd14e7 100644
--- a/sound/ppc/pmac.h
+++ b/sound/ppc/pmac.h
@@ -60,7 +60,8 @@ typedef struct snd_pmac_dbdma pmac_dbdma_t;
60 * DBDMA space 60 * DBDMA space
61 */ 61 */
62struct snd_pmac_dbdma { 62struct snd_pmac_dbdma {
63 unsigned long addr; 63 dma_addr_t dma_base;
64 dma_addr_t addr;
64 struct dbdma_cmd __iomem *cmds; 65 struct dbdma_cmd __iomem *cmds;
65 void *space; 66 void *space;
66 int size; 67 int size;
@@ -101,6 +102,7 @@ struct snd_pmac {
101 102
102 /* h/w info */ 103 /* h/w info */
103 struct device_node *node; 104 struct device_node *node;
105 struct pci_dev *pdev;
104 unsigned int revision; 106 unsigned int revision;
105 unsigned int manufacturer; 107 unsigned int manufacturer;
106 unsigned int subframe; 108 unsigned int subframe;
@@ -110,6 +112,7 @@ struct snd_pmac {
110 unsigned int has_iic : 1; 112 unsigned int has_iic : 1;
111 unsigned int is_pbook_3400 : 1; 113 unsigned int is_pbook_3400 : 1;
112 unsigned int is_pbook_G3 : 1; 114 unsigned int is_pbook_G3 : 1;
115 unsigned int is_k2 : 1;
113 116
114 unsigned int can_byte_swap : 1; 117 unsigned int can_byte_swap : 1;
115 unsigned int can_duplex : 1; 118 unsigned int can_duplex : 1;
@@ -157,6 +160,7 @@ struct snd_pmac {
157 snd_kcontrol_t *speaker_sw_ctl; 160 snd_kcontrol_t *speaker_sw_ctl;
158 snd_kcontrol_t *drc_sw_ctl; /* only used for tumbler -ReneR */ 161 snd_kcontrol_t *drc_sw_ctl; /* only used for tumbler -ReneR */
159 snd_kcontrol_t *hp_detect_ctl; 162 snd_kcontrol_t *hp_detect_ctl;
163 snd_kcontrol_t *lineout_sw_ctl;
160 164
161 /* lowlevel callbacks */ 165 /* lowlevel callbacks */
162 void (*set_format)(pmac_t *chip); 166 void (*set_format)(pmac_t *chip);