diff options
author | James Courtier-Dutton <James@superbug.co.uk> | 2005-07-02 10:33:34 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-07-28 06:21:26 -0400 |
commit | e0474e53985c5fac97a5bb85d66ec0d017b5faf3 (patch) | |
tree | 1c11dd6088278783f87e0b8eb395de842427a85e /sound/pci/emu10k1/emu10k1_main.c | |
parent | 7bc71ecd6477db90221efc08fb742b3df4f49b46 (diff) |
[ALSA] snd-emu10k1: Card capabilities tidy up.
EMU10K1/EMU10K2 driver
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Diffstat (limited to 'sound/pci/emu10k1/emu10k1_main.c')
-rw-r--r-- | sound/pci/emu10k1/emu10k1_main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index a341e758acde..9478a95e410f 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -191,7 +191,7 @@ static int __devinit snd_emu10k1_init(emu10k1_t * emu, int enable_ir) | |||
191 | /* Set playback routing. */ | 191 | /* Set playback routing. */ |
192 | snd_emu10k1_ptr20_write(emu, CAPTURE_P16V_SOURCE, 0, 0x78e4); | 192 | snd_emu10k1_ptr20_write(emu, CAPTURE_P16V_SOURCE, 0, 0x78e4); |
193 | } | 193 | } |
194 | if (emu->audigy && (emu->serial == 0x10011102) ) { /* audigy2 Value */ | 194 | if (emu->card_capabilities->ca0108_chip) { /* audigy2 Value */ |
195 | /* Hacks for Alice3 to work independent of haP16V driver */ | 195 | /* Hacks for Alice3 to work independent of haP16V driver */ |
196 | u32 tmp; | 196 | u32 tmp; |
197 | 197 | ||
@@ -253,6 +253,8 @@ static int __devinit snd_emu10k1_init(emu10k1_t * emu, int enable_ir) | |||
253 | HCFG_AUTOMUTE | HCFG_JOYENABLE, emu->port + HCFG); | 253 | HCFG_AUTOMUTE | HCFG_JOYENABLE, emu->port + HCFG); |
254 | else | 254 | else |
255 | outl(HCFG_AUTOMUTE | HCFG_JOYENABLE, emu->port + HCFG); | 255 | outl(HCFG_AUTOMUTE | HCFG_JOYENABLE, emu->port + HCFG); |
256 | /* FIXME: Remove all these emu->model and replace it with a card recognition parameter, | ||
257 | * e.g. card_capabilities->joystick */ | ||
256 | } else if (emu->model == 0x20 || | 258 | } else if (emu->model == 0x20 || |
257 | emu->model == 0xc400 || | 259 | emu->model == 0xc400 || |
258 | (emu->model == 0x21 && emu->revision < 6)) | 260 | (emu->model == 0x21 && emu->revision < 6)) |
@@ -299,12 +301,12 @@ static int __devinit snd_emu10k1_init(emu10k1_t * emu, int enable_ir) | |||
299 | if (emu->audigy) { | 301 | if (emu->audigy) { |
300 | outl(inl(emu->port + A_IOCFG) & ~0x44, emu->port + A_IOCFG); | 302 | outl(inl(emu->port + A_IOCFG) & ~0x44, emu->port + A_IOCFG); |
301 | 303 | ||
302 | if (emu->revision == 4) { /* audigy2 */ | 304 | if (emu->card_capabilities->ca0151_chip) { /* audigy2 */ |
303 | /* Unmute Analog now. Set GPO6 to 1 for Apollo. | 305 | /* Unmute Analog now. Set GPO6 to 1 for Apollo. |
304 | * This has to be done after init ALice3 I2SOut beyond 48KHz. | 306 | * This has to be done after init ALice3 I2SOut beyond 48KHz. |
305 | * So, sequence is important. */ | 307 | * So, sequence is important. */ |
306 | outl(inl(emu->port + A_IOCFG) | 0x0040, emu->port + A_IOCFG); | 308 | outl(inl(emu->port + A_IOCFG) | 0x0040, emu->port + A_IOCFG); |
307 | } else if (emu->serial == 0x10011102) { /* audigy2 value */ | 309 | } else if (emu->card_capabilities->ca0108_chip) { /* audigy2 value */ |
308 | /* Unmute Analog now. */ | 310 | /* Unmute Analog now. */ |
309 | outl(inl(emu->port + A_IOCFG) | 0x0060, emu->port + A_IOCFG); | 311 | outl(inl(emu->port + A_IOCFG) | 0x0060, emu->port + A_IOCFG); |
310 | } else { | 312 | } else { |