diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/arm/pxa2xx-ac97.c | 2 | ||||
-rw-r--r-- | sound/core/init.c | 2 | ||||
-rw-r--r-- | sound/oss/ac97_codec.c | 1 | ||||
-rw-r--r-- | sound/oss/awe_wave.c | 2 | ||||
-rw-r--r-- | sound/oss/cs4232.c | 6 | ||||
-rw-r--r-- | sound/oss/wavfront.c | 38 | ||||
-rw-r--r-- | sound/pci/emu10k1/emu10k1_main.c | 39 |
7 files changed, 75 insertions, 15 deletions
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index 877bb00d329..d1f9da49872 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c @@ -13,7 +13,7 @@ #include <linux/init.h> #include <linux/module.h> #include <linux/kernel.h> -#include <linux/device.h> +#include <linux/platform_device.h> #include <linux/interrupt.h> #include <linux/wait.h> #include <linux/delay.h> diff --git a/sound/core/init.c b/sound/core/init.c index 59202de1d2c..41e224986f3 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -28,6 +28,8 @@ #include <linux/ctype.h> #include <linux/pci.h> #include <linux/pm.h> +#include <linux/platform_device.h> + #include <sound/core.h> #include <sound/control.h> #include <sound/info.h> diff --git a/sound/oss/ac97_codec.c b/sound/oss/ac97_codec.c index 3ecef4689f1..fd25aca2512 100644 --- a/sound/oss/ac97_codec.c +++ b/sound/oss/ac97_codec.c @@ -55,6 +55,7 @@ #include <linux/pci.h> #include <linux/ac97_codec.h> #include <asm/uaccess.h> +#include <asm/semaphore.h> #define CODEC_ID_BUFSZ 14 diff --git a/sound/oss/awe_wave.c b/sound/oss/awe_wave.c index d2b9beda8ac..b3ea719d33d 100644 --- a/sound/oss/awe_wave.c +++ b/sound/oss/awe_wave.c @@ -6062,7 +6062,7 @@ static int awe_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id io1 = pnp_port_start(dev,0); io2 = pnp_port_start(dev,1); io3 = pnp_port_start(dev,2); - printk(KERN_INFO "AWE32: A PnP Wave Table was detected at IO's %#x,%#x,%#x\n.", + printk(KERN_INFO "AWE32: A PnP Wave Table was detected at IO's %#x,%#x,%#x.\n", io1, io2, io3); setup_ports(io1, io2, io3); diff --git a/sound/oss/cs4232.c b/sound/oss/cs4232.c index 6ec308f5d93..7c59e2d4003 100644 --- a/sound/oss/cs4232.c +++ b/sound/oss/cs4232.c @@ -195,10 +195,12 @@ static int __init probe_cs4232(struct address_info *hw_config, int isapnp_config CS_OUT2(0x15, 0x00); /* Select logical device 0 (WSS/SB/FM) */ CS_OUT3(0x47, (base >> 8) & 0xff, base & 0xff); /* WSS base */ - if (check_region(0x388, 4)) /* Not free */ + if (!request_region(0x388, 4, "FM")) /* Not free */ CS_OUT3(0x48, 0x00, 0x00) /* FM base off */ - else + else { + release_region(0x388, 4); CS_OUT3(0x48, 0x03, 0x88); /* FM base 0x388 */ + } CS_OUT3(0x42, 0x00, 0x00); /* SB base off */ CS_OUT2(0x22, irq); /* SB+WSS IRQ */ diff --git a/sound/oss/wavfront.c b/sound/oss/wavfront.c index b92ba892163..b1a4eeb9dc0 100644 --- a/sound/oss/wavfront.c +++ b/sound/oss/wavfront.c @@ -2434,7 +2434,7 @@ static int __init detect_wavefront (int irq, int io_base) consumes 16. */ - if (check_region (io_base, 16)) { + if (!request_region (io_base, 16, "wavfront")) { printk (KERN_ERR LOGNAME "IO address range 0x%x - 0x%x " "already in use - ignored\n", dev.base, dev.base+15); @@ -2466,10 +2466,13 @@ static int __init detect_wavefront (int irq, int io_base) } else { printk (KERN_WARNING LOGNAME "not raw, but no " "hardware version!\n"); + release_region (io_base, 16); return 0; } if (!wf_raw) { + /* will re-acquire region in install_wavefront() */ + release_region (io_base, 16); return 1; } else { printk (KERN_INFO LOGNAME @@ -2489,6 +2492,7 @@ static int __init detect_wavefront (int irq, int io_base) if (wavefront_hw_reset ()) { printk (KERN_WARNING LOGNAME "hardware reset failed\n"); + release_region (io_base, 16); return 0; } @@ -2496,6 +2500,8 @@ static int __init detect_wavefront (int irq, int io_base) dev.has_fx = (detect_wffx () == 0); + /* will re-acquire region in install_wavefront() */ + release_region (io_base, 16); return 1; } @@ -2804,17 +2810,27 @@ static int __init wavefront_init (int atboot) } static int __init install_wavefront (void) - { + if (!request_region (dev.base+2, 6, "wavefront synth")) + return -1; + + if (dev.has_fx) { + if (!request_region (dev.base+8, 8, "wavefront fx")) { + release_region (dev.base+2, 6); + return -1; + } + } + if ((dev.synth_dev = register_sound_synth (&wavefront_fops, -1)) < 0) { printk (KERN_ERR LOGNAME "cannot register raw synth\n"); - return -1; + goto err_out; } #if OSS_SUPPORT_LEVEL & OSS_SUPPORT_SEQ if ((dev.oss_dev = sound_alloc_synthdev()) == -1) { printk (KERN_ERR LOGNAME "Too many sequencers\n"); - return -1; + /* FIXME: leak: should unregister sound synth */ + goto err_out; } else { synth_devs[dev.oss_dev] = &wavefront_operations; } @@ -2827,20 +2843,20 @@ static int __init install_wavefront (void) sound_unload_synthdev (dev.oss_dev); #endif /* OSS_SUPPORT_SEQ */ - return -1; + goto err_out; } - request_region (dev.base+2, 6, "wavefront synth"); - - if (dev.has_fx) { - request_region (dev.base+8, 8, "wavefront fx"); - } - if (wavefront_config_midi ()) { printk (KERN_WARNING LOGNAME "could not initialize MIDI.\n"); } return dev.oss_dev; + +err_out: + release_region (dev.base+2, 6); + if (dev.has_fx) + release_region (dev.base+8, 8); + return -1; } static void __exit uninstall_wavefront (void) diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index e9cd8e054f2..53aeff0b783 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -579,6 +579,30 @@ static int __devinit snd_emu10k1_ecard_init(emu10k1_t * emu) return 0; } +static int __devinit snd_emu10k1_cardbus_init(emu10k1_t * emu) +{ + unsigned long special_port; + unsigned int value; + + /* Special initialisation routine + * before the rest of the IO-Ports become active. + */ + special_port = emu->port + 0x38; + value = inl(special_port); + outl(0x00d00000, special_port); + value = inl(special_port); + outl(0x00d00001, special_port); + value = inl(special_port); + outl(0x00d0005f, special_port); + value = inl(special_port); + outl(0x00d0007f, special_port); + value = inl(special_port); + outl(0x0090007f, special_port); + value = inl(special_port); + + return 0; +} + /* * Create the EMU10K1 instance */ @@ -624,6 +648,16 @@ static emu_chip_details_t emu_chip_details[] = { .ca0108_chip = 1, .spk71 = 1, .ac97_chip = 1} , + /* Audigy 2 ZS Notebook Cardbus card.*/ + /* Tested by James@superbug.co.uk 30th October 2005 */ + /* Not working yet, but progressing. */ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x20011102, + .driver = "Audigy2", .name = "Audigy 2 ZS Notebook [SB0530]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .ca_cardbus_chip = 1, + .spk71 = 1} , {.vendor = 0x1102, .device = 0x0008, .driver = "Audigy2", .name = "Audigy 2 Value [Unknown]", .id = "Audigy2", @@ -1011,6 +1045,11 @@ int __devinit snd_emu10k1_create(snd_card_t * card, snd_emu10k1_free(emu); return err; } + } else if (emu->card_capabilities->ca_cardbus_chip) { + if ((err = snd_emu10k1_cardbus_init(emu)) < 0) { + snd_emu10k1_free(emu); + return err; + } } else { /* 5.1: Enable the additional AC97 Slots. If the emu10k1 version does not support this, it shouldn't do any harm */ |