diff options
| -rw-r--r-- | Documentation/sound/alsa/ALSA-Configuration.txt | 17 | ||||
| -rw-r--r-- | sound/isa/Kconfig | 14 | ||||
| -rw-r--r-- | sound/isa/opti9xx/Makefile | 2 | ||||
| -rw-r--r-- | sound/isa/opti9xx/miro.c | 1457 | ||||
| -rw-r--r-- | sound/isa/opti9xx/miro.h | 73 |
5 files changed, 1563 insertions, 0 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index baf18c6afd..1ac20940d8 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
| @@ -1014,6 +1014,23 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
| 1014 | 1014 | ||
| 1015 | The power-management is supported. | 1015 | The power-management is supported. |
| 1016 | 1016 | ||
| 1017 | Module snd-miro | ||
| 1018 | --------------- | ||
| 1019 | |||
| 1020 | Module for Miro soundcards: miroSOUND PCM 1 pro, | ||
| 1021 | miroSOUND PCM 12, | ||
| 1022 | miroSOUND PCM 20 Radio. | ||
| 1023 | |||
| 1024 | port - Port # (0x530,0x604,0xe80,0xf40) | ||
| 1025 | irq - IRQ # (5,7,9,10,11) | ||
| 1026 | dma1 - 1st dma # (0,1,3) | ||
| 1027 | dma2 - 2nd dma # (0,1) | ||
| 1028 | mpu_port - MPU-401 port # (0x300,0x310,0x320,0x330) | ||
| 1029 | mpu_irq - MPU-401 irq # (5,7,9,10) | ||
| 1030 | fm_port - FM Port # (0x388) | ||
| 1031 | wss - enable WSS mode | ||
| 1032 | ide - enable onboard ide support | ||
| 1033 | |||
| 1017 | Module snd-mixart | 1034 | Module snd-mixart |
| 1018 | ----------------- | 1035 | ----------------- |
| 1019 | 1036 | ||
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig index ff8fef9327..2a1c733421 100644 --- a/sound/isa/Kconfig +++ b/sound/isa/Kconfig | |||
| @@ -292,6 +292,20 @@ config SND_OPTI93X | |||
| 292 | To compile this driver as a module, choose M here: the module | 292 | To compile this driver as a module, choose M here: the module |
| 293 | will be called snd-opti93x. | 293 | will be called snd-opti93x. |
| 294 | 294 | ||
| 295 | config SND_MIRO | ||
| 296 | tristate "Miro miroSOUND PCM1pro/PCM12/PCM20radio driver" | ||
| 297 | depends on SND | ||
| 298 | select SND_OPL4_LIB | ||
| 299 | select SND_CS4231_LIB | ||
| 300 | select SND_MPU401_UART | ||
| 301 | select SND_PCM | ||
| 302 | help | ||
| 303 | Say 'Y' or 'M' to include support for Miro miroSOUND PCM1 pro, | ||
| 304 | miroSOUND PCM12 and miroSOUND PCM20 Radio soundcards. | ||
| 305 | |||
| 306 | To compile this driver as a module, choose M here: the module | ||
| 307 | will be called snd-miro. | ||
| 308 | |||
| 295 | config SND_SB8 | 309 | config SND_SB8 |
| 296 | tristate "Sound Blaster 1.0/2.0/Pro (8-bit)" | 310 | tristate "Sound Blaster 1.0/2.0/Pro (8-bit)" |
| 297 | depends on SND | 311 | depends on SND |
diff --git a/sound/isa/opti9xx/Makefile b/sound/isa/opti9xx/Makefile index 28c64070cd..0e41bfd5a4 100644 --- a/sound/isa/opti9xx/Makefile +++ b/sound/isa/opti9xx/Makefile | |||
| @@ -6,8 +6,10 @@ | |||
| 6 | snd-opti92x-ad1848-objs := opti92x-ad1848.o | 6 | snd-opti92x-ad1848-objs := opti92x-ad1848.o |
| 7 | snd-opti92x-cs4231-objs := opti92x-cs4231.o | 7 | snd-opti92x-cs4231-objs := opti92x-cs4231.o |
| 8 | snd-opti93x-objs := opti93x.o | 8 | snd-opti93x-objs := opti93x.o |
| 9 | snd-miro-objs := miro.o | ||
| 9 | 10 | ||
| 10 | # Toplevel Module Dependency | 11 | # Toplevel Module Dependency |
| 11 | obj-$(CONFIG_SND_OPTI92X_AD1848) += snd-opti92x-ad1848.o | 12 | obj-$(CONFIG_SND_OPTI92X_AD1848) += snd-opti92x-ad1848.o |
| 12 | obj-$(CONFIG_SND_OPTI92X_CS4231) += snd-opti92x-cs4231.o | 13 | obj-$(CONFIG_SND_OPTI92X_CS4231) += snd-opti92x-cs4231.o |
| 13 | obj-$(CONFIG_SND_OPTI93X) += snd-opti93x.o | 14 | obj-$(CONFIG_SND_OPTI93X) += snd-opti93x.o |
| 15 | obj-$(CONFIG_SND_MIRO) += snd-miro.o | ||
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c new file mode 100644 index 0000000000..49ba334c0d --- /dev/null +++ b/sound/isa/opti9xx/miro.c | |||
| @@ -0,0 +1,1457 @@ | |||
| 1 | /* | ||
| 2 | * ALSA soundcard driver for Miro miroSOUND PCM1 pro | ||
| 3 | * miroSOUND PCM12 | ||
| 4 | * miroSOUND PCM20 Radio | ||
| 5 | * | ||
| 6 | * Copyright (C) 2004-2005 Martin Langer <martin-langer@gmx.de> | ||
| 7 | * | ||
| 8 | * Based on OSS ACI and ALSA OPTi9xx drivers | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License as published by | ||
| 12 | * the Free Software Foundation; either version 2 of the License, or | ||
| 13 | * (at your option) any later version. | ||
| 14 | * | ||
| 15 | * This program is distributed in the hope that it will be useful, | ||
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | * GNU General Public License for more details. | ||
| 19 | * | ||
| 20 | * You should have received a copy of the GNU General Public License | ||
| 21 | * along with this program; if not, write to the Free Software | ||
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 23 | */ | ||
| 24 | |||
| 25 | #include <sound/driver.h> | ||
| 26 | #include <linux/init.h> | ||
| 27 | #include <linux/err.h> | ||
| 28 | #include <linux/platform_device.h> | ||
| 29 | #include <linux/delay.h> | ||
| 30 | #include <linux/slab.h> | ||
| 31 | #include <linux/ioport.h> | ||
| 32 | #include <linux/moduleparam.h> | ||
| 33 | #include <asm/io.h> | ||
| 34 | #include <asm/dma.h> | ||
| 35 | #include <sound/core.h> | ||
| 36 | #include <sound/cs4231.h> | ||
| 37 | #include <sound/mpu401.h> | ||
| 38 | #include <sound/opl4.h> | ||
| 39 | #include <sound/control.h> | ||
| 40 | #include <sound/info.h> | ||
| 41 | #define SNDRV_LEGACY_FIND_FREE_IRQ | ||
| 42 | #define SNDRV_LEGACY_FIND_FREE_DMA | ||
| 43 | #include <sound/initval.h> | ||
| 44 | #include "miro.h" | ||
| 45 | |||
| 46 | MODULE_AUTHOR("Martin Langer <martin-langer@gmx.de>"); | ||
| 47 | MODULE_LICENSE("GPL"); | ||
| 48 | MODULE_DESCRIPTION("Miro miroSOUND PCM1 pro, PCM12, PCM20 Radio"); | ||
| 49 | MODULE_SUPPORTED_DEVICE("{{Miro,miroSOUND PCM1 pro}, " | ||
| 50 | "{Miro,miroSOUND PCM12}, " | ||
| 51 | "{Miro,miroSOUND PCM20 Radio}}"); | ||
| 52 | |||
| 53 | static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */ | ||
| 54 | static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ | ||
| 55 | static long port = SNDRV_DEFAULT_PORT1; /* 0x530,0xe80,0xf40,0x604 */ | ||
| 56 | static long mpu_port = SNDRV_DEFAULT_PORT1; /* 0x300,0x310,0x320,0x330 */ | ||
| 57 | static long fm_port = SNDRV_DEFAULT_PORT1; /* 0x388 */ | ||
| 58 | static int irq = SNDRV_DEFAULT_IRQ1; /* 5,7,9,10,11 */ | ||
| 59 | static int mpu_irq = SNDRV_DEFAULT_IRQ1; /* 5,7,9,10 */ | ||
| 60 | static int dma1 = SNDRV_DEFAULT_DMA1; /* 0,1,3 */ | ||
| 61 | static int dma2 = SNDRV_DEFAULT_DMA1; /* 0,1,3 */ | ||
| 62 | static int wss; | ||
| 63 | static int ide; | ||
| 64 | |||
| 65 | module_param(index, int, 0444); | ||
| 66 | MODULE_PARM_DESC(index, "Index value for miro soundcard."); | ||
| 67 | module_param(id, charp, 0444); | ||
| 68 | MODULE_PARM_DESC(id, "ID string for miro soundcard."); | ||
| 69 | module_param(port, long, 0444); | ||
| 70 | MODULE_PARM_DESC(port, "WSS port # for miro driver."); | ||
| 71 | module_param(mpu_port, long, 0444); | ||
| 72 | MODULE_PARM_DESC(mpu_port, "MPU-401 port # for miro driver."); | ||
| 73 | module_param(fm_port, long, 0444); | ||
| 74 | MODULE_PARM_DESC(fm_port, "FM Port # for miro driver."); | ||
| 75 | module_param(irq, int, 0444); | ||
| 76 | MODULE_PARM_DESC(irq, "WSS irq # for miro driver."); | ||
| 77 | module_param(mpu_irq, int, 0444); | ||
| 78 | MODULE_PARM_DESC(mpu_irq, "MPU-401 irq # for miro driver."); | ||
| 79 | module_param(dma1, int, 0444); | ||
| 80 | MODULE_PARM_DESC(dma1, "1st dma # for miro driver."); | ||
| 81 | module_param(dma2, int, 0444); | ||
| 82 | MODULE_PARM_DESC(dma2, "2nd dma # for miro driver."); | ||
| 83 | module_param(wss, int, 0444); | ||
| 84 | MODULE_PARM_DESC(wss, "wss mode"); | ||
| 85 | module_param(ide, int, 0444); | ||
| 86 | MODULE_PARM_DESC(ide, "enable ide port"); | ||
| 87 | |||
| 88 | #define OPTi9XX_HW_DETECT 0 | ||
| 89 | #define OPTi9XX_HW_82C928 1 | ||
| 90 | #define OPTi9XX_HW_82C929 2 | ||
| 91 | #define OPTi9XX_HW_82C924 3 | ||
| 92 | #define OPTi9XX_HW_82C925 4 | ||
| 93 | #define OPTi9XX_HW_82C930 5 | ||
| 94 | #define OPTi9XX_HW_82C931 6 | ||
| 95 | #define OPTi9XX_HW_82C933 7 | ||
| 96 | #define OPTi9XX_HW_LAST OPTi9XX_HW_82C933 | ||
| 97 | |||
| 98 | #define OPTi9XX_MC_REG(n) n | ||
| 99 | |||
| 100 | |||
| 101 | struct snd_miro { | ||
| 102 | unsigned short hardware; | ||
| 103 | unsigned char password; | ||
| 104 | char name[7]; | ||
| 105 | |||
| 106 | struct resource *res_mc_base; | ||
| 107 | struct resource *res_aci_port; | ||
| 108 | |||
| 109 | unsigned long mc_base; | ||
| 110 | unsigned long mc_base_size; | ||
| 111 | unsigned long pwd_reg; | ||
| 112 | |||
| 113 | spinlock_t lock; | ||
| 114 | struct snd_card *card; | ||
| 115 | struct snd_pcm *pcm; | ||
| 116 | |||
| 117 | long wss_base; | ||
| 118 | int irq; | ||
| 119 | int dma1; | ||
| 120 | int dma2; | ||
| 121 | |||
| 122 | long fm_port; | ||
| 123 | |||
| 124 | long mpu_port; | ||
| 125 | int mpu_irq; | ||
| 126 | |||
| 127 | unsigned long aci_port; | ||
| 128 | int aci_vendor; | ||
| 129 | int aci_product; | ||
| 130 | int aci_version; | ||
| 131 | int aci_amp; | ||
| 132 | int aci_preamp; | ||
| 133 | int aci_solomode; | ||
| 134 | |||
| 135 | struct mutex aci_mutex; | ||
| 136 | }; | ||
| 137 | |||
| 138 | static void snd_miro_proc_init(struct snd_miro * miro); | ||
| 139 | |||
| 140 | #define DRIVER_NAME "snd-miro" | ||
| 141 | |||
| 142 | static struct platform_device *device; | ||
| 143 | |||
| 144 | static char * snd_opti9xx_names[] = { | ||
| 145 | "unkown", | ||
| 146 | "82C928", "82C929", | ||
| 147 | "82C924", "82C925", | ||
