aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'sound/drivers')
-rw-r--r--sound/drivers/dummy.c2
-rw-r--r--sound/drivers/mpu401/mpu401.c14
-rw-r--r--sound/drivers/mpu401/mpu401_uart.c18
-rw-r--r--sound/drivers/mts64.c6
-rw-r--r--sound/drivers/portman2x4.c6
-rw-r--r--sound/drivers/serial-u16550.c2
-rw-r--r--sound/drivers/virmidi.c2
-rw-r--r--sound/drivers/vx/vx_hwdep.c14
8 files changed, 44 insertions, 20 deletions
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index a0f28f51fc7..4360ae9de19 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -659,7 +659,7 @@ static struct platform_driver snd_dummy_driver = {
659 }, 659 },
660}; 660};
661 661
662static void __init_or_module snd_dummy_unregister_all(void) 662static void snd_dummy_unregister_all(void)
663{ 663{
664 int i; 664 int i;
665 665
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c
index 2de181ad0b0..67c6e974541 100644
--- a/sound/drivers/mpu401/mpu401.c
+++ b/sound/drivers/mpu401/mpu401.c
@@ -42,6 +42,7 @@ static int pnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
42#endif 42#endif
43static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* MPU-401 port number */ 43static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* MPU-401 port number */
44static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* MPU-401 IRQ */ 44static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* MPU-401 IRQ */
45static int uart_enter[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
45 46
46module_param_array(index, int, NULL, 0444); 47module_param_array(index, int, NULL, 0444);
47MODULE_PARM_DESC(index, "Index value for MPU-401 device."); 48MODULE_PARM_DESC(index, "Index value for MPU-401 device.");
@@ -57,6 +58,8 @@ module_param_array(port, long, NULL, 0444);
57MODULE_PARM_DESC(port, "Port # for MPU-401 device."); 58MODULE_PARM_DESC(port, "Port # for MPU-401 device.");
58module_param_array(irq, int, NULL, 0444); 59module_param_array(irq, int, NULL, 0444);
59MODULE_PARM_DESC(irq, "IRQ # for MPU-401 device."); 60MODULE_PARM_DESC(irq, "IRQ # for MPU-401 device.");
61module_param_array(uart_enter, bool, NULL, 0444);
62MODULE_PARM_DESC(uart_enter, "Issue UART_ENTER command at open.");
60 63
61static struct platform_device *platform_devices[SNDRV_CARDS]; 64static struct platform_device *platform_devices[SNDRV_CARDS];
62static int pnp_registered; 65static int pnp_registered;
@@ -80,10 +83,11 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard)
80 strcat(card->longname, "polled"); 83 strcat(card->longname, "polled");
81 } 84 }
82 85
83 if ((err = snd_mpu401_uart_new(card, 0, 86 err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port[dev],
84 MPU401_HW_MPU401, 87 uart_enter[dev] ? 0 : MPU401_INFO_UART_ONLY,
85 port[dev], 0, 88 irq[dev], irq[dev] >= 0 ? IRQF_DISABLED : 0,
86 irq[dev], irq[dev] >= 0 ? IRQF_DISABLED : 0, NULL)) < 0) { 89 NULL);
90 if (err < 0) {
87 printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]); 91 printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]);
88 goto _err; 92 goto _err;
89 } 93 }
@@ -224,7 +228,7 @@ static struct pnp_driver snd_mpu401_pnp_driver = {
224static struct pnp_driver snd_mpu401_pnp_driver; 228static struct pnp_driver snd_mpu401_pnp_driver;
225#endif 229#endif
226 230
227static void __init_or_module snd_mpu401_unregister_all(void) 231static void snd_mpu401_unregister_all(void)
228{ 232{
229 int i; 233 int i;
230 234
diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c
index 3daa9fa56c0..85aedc348e2 100644
--- a/sound/drivers/mpu401/mpu401_uart.c
+++ b/sound/drivers/mpu401/mpu401_uart.c
@@ -266,6 +266,16 @@ static int snd_mpu401_uart_cmd(struct snd_mpu401 * mpu, unsigned char cmd,
266 return 0; 266 return 0;
267} 267}
268 268
269static int snd_mpu401_do_reset(struct snd_mpu401 *mpu)
270{
271 if (snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1))
272 return -EIO;
273 if (!(mpu->info_flags & MPU401_INFO_UART_ONLY) &&
274 snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1))
275 return -EIO;
276 return 0;
277}
278
269/* 279/*
270 * input/output open/close - protected by open_mutex in rawmidi.c 280 * input/output open/close - protected by open_mutex in rawmidi.c
271 */ 281 */
@@ -278,9 +288,7 @@ static int snd_mpu401_uart_input_open(struct snd_rawmidi_substream *substream)
278 if (mpu->open_input && (err = mpu->open_input(mpu)) < 0) 288 if (mpu->open_input && (err = mpu->open_input(mpu)) < 0)
279 return err; 289 return err;
280 if (! test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode)) { 290 if (! test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode)) {
281 if (snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1)) 291 if (snd_mpu401_do_reset(mpu) < 0)
282 goto error_out;
283 if (snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1))
284 goto error_out; 292 goto error_out;
285 } 293 }
286 mpu->substream_input = substream; 294 mpu->substream_input = substream;
@@ -302,9 +310,7 @@ static int snd_mpu401_uart_output_open(struct snd_rawmidi_substream *substream)
302 if (mpu->open_output && (err = mpu->open_output(mpu)) < 0) 310 if (mpu->open_output && (err = mpu->open_output(mpu)) < 0)
303 return err; 311 return err;
304 if (! test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) { 312 if (! test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) {
305 if (snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1)) 313 if (snd_mpu401_do_reset(mpu) < 0)
306 goto error_out;
307 if (snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1))
308 goto error_out; 314 goto error_out;
309 } 315 }
310 mpu->substream_output = substream; 316 mpu->substream_output = substream;
diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c
index 6c9f4c9bfeb..2025db5947a 100644
--- a/sound/drivers/mts64.c
+++ b/sound/drivers/mts64.c
@@ -892,13 +892,13 @@ static void __devinit snd_mts64_attach(struct parport *p)
892 struct platform_device *device; 892 struct platform_device *device;
893 893
894 device = platform_device_alloc(PLATFORM_DRIVER, device_count); 894 device = platform_device_alloc(PLATFORM_DRIVER, device_count);
895 if (!device) 895 if (!device)
896 return; 896 return;
897 897
898 /* Temporary assignment to forward the parport */ 898 /* Temporary assignment to forward the parport */
899 platform_set_drvdata(device, p); 899 platform_set_drvdata(device, p);
900 900
901 if (platform_device_register(device) < 0) { 901 if (platform_device_add(device) < 0) {
902 platform_device_put(device); 902 platform_device_put(device);
903 return; 903 return;
904 } 904 }
@@ -1048,7 +1048,7 @@ static struct platform_driver snd_mts64_driver = {
1048/********************************************************************* 1048/*********************************************************************
1049 * module init stuff 1049 * module init stuff
1050 *********************************************************************/ 1050 *********************************************************************/
1051static void __init_or_module snd_mts64_unregister_all(void) 1051static void snd_mts64_unregister_all(void)
1052{ 1052{
1053 int i; 1053 int i;
1054 1054
diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c
index b2d0ba4bd18..0eb9b5cebfc 100644
--- a/sound/drivers/portman2x4.c
+++ b/sound/drivers/portman2x4.c
@@ -676,13 +676,13 @@ static void __devinit snd_portman_attach(struct parport *p)
676 struct platform_device *device; 676 struct platform_device *device;
677 677
678 device = platform_device_alloc(PLATFORM_DRIVER, device_count); 678 device = platform_device_alloc(PLATFORM_DRIVER, device_count);
679 if (!device) 679 if (!device)
680 return; 680 return;
681 681
682 /* Temporary assignment to forward the parport */ 682 /* Temporary assignment to forward the parport */
683 platform_set_drvdata(device, p); 683 platform_set_drvdata(device, p);
684 684
685 if (platform_device_register(device) < 0) { 685 if (platform_device_add(device) < 0) {
686 platform_device_put(device); 686 platform_device_put(device);
687 return; 687 return;
688 } 688 }
@@ -833,7 +833,7 @@ static struct platform_driver snd_portman_driver = {
833/********************************************************************* 833/*********************************************************************
834 * module init stuff 834 * module init stuff
835 *********************************************************************/ 835 *********************************************************************/
836static void __init_or_module snd_portman_unregister_all(void) 836static void snd_portman_unregister_all(void)
837{ 837{
838 int i; 838 int i;
839 839
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
index 838a4277929..d3e6a20edd3 100644
--- a/sound/drivers/serial-u16550.c
+++ b/sound/drivers/serial-u16550.c
@@ -998,7 +998,7 @@ static struct platform_driver snd_serial_driver = {
998 }, 998 },
999}; 999};
1000 1000
1001static void __init_or_module snd_serial_unregister_all(void) 1001static void snd_serial_unregister_all(void)
1002{ 1002{
1003 int i; 1003 int i;
1004 1004
diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c
index 46f3d348606..915c86773c2 100644
--- a/sound/drivers/virmidi.c
+++ b/sound/drivers/virmidi.c
@@ -145,7 +145,7 @@ static struct platform_driver snd_virmidi_driver = {
145 }, 145 },
146}; 146};
147 147
148static void __init_or_module snd_virmidi_unregister_all(void) 148static void snd_virmidi_unregister_all(void)
149{ 149{
150 int i; 150 int i;
151 151
diff --git a/sound/drivers/vx/vx_hwdep.c b/sound/drivers/vx/vx_hwdep.c
index e1920af4501..9a8154c9416 100644
--- a/sound/drivers/vx/vx_hwdep.c
+++ b/sound/drivers/vx/vx_hwdep.c
@@ -30,6 +30,20 @@
30 30
31#ifdef SND_VX_FW_LOADER 31#ifdef SND_VX_FW_LOADER
32 32
33MODULE_FIRMWARE("vx/bx_1_vxp.b56");
34MODULE_FIRMWARE("vx/bx_1_vp4.b56");
35MODULE_FIRMWARE("vx/x1_1_vx2.xlx");
36MODULE_FIRMWARE("vx/x1_2_v22.xlx");
37MODULE_FIRMWARE("vx/x1_1_vxp.xlx");
38MODULE_FIRMWARE("vx/x1_1_vp4.xlx");
39MODULE_FIRMWARE("vx/bd56002.boot");
40MODULE_FIRMWARE("vx/bd563v2.boot");
41MODULE_FIRMWARE("vx/bd563s3.boot");
42MODULE_FIRMWARE("vx/l_1_vx2.d56");
43MODULE_FIRMWARE("vx/l_1_v22.d56");
44MODULE_FIRMWARE("vx/l_1_vxp.d56");
45MODULE_FIRMWARE("vx/l_1_vp4.d56");
46
33int snd_vx_setup_firmware(struct vx_core *chip) 47int snd_vx_setup_firmware(struct vx_core *chip)
34{ 48{
35 static char *fw_files[VX_TYPE_NUMS][4] = { 49 static char *fw_files[VX_TYPE_NUMS][4] = {