Changeset 207
- Timestamp:
- Jun 18, 2007, 3:00:22 AM (18 years ago)
- Location:
- GPL/branches/alsa-resync1/alsa-kernel
- Files:
-
- 1 added
- 5 deleted
- 59 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/alsa-resync1/alsa-kernel/core/info.c
r206 r207 106 106 return 0; 107 107 va_start(args, fmt); 108 res = vsprintf(sbuffer, fmt, args);108 res = vsnprintf(sbuffer, sizeof(sbuffer), fmt, args); 109 109 va_end(args); 110 110 if (buffer->size + res >= buffer->len) { -
GPL/branches/alsa-resync1/alsa-kernel/core/init.c
r206 r207 47 47 48 48 #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) 49 int (*snd_mixer_oss_notify_callback)(s truct snd_card*card, int free_flag);49 int (*snd_mixer_oss_notify_callback)(snd_card_t *card, int free_flag); 50 50 #endif 51 51 … … 456 456 write_unlock(&snd_card_rwlock); 457 457 return 0; 458 458 } 459 459 460 460 if (card->id[0] == '\0') -
GPL/branches/alsa-resync1/alsa-kernel/core/memory.c
r206 r207 28 28 #include <linux/slab.h> 29 29 #include <linux/time.h> 30 #include <linux/pci.h> 30 31 #include <sound/core.h> 31 32 #include <sound/info.h> -
GPL/branches/alsa-resync1/alsa-kernel/core/rtctimer.c
r112 r207 213 213 MODULE_LICENSE("GPL"); 214 214 215 EXPORT_NO_SYMBOLS;216 217 215 #endif /* CONFIG_RTC || CONFIG_RTC_MODULE */ -
GPL/branches/alsa-resync1/alsa-kernel/core/seq/seq_midi.c
r34 r207 41 41 #include <sound/initval.h> 42 42 43 MODULE_AUTHOR("Frank van de Pol <fvdpol@ coil.demon.nl>, Jaroslav Kysela <perex@suse.cz>");43 MODULE_AUTHOR("Frank van de Pol <fvdpol@home.nl>, Jaroslav Kysela <perex@suse.cz>"); 44 44 MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer MIDI synth."); 45 45 MODULE_LICENSE("GPL"); -
GPL/branches/alsa-resync1/alsa-kernel/core/timer.c
r106 r207 1931 1931 EXPORT_SYMBOL(snd_timer_start); 1932 1932 EXPORT_SYMBOL(snd_timer_stop); 1933 EXPORT_SYMBOL(snd_timer_del); 1933 1934 EXPORT_SYMBOL(snd_timer_continue); 1934 1935 EXPORT_SYMBOL(snd_timer_pause); -
GPL/branches/alsa-resync1/alsa-kernel/drivers/dummy.c
r206 r207 21 21 #include <sound/driver.h> 22 22 #include <linux/init.h> 23 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0) 24 #include <linux/jiffies.h> 25 #else 23 26 #include <linux/sched.h> 27 #endif 24 28 #include <linux/slab.h> 25 29 #include <linux/time.h> … … 31 35 #define SNDRV_GET_ID 32 36 #include <sound/initval.h> 33 34 EXPORT_NO_SYMBOLS;35 37 36 38 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); -
GPL/branches/alsa-resync1/alsa-kernel/drivers/mpu401/mpu401.c
r92 r207 30 30 #include <sound/initval.h> 31 31 #include <linux/delay.h> 32 33 EXPORT_NO_SYMBOLS;34 32 35 33 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); -
GPL/branches/alsa-resync1/alsa-kernel/drivers/mtpav.c
r92 r207 64 64 * globals 65 65 */ 66 EXPORT_NO_SYMBOLS;67 68 66 MODULE_AUTHOR("Michael T. Mayers"); 69 67 MODULE_DESCRIPTION("MOTU MidiTimePiece AV multiport MIDI"); -
GPL/branches/alsa-resync1/alsa-kernel/drivers/opl3/opl3_voice.h
r32 r207 45 45 46 46 /* Prototypes for opl3_oss.c */ 47 #ifdef CONFIG_SND_ OSSEMUL47 #ifdef CONFIG_SND_SEQUENCER_OSS 48 48 void snd_opl3_init_seq_oss(opl3_t *opl3, char *name); 49 49 void snd_opl3_free_seq_oss(opl3_t *opl3); -
GPL/branches/alsa-resync1/alsa-kernel/drivers/serial-u16550.c
r92 r207 114 114 #include <linux/serial_reg.h> 115 115 116 EXPORT_NO_SYMBOLS;117 116 MODULE_DESCRIPTION("MIDI serial"); 118 117 MODULE_LICENSE("GPL"); -
GPL/branches/alsa-resync1/alsa-kernel/drivers/virmidi.c
r92 r207 51 51 #define SNDRV_GET_ID 52 52 #include <sound/initval.h> 53 54 EXPORT_NO_SYMBOLS;55 53 56 54 MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/ad1816a/ad1816a.c
r112 r207 39 39 #define PFX "ad1816a: " 40 40 41 EXPORT_NO_SYMBOLS;42 41 MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>"); 43 42 MODULE_DESCRIPTION("AD1816A, AD1815"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/ad1848/ad1848.c
r92 r207 33 33 #define chip_t ad1848_t 34 34 35 EXPORT_NO_SYMBOLS;36 35 MODULE_AUTHOR("Tugrul Galatali <galatalt@stuy.edu>, Jaroslav Kysela <perex@suse.cz>"); 37 36 MODULE_DESCRIPTION("AD1848/AD1847/CS4248"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/als100.c
r112 r207 37 37 38 38 #define PFX "als100: " 39 40 EXPORT_NO_SYMBOLS;41 39 42 40 MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/azt2320.c
r112 r207 47 47 48 48 #define PFX "azt2320: " 49 50 EXPORT_NO_SYMBOLS;51 49 52 50 MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/cmi8330.c
r112 r207 52 52 #define SNDRV_GET_ID 53 53 #include <sound/initval.h> 54 55 EXPORT_NO_SYMBOLS;56 54 57 55 MODULE_AUTHOR("George Talusan <gstalusan@uwaterloo.ca>"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/cs423x/cs4231.c
r92 r207 32 32 33 33 #define chip_t cs4231_t 34 35 EXPORT_NO_SYMBOLS;36 34 37 35 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/cs423x/cs4236.c
r112 r207 37 37 #define chip_t cs4231_t 38 38 39 EXPORT_NO_SYMBOLS;40 39 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); 41 40 MODULE_LICENSE("GPL"); … … 258 257 /* TerraTec AudioSystem EWS64XL - CS4236B */ 259 258 ISAPNP_CS4232('C','S','C',0xa836,0xa800,0xa810,0xa803), 259 /* TerraTec AudioSystem EWS64XL - CS4236B */ 260 ISAPNP_CS4232_WOMPU('C','S','C',0xa836,0xa800,0xa810), 260 261 /* Crystal Semiconductors CS4237B */ 261 262 ISAPNP_CS4232('C','S','C',0x4637,0x0000,0x0010,0x0003), … … 288 289 /* CS4235 without MPU401 */ 289 290 ISAPNP_CS4232_WOMPU('C','S','C',0xe825,0x0100,0x0110), 291 /* Some noname CS4236 based card */ 292 ISAPNP_CS4232('C','S','C',0xe936,0x0000,0x0010,0x0003), 290 293 /* CS4236B */ 291 294 ISAPNP_CS4232('C','S','C',0xf235,0x0000,0x0010,0x0003), … … 355 358 snd_irq[dev], snd_dma1[dev], snd_dma2[dev]); 356 359 /* CTRL initialization */ 360 if (acard->ctrl && snd_cport[dev] >= 0) { 357 361 pdev = acard->ctrl; 358 362 if (pdev->prepare(pdev) < 0) { … … 369 373 snd_cport[dev] = pdev->resource[0].start; 370 374 snd_printdd("isapnp CTRL: control port=0x%lx\n", snd_cport[dev]); 375 } 371 376 /* MPU initialization */ 372 377 if (acard->mpu && snd_mpu_port[dev] >= 0) { -
GPL/branches/alsa-resync1/alsa-kernel/isa/dt0197h.c
r112 r207 33 33 34 34 #define PFX "dt0197h: " 35 36 EXPORT_NO_SYMBOLS;37 35 38 36 MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/es1688/es1688.c
r112 r207 36 36 37 37 #define chip_t es1688_t 38 39 EXPORT_NO_SYMBOLS;40 38 41 39 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/es18xx.c
r112 r207 2054 2054 /* Card level */ 2055 2055 2056 EXPORT_NO_SYMBOLS;2057 2056 MODULE_AUTHOR("Christian Fischbach <fishbach@pool.informatik.rwth-aachen.de>, Abramo Bagnara <abramo@alsa-project.org>"); 2058 2057 MODULE_DESCRIPTION("ESS ES18xx AudioDrive"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gus_pcm.c
r92 r207 674 674 formats: (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 | 675 675 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE), 676 rates: SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_4 4100,676 rates: SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 677 677 rate_min: 5510, 678 678 rate_max: 48000, -
GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gus_synth.c
r32 r207 59 59 if (voice == NULL) { 60 60 snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port); 61 snd_gus_use_dec(gus); 61 62 up(&gus->register_mutex); 62 63 return -EBUSY; … … 75 76 down(&gus->register_mutex); 76 77 snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port); 78 snd_gus_use_dec(gus); 77 79 up(&gus->register_mutex); 78 80 return 0; -
GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gusclassic.c
r112 r207 32 32 #define SNDRV_GET_ID 33 33 #include <sound/initval.h> 34 35 EXPORT_NO_SYMBOLS;36 34 37 35 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gusextreme.c
r112 r207 35 35 #define SNDRV_GET_ID 36 36 #include <sound/initval.h> 37 38 EXPORT_NO_SYMBOLS;39 37 40 38 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gusmax.c
r112 r207 33 33 #define SNDRV_GET_ID 34 34 #include <sound/initval.h> 35 36 EXPORT_NO_SYMBOLS;37 35 38 36 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/gus/interwave.c
r112 r207 45 45 #include <sound/initval.h> 46 46 47 EXPORT_NO_SYMBOLS;48 47 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); 49 48 MODULE_CLASSES("{sound}"); … … 831 830 } 832 831 sprintf(pcm->name + strlen(pcm->name), " rev %c", gus->revision + 'A'); 833 strcat(pcm->name, " (c hip)");832 strcat(pcm->name, " (codec)"); 834 833 if ((err = snd_cs4231_timer(cs4231, 2, NULL)) < 0) { 835 834 snd_card_free(card); -
GPL/branches/alsa-resync1/alsa-kernel/isa/opl3sa2.c
r206 r207 36 36 #define SNDRV_GET_ID 37 37 #include <sound/initval.h> 38 39 EXPORT_NO_SYMBOLS;40 38 41 39 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/opti9xx/opti92x-ad1848.c
r92 r207 54 54 #include <sound/initval.h> 55 55 56 EXPORT_NO_SYMBOLS;57 56 MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>"); 58 57 MODULE_CLASSES("{sound}"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000.c
r112 r207 110 110 snd_emu8000_dma_chan(emu8000_t *emu, int ch, int mode) 111 111 { 112 unsigned right_bit = (mode & EMU8000_RAM_RIGHT) ? 0x01000000 : 0; 113 mode &= EMU8000_RAM_MODE_MASK; 112 114 if (mode == EMU8000_RAM_CLOSE) { 113 115 EMU8000_CCCA_WRITE(emu, ch, 0); … … 123 125 EMU8000_CSL_WRITE(emu, ch, 0); 124 126 if (mode == EMU8000_RAM_WRITE) /* DMA write */ 125 EMU8000_CCCA_WRITE(emu, ch, 0x06000000 );127 EMU8000_CCCA_WRITE(emu, ch, 0x06000000 | right_bit); 126 128 else /* DMA read */ 127 EMU8000_CCCA_WRITE(emu, ch, 0x04000000 );129 EMU8000_CCCA_WRITE(emu, ch, 0x04000000 | right_bit); 128 130 } 129 131 -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000_callback.c
r32 r207 17 17 * You should have received a copy of the GNU General Public License 18 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 */ 21 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 */ 21 22 #define __NO_VERSION__ 22 23 #include "emu8000_local.h" 24 #include <sound/asoundef.h> 23 25 24 26 /* … … 26 28 */ 27 29 static snd_emux_voice_t *get_voice(snd_emux_t *emu, snd_emux_port_t *port); 28 static voidstart_voice(snd_emux_voice_t *vp);30 static int start_voice(snd_emux_voice_t *vp); 29 31 static void trigger_voice(snd_emux_voice_t *vp); 30 32 static void release_voice(snd_emux_voice_t *vp); … … 33 35 static void terminate_voice(snd_emux_voice_t *vp); 34 36 static void sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset); 35 #ifdef CONFIG_SND_ OSSEMUL37 #ifdef CONFIG_SND_SEQUENCER_OSS 36 38 static int oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2); 37 39 #endif … … 93 95 load_fx: load_fx, 94 96 sysex: sysex, 95 #ifdef CONFIG_SND_ OSSEMUL97 #ifdef CONFIG_SND_SEQUENCER_OSS 96 98 oss_ioctl: oss_ioctl, 97 99 #endif … … 208 210 if (state == SNDRV_EMUX_ST_OFF) 209 211 bp = best + OFF; 210 else if (state == SNDRV_EMUX_ST_RELEASED) { 212 else if (state == SNDRV_EMUX_ST_RELEASED || 213 state == SNDRV_EMUX_ST_PENDING) { 211 214 bp = best + RELEASED; 212 215 val = (EMU8000_CVCF_READ(hw, vp->ch) >> 16) & 0xffff; … … 247 250 /* 248 251 */ 249 static void252 static int 250 253 start_voice(snd_emux_voice_t *vp) 251 254 { … … 256 259 emu8000_t *hw; 257 260 258 hw = snd_magic_cast(emu8000_t, vp->hw, return );261 hw = snd_magic_cast(emu8000_t, vp->hw, return -EINVAL); 259 262 ch = vp->ch; 260 263 chan = vp->chan; … … 320 323 EMU8000_VTFT_WRITE(hw, ch, temp | vp->ftarget); 321 324 EMU8000_CVCF_WRITE(hw, ch, temp | 0xff00); 325 326 return 0; 322 327 } 323 328 … … 492 497 493 498 494 #ifdef CONFIG_SND_ OSSEMUL499 #ifdef CONFIG_SND_SEQUENCER_OSS 495 500 /* 496 501 * OSS ioctl callback -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000_local.h
r32 r207 19 19 * You should have received a copy of the GNU General Public License 20 20 * along with this program; if not, write to the Free Software 21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 22 */ 23 23 24 #include <sound/driver.h> 25 #include <linux/wait.h> 26 #include <linux/sched.h> 27 #include <linux/slab.h> 28 #include <sound/core.h> 24 29 #include <sound/emu8000.h> 25 30 #include <sound/emu8000_reg.h> … … 35 40 void snd_emu8000_ops_setup(emu8000_t *emu); 36 41 42 /* emu8000_pcm.c */ 43 int snd_emu8000_pcm_new(snd_card_t *card, emu8000_t *emu, int index); 44 37 45 #endif /* __EMU8000_LOCAL_H */ -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000_synth.c
r32 r207 18 18 * You should have received a copy of the GNU General Public License 19 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 21 */ 22 22 23 #define SNDRV_MAIN_OBJECT_FILE24 23 #include "emu8000_local.h" 24 #include <linux/init.h> 25 25 #include <sound/initval.h> 26 26 27 EXPORT_NO_SYMBOLS; 27 MODULE_AUTHOR("Takashi Iwai, Steve Ratcliffe"); 28 MODULE_DESCRIPTION("Emu8000 synth plug-in routine"); 29 MODULE_LICENSE("GPL"); 28 30 MODULE_CLASSES("{sound}"); 29 MODULE_AUTHOR("Takashi Iwai, Steve Ratcliffe");30 31 31 32 /*----------------------------------------------------------------*/ … … 70 71 emu->midi_ports = hw->seq_ports < 2 ? hw->seq_ports : 2; /* number of virmidi ports */ 71 72 emu->midi_devidx = 1; 73 emu->linear_panning = 1; 72 74 73 75 if (snd_emux_register(emu, dev->card, hw->index, "Emu8000") < 0) { … … 78 80 return -ENOMEM; 79 81 } 82 83 if (hw->mem_size > 0) 84 snd_emu8000_pcm_new(dev->card, hw, 1); 80 85 81 86 dev->driver_data = hw; … … 96 101 97 102 hw = dev->driver_data; 103 if (hw->pcm) 104 snd_device_free(dev->card, hw->pcm); 98 105 if (hw->emu) 99 106 snd_emux_free(hw->emu); -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/es968.c
r112 r207 35 35 36 36 #define chip_t sb_t 37 38 EXPORT_NO_SYMBOLS;39 37 40 38 MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>"); … … 160 158 #endif /* __ISAPNP__ */ 161 159 162 static void __exitsnd_card_es968_free(snd_card_t *card)160 static void snd_card_es968_free(snd_card_t *card) 163 161 { 164 162 struct snd_card_es968 *acard = (struct snd_card_es968 *)card->private_data; -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/sb16.c
r112 r207 48 48 #else 49 49 #define PFX "sb16: " 50 #endif51 52 #ifndef SNDRV_SBAWE53 EXPORT_NO_SYMBOLS;54 50 #endif 55 51 -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/sb8.c
r112 r207 32 32 33 33 #define chip_t sb_t 34 35 EXPORT_NO_SYMBOLS;36 34 37 35 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/sgalaxy.c
r112 r207 34 34 #define SNDRV_GET_ID 35 35 #include <sound/initval.h> 36 37 EXPORT_NO_SYMBOLS;38 36 39 37 MODULE_AUTHOR("Christopher Butler <chrisb@sandy.force9.co.uk>"); -
GPL/branches/alsa-resync1/alsa-kernel/isa/wavefront/wavefront.c
r112 r207 36 36 #define chip_t cs4231_t 37 37 38 EXPORT_NO_SYMBOLS;39 38 MODULE_AUTHOR("Paul Barton-Davis <pbd@op.net>"); 40 39 MODULE_DESCRIPTION("Turtle Beach Wavefront"); -
GPL/branches/alsa-resync1/alsa-kernel/pci/ali5451/ali5451.c
r206 r207 33 33 #include <linux/interrupt.h> 34 34 #include <linux/init.h> 35 #include <linux/pci.h> 35 36 #include <linux/slab.h> 36 37 #include <sound/core.h> -
GPL/branches/alsa-resync1/alsa-kernel/pci/als4000.c
r92 r207 60 60 61 61 #include <sound/driver.h> 62 #include <asm/io.h> 63 #include <linux/init.h> 64 #include <linux/pci.h> 65 #include <linux/slab.h> 66 #include <sound/core.h> 62 67 #include <sound/pcm.h> 63 68 #include <sound/rawmidi.h> … … 68 73 #include <sound/initval.h> 69 74 70 EXPORT_NO_SYMBOLS;75 MODULE_AUTHOR("Bart Hartgers <bart@etpmod.phys.tue.nl>"); 71 76 MODULE_DESCRIPTION("Avance Logic ALS4000"); 77 MODULE_LICENSE("GPL"); 72 78 MODULE_CLASSES("{sound}"); 73 79 MODULE_DEVICES("{{Avance Logic,ALS4000}}"); -
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emu10k1.c
r84 r207 26 26 #include <sound/driver.h> 27 27 #include <linux/init.h> 28 #include <linux/pci.h> 28 29 #include <linux/time.h> 29 30 #include <sound/core.h> -
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emu10k1_main.c
r92 r207 35 35 #include <linux/delay.h> 36 36 #include <linux/init.h> 37 #include <linux/pci.h> 37 38 #include <linux/slab.h> 38 39 #include <linux/vmalloc.h> -
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emufx.c
r84 r207 32 32 #include <linux/delay.h> 33 33 #include <linux/slab.h> 34 34 #include <linux/init.h> 35 35 #include <sound/core.h> 36 36 #include <sound/tlv.h> -
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emumixer.c
r84 r207 34 34 #include <sound/driver.h> 35 35 #include <linux/time.h> 36 #include <linux/init.h> 36 37 #include <sound/core.h> 37 38 #include <sound/emu10k1.h> -
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emumpu401.c
r84 r207 23 23 #include <sound/driver.h> 24 24 #include <linux/time.h> 25 #include <linux/init.h> 25 26 #include <sound/core.h> 26 27 #include <sound/emu10k1.h> -
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emuproc.c
r206 r207 29 29 #include <sound/driver.h> 30 30 #include <linux/slab.h> 31 #include <linux/init.h> 31 32 #include <sound/core.h> 32 33 #include <sound/emu10k1.h> -
GPL/branches/alsa-resync1/alsa-kernel/pci/es1968.c
r206 r207 101 101 #include <linux/interrupt.h> 102 102 #include <linux/init.h> 103 #include <linux/pci.h> 103 104 #include <linux/slab.h> 104 105 #include <sound/core.h> … … 112 113 #define DRIVER_NAME "ES1968" 113 114 114 EXPORT_NO_SYMBOLS;115 115 MODULE_DESCRIPTION("ESS Maestro"); 116 116 MODULE_CLASSES("{sound}"); -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712.c
r112 r207 31 31 #include <linux/interrupt.h> 32 32 #include <linux/init.h> 33 #include <linux/pci.h> 33 34 #include <linux/slab.h> 34 35 #include <sound/core.h> … … 48 49 #define SND_CS8404 49 50 #include <sound/cs8403.h> 50 51 EXPORT_NO_SYMBOLS;52 51 53 52 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); … … 1235 1234 switch (ice->eeprom.subvendor) { 1236 1235 case ICE1712_SUBDEVICE_DELTA1010: 1236 case ICE1712_SUBDEVICE_DELTA1010LT: // check it --jk 1237 1237 case ICE1712_SUBDEVICE_DELTADIO2496: 1238 1238 case ICE1712_SUBDEVICE_DELTA66: … … 4101 4101 /* follow thru */ 4102 4102 case ICE1712_SUBDEVICE_DELTA1010: 4103 case ICE1712_SUBDEVICE_STDSP24: 4103 4104 ice->num_adcs = ice->num_dacs = ice->num_total_dacs = 8; 4104 4105 break; -
GPL/branches/alsa-resync1/alsa-kernel/pci/korg1212/korg1212.c
r112 r207 24 24 #include <linux/delay.h> 25 25 #include <linux/init.h> 26 #include <linux/pci.h> 26 27 #include <linux/slab.h> 27 28 #include <sound/core.h> … … 32 33 #include <sound/initval.h> 33 34 34 #define DEBUG 1 35 //#define LARGEALLOC 1 36 #define PRINTK printk 35 // ---------------------------------------------------------------------------- 36 // Debug Stuff 37 // ---------------------------------------------------------------------------- 38 #define K1212_DEBUG_LEVEL 0 39 #define K1212_DEBUG_PRINTK printk 40 41 // ---------------------------------------------------------------------------- 42 // Record/Play Buffer Allocation Method. If K1212_LARGEALLOC is defined all 43 // buffers are alocated as a large piece inside KorgSharedBuffer. 44 // ---------------------------------------------------------------------------- 45 //#define K1212_LARGEALLOC 1 37 46 38 47 // ---------------------------------------------------------------------------- … … 273 282 274 283 typedef struct KorgSharedBuffer { 275 #ifdef LARGEALLOC284 #ifdef K1212_LARGEALLOC 276 285 KorgAudioBuffer playDataBufs[kNumBuffers]; 277 286 KorgAudioBuffer recordDataBufs[kNumBuffers]; … … 373 382 }; 374 383 375 EXPORT_NO_SYMBOLS;376 384 MODULE_DESCRIPTION("korg1212"); 377 385 MODULE_LICENSE("GPL"); … … 522 530 523 531 if (korg1212->outDoorbellPtr) { 524 #if def DEBUG525 PRINTK("DEBUG: Card <- 0x%08x 0x%08x [%s]\n", doorbellVal, mailBox0Val, stateName[korg1212->cardState]);532 #if K1212_DEBUG_LEVEL > 0 533 K1212_DEBUG_PRINTK("K1212_DEBUG: Card <- 0x%08x 0x%08x [%s]\n", doorbellVal, mailBox0Val, stateName[korg1212->cardState]); 526 534 #endif 527 535 for (retryCount = 0; retryCount < MAX_COMMAND_RETRIES; retryCount++) { … … 570 578 unsigned long endtime = jiffies + 20 * HZ; 571 579 572 #if def DEBUG573 PRINTK("DEBUG: WaitForCardStopAck [%s]\n", stateName[korg1212->cardState]);574 #endif // DEBUG580 #if K1212_DEBUG_LEVEL > 0 581 K1212_DEBUG_PRINTK("K1212_DEBUG: WaitForCardStopAck [%s]\n", stateName[korg1212->cardState]); 582 #endif 575 583 576 584 if (korg1212->inIRQ) … … 624 632 static int snd_korg1212_OpenCard(korg1212_t * korg1212) 625 633 { 626 #if def DEBUG627 PRINTK("DEBUG: OpenCard [%s]\n", stateName[korg1212->cardState]);634 #if K1212_DEBUG_LEVEL > 0 635 K1212_DEBUG_PRINTK("K1212_DEBUG: OpenCard [%s]\n", stateName[korg1212->cardState]); 628 636 #endif 629 637 snd_korg1212_setCardState(korg1212, K1212_STATE_OPEN); … … 633 641 static int snd_korg1212_CloseCard(korg1212_t * korg1212) 634 642 { 635 #if def DEBUG636 PRINTK("DEBUG: CloseCard [%s]\n", stateName[korg1212->cardState]);643 #if K1212_DEBUG_LEVEL > 0 644 K1212_DEBUG_PRINTK("K1212_DEBUG: CloseCard [%s]\n", stateName[korg1212->cardState]); 637 645 #endif 638 646 … … 640 648 rc = snd_korg1212_Send1212Command(korg1212, K1212_DB_SelectPlayMode, 641 649 K1212_MODE_StopPlay, 0, 0, 0); 642 #if def DEBUG643 if (rc) PRINTK("DEBUG: CloseCard - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);650 #if K1212_DEBUG_LEVEL > 0 651 if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: CloseCard - RC = %d [%s]\n", rc, stateName[korg1212->cardState]); 644 652 #endif 645 653 … … 659 667 static int snd_korg1212_SetupForPlay(korg1212_t * korg1212) 660 668 { 661 #if def DEBUG662 PRINTK("DEBUG: SetupForPlay [%s]\n", stateName[korg1212->cardState]);669 #if K1212_DEBUG_LEVEL > 0 670 K1212_DEBUG_PRINTK("K1212_DEBUG: SetupForPlay [%s]\n", stateName[korg1212->cardState]); 663 671 #endif 664 672 … … 667 675 K1212_MODE_SetupPlay, 0, 0, 0); 668 676 669 #if def DEBUG670 if (rc) PRINTK("DEBUG: SetupForPlay - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);677 #if K1212_DEBUG_LEVEL > 0 678 if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: SetupForPlay - RC = %d [%s]\n", rc, stateName[korg1212->cardState]); 671 679 #endif 672 680 if (rc != K1212_CMDRET_Success) { … … 678 686 static int snd_korg1212_TriggerPlay(korg1212_t * korg1212) 679 687 { 680 #if def DEBUG681 PRINTK("DEBUG: TriggerPlay [%s]\n", stateName[korg1212->cardState]);688 #if K1212_DEBUG_LEVEL > 0 689 K1212_DEBUG_PRINTK("K1212_DEBUG: TriggerPlay [%s]\n", stateName[korg1212->cardState]); 682 690 #endif 683 691 … … 685 693 rc = snd_korg1212_Send1212Command(korg1212, K1212_DB_TriggerPlay, 0, 0, 0, 0); 686 694 687 #if def DEBUG688 if (rc) PRINTK("DEBUG: TriggerPlay - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);695 #if K1212_DEBUG_LEVEL > 0 696 if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: TriggerPlay - RC = %d [%s]\n", rc, stateName[korg1212->cardState]); 689 697 #endif 690 698 … … 697 705 static int snd_korg1212_StopPlay(korg1212_t * korg1212) 698 706 { 699 #if def DEBUG700 PRINTK("DEBUG: StopPlay [%s]\n", stateName[korg1212->cardState]);707 #if K1212_DEBUG_LEVEL > 0 708 K1212_DEBUG_PRINTK("K1212_DEBUG: StopPlay [%s]\n", stateName[korg1212->cardState]); 701 709 #endif 702 710 … … 722 730 static int snd_korg1212_SetMonitorMode(korg1212_t *korg1212, MonitorModeSelector mode) 723 731 { 724 #if def DEBUG725 PRINTK("DEBUG: SetMonitorMode [%s]\n", stateName[korg1212->cardState]);732 #if K1212_DEBUG_LEVEL > 0 733 K1212_DEBUG_PRINTK("K1212_DEBUG: SetMonitorMode [%s]\n", stateName[korg1212->cardState]); 726 734 #endif 727 735 … … 791 799 0, 0, 0); 792 800 793 #if def DEBUG794 if (rc) PRINTK("DEBUG: Set Clock Source Selector - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);801 #if K1212_DEBUG_LEVEL > 0 802 if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Set Clock Source Selector - RC = %d [%s]\n", rc, stateName[korg1212->cardState]); 795 803 #endif 796 804 … … 827 835 u16 count; 828 836 829 #if def DEBUG830 PRINTK("DEBUG: WriteADCSensivity [%s]\n", stateName[korg1212->cardState]);837 #if K1212_DEBUG_LEVEL > 0 838 K1212_DEBUG_PRINTK("K1212_DEBUG: WriteADCSensivity [%s]\n", stateName[korg1212->cardState]); 831 839 #endif 832 840 … … 952 960 rc = snd_korg1212_Send1212Command(korg1212, K1212_DB_SelectPlayMode, 953 961 K1212_MODE_MonitorOn, 0, 0, 0); 954 #if def DEBUG955 if (rc) PRINTK("DEBUG: WriteADCSensivity - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);962 #if K1212_DEBUG_LEVEL > 0 963 if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: WriteADCSensivity - RC = %d [%s]\n", rc, stateName[korg1212->cardState]); 956 964 #endif 957 965 … … 965 973 int channel; 966 974 967 #if def DEBUG968 PRINTK("DEBUG: DSP download is complete. [%s]\n", stateName[korg1212->cardState]);975 #if K1212_DEBUG_LEVEL > 0 976 K1212_DEBUG_PRINTK("K1212_DEBUG: DSP download is complete. [%s]\n", stateName[korg1212->cardState]); 969 977 #endif 970 978 … … 974 982 rc = snd_korg1212_Send1212Command(korg1212, K1212_DB_BootFromDSPPage4, 0, 0, 0, 0); 975 983 976 #if def DEBUG977 if (rc) PRINTK("DEBUG: Boot from Page 4 - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);984 #if K1212_DEBUG_LEVEL > 0 985 if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Boot from Page 4 - RC = %d [%s]\n", rc, stateName[korg1212->cardState]); 978 986 #endif 979 987 mdelay(DSP_BOOT_DELAY_IN_MS); … … 991 999 ); 992 1000 993 #if def DEBUG994 if (rc) PRINTK("DEBUG: Configure Buffer Memory - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);1001 #if K1212_DEBUG_LEVEL > 0 1002 if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Configure Buffer Memory - RC = %d [%s]\n", rc, stateName[korg1212->cardState]); 995 1003 #endif 996 1004 … … 1005 1013 ); 1006 1014 1007 #if def DEBUG1008 if (rc) PRINTK("DEBUG: Configure Misc Memory - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);1015 #if K1212_DEBUG_LEVEL > 0 1016 if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Configure Misc Memory - RC = %d [%s]\n", rc, stateName[korg1212->cardState]); 1009 1017 #endif 1010 1018 … … 1027 1035 ClockSourceSelector[korg1212->clkSrcRate], 1028 1036 0, 0, 0); 1029 #if def DEBUG1030 if (rc) PRINTK("DEBUG: Set Clock Source Selector - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);1037 #if K1212_DEBUG_LEVEL > 0 1038 if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Set Clock Source Selector - RC = %d [%s]\n", rc, stateName[korg1212->cardState]); 1031 1039 #endif 1032 1040 1033 1041 snd_korg1212_setCardState(korg1212, K1212_STATE_READY); 1034 1042 1035 #if def DEBUG1036 if (rc) PRINTK("DEBUG: Set Monitor On - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);1043 #if K1212_DEBUG_LEVEL > 0 1044 if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Set Monitor On - RC = %d [%s]\n", rc, stateName[korg1212->cardState]); 1037 1045 #endif 1038 1046 … … 1063 1071 switch (doorbellValue) { 1064 1072 case K1212_DB_DSPDownloadDone: 1065 #if def DEBUG1066 PRINTK("DEBUG: IRQ DNLD count - %ld, %x, [%s].\n", korg1212->irqcount, doorbellValue, stateName[korg1212->cardState]);1073 #if K1212_DEBUG_LEVEL > 0 1074 K1212_DEBUG_PRINTK("K1212_DEBUG: IRQ DNLD count - %ld, %x, [%s].\n", korg1212->irqcount, doorbellValue, stateName[korg1212->cardState]); 1067 1075 #endif 1068 1076 if (korg1212->cardState == K1212_STATE_DSP_IN_PROCESS) { … … 1076 1084 // ------------------------------------------------------------------------ 1077 1085 case K1212_ISRCODE_DMAERROR: 1078 #if def DEBUG1079 PRINTK("DEBUG: IRQ DMAE count - %ld, %x, [%s].\n", korg1212->irqcount, doorbellValue, stateName[korg1212->cardState]);1086 #if K1212_DEBUG_LEVEL > 0 1087 K1212_DEBUG_PRINTK("K1212_DEBUG: IRQ DMAE count - %ld, %x, [%s].\n", korg1212->irqcount, doorbellValue, stateName[korg1212->cardState]); 1080 1088 #endif 1081 1089 writel(0, &korg1212->sharedBufferPtr->cardCommand); … … 1087 1095 // ------------------------------------------------------------------------ 1088 1096 case K1212_ISRCODE_CARDSTOPPED: 1089 #if def DEBUG1090 PRINTK("DEBUG: IRQ CSTP count - %ld, %x, [%s].\n", korg1212->irqcount, doorbellValue, stateName[korg1212->cardState]);1097 #if K1212_DEBUG_LEVEL > 0 1098 K1212_DEBUG_PRINTK("K1212_DEBUG: IRQ CSTP count - %ld, %x, [%s].\n", korg1212->irqcount, doorbellValue, stateName[korg1212->cardState]); 1091 1099 #endif 1092 1100 writel(0, &korg1212->sharedBufferPtr->cardCommand); … … 1094 1102 1095 1103 default: 1096 #if def XDEBUG1097 PRINTK("DEBUG: IRQ DFLT count - %ld, %x, cpos=%d [%s].\n", korg1212->irqcount, doorbellValue,1104 #if K1212_DEBUG_LEVEL > 1 1105 K1212_DEBUG_PRINTK("K1212_DEBUG: IRQ DFLT count - %ld, %x, cpos=%d [%s].\n", korg1212->irqcount, doorbellValue, 1098 1106 korg1212->currentBuffer, stateName[korg1212->cardState]); 1099 1107 #endif … … 1124 1132 { 1125 1133 1126 #if def DEBUG1127 PRINTK("DEBUG: DSP download is starting... [%s]\n", stateName[korg1212->cardState]);1134 #if K1212_DEBUG_LEVEL > 0 1135 K1212_DEBUG_PRINTK("K1212_DEBUG: DSP download is starting... [%s]\n", stateName[korg1212->cardState]); 1128 1136 #endif 1129 1137 … … 1143 1151 0, 0, 0); 1144 1152 1145 #if def DEBUG1146 if (rc) PRINTK("DEBUG: Start DSP Download RC = %d [%s]\n", rc, stateName[korg1212->cardState]);1153 #if K1212_DEBUG_LEVEL > 0 1154 if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Start DSP Download RC = %d [%s]\n", rc, stateName[korg1212->cardState]); 1147 1155 #endif 1148 1156 … … 1196 1204 korg1212_t *korg1212 = (korg1212_t *) pcm->private_data; 1197 1205 1198 #if def DEBUG1199 PRINTK("DEBUG: snd_korg1212_free_pcm [%s]\n", stateName[korg1212->cardState]);1206 #if K1212_DEBUG_LEVEL > 0 1207 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_free_pcm [%s]\n", stateName[korg1212->cardState]); 1200 1208 #endif 1201 1209 … … 1219 1227 snd_pcm_runtime_t *runtime = substream->runtime; 1220 1228 1221 #if def DEBUG1222 PRINTK("DEBUG: snd_korg1212_playback_open [%s]\n", stateName[korg1212->cardState]);1229 #if K1212_DEBUG_LEVEL > 0 1230 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_open [%s]\n", stateName[korg1212->cardState]); 1223 1231 #endif 1224 1232 … … 1249 1257 snd_pcm_runtime_t *runtime = substream->runtime; 1250 1258 1251 #if def DEBUG1252 PRINTK("DEBUG: snd_korg1212_capture_open [%s]\n", stateName[korg1212->cardState]);1259 #if K1212_DEBUG_LEVEL > 0 1260 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_capture_open [%s]\n", stateName[korg1212->cardState]); 1253 1261 #endif 1254 1262 … … 1278 1286 korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); 1279 1287 1280 #if def DEBUG1281 PRINTK("DEBUG: snd_korg1212_playback_close [%s]\n", stateName[korg1212->cardState]);1288 #if K1212_DEBUG_LEVEL > 0 1289 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_close [%s]\n", stateName[korg1212->cardState]); 1282 1290 #endif 1283 1291 … … 1298 1306 korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); 1299 1307 1300 #if def DEBUG1301 PRINTK("DEBUG: snd_korg1212_capture_close [%s]\n", stateName[korg1212->cardState]);1308 #if K1212_DEBUG_LEVEL > 0 1309 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_capture_close [%s]\n", stateName[korg1212->cardState]); 1302 1310 #endif 1303 1311 … … 1328 1336 info->step = sizeof(KorgAudioFrame) * 8; 1329 1337 1330 #if def DEBUG1331 PRINTK("DEBUG: snd_korg1212_channel_info %d:, offset=%ld, first=%d, step=%d\n", chn, info->offset, info->first, info->step);1338 #if K1212_DEBUG_LEVEL > 0 1339 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_channel_info %d:, offset=%ld, first=%d, step=%d\n", chn, info->offset, info->first, info->step); 1332 1340 #endif 1333 1341 … … 1338 1346 unsigned int cmd, void *arg) 1339 1347 { 1340 #if def DEBUG1341 PRINTK("DEBUG: snd_korg1212_ioctl: cmd=%d\n", cmd);1348 #if K1212_DEBUG_LEVEL > 0 1349 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_ioctl: cmd=%d\n", cmd); 1342 1350 #endif 1343 1351 if (cmd == SNDRV_PCM_IOCTL1_CHANNEL_INFO ) { … … 1356 1364 int err; 1357 1365 1358 #if def DEBUG1359 PRINTK("DEBUG: snd_korg1212_hw_params [%s]\n", stateName[korg1212->cardState]);1366 #if K1212_DEBUG_LEVEL > 0 1367 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_hw_params [%s]\n", stateName[korg1212->cardState]); 1360 1368 #endif 1361 1369 … … 1383 1391 unsigned long flags; 1384 1392 1385 #if def DEBUG1386 PRINTK("DEBUG: snd_korg1212_prepare [%s]\n", stateName[korg1212->cardState]);1393 #if K1212_DEBUG_LEVEL > 0 1394 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_prepare [%s]\n", stateName[korg1212->cardState]); 1387 1395 #endif 1388 1396 … … 1402 1410 korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); 1403 1411 1404 #if def DEBUG1405 PRINTK("DEBUG: snd_korg1212_trigger [%s] cmd=%d\n", stateName[korg1212->cardState], cmd);1412 #if K1212_DEBUG_LEVEL > 0 1413 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_trigger [%s] cmd=%d\n", stateName[korg1212->cardState], cmd); 1406 1414 #endif 1407 1415 … … 1433 1441 pos = korg1212->currentBuffer * kPlayBufferFrames; 1434 1442 1435 #if def XDEBUG1436 PRINTK("DEBUG: snd_korg1212_pointer [%s] %ld\n", stateName[korg1212->cardState], pos);1443 #if K1212_DEBUG_LEVEL > 1 1444 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_pointer [%s] %ld\n", stateName[korg1212->cardState], pos); 1437 1445 #endif 1438 1446 … … 1449 1457 KorgAudioFrame * dst = korg1212->playDataBufsPtr[0].bufferData + pos; 1450 1458 1451 #if def DEBUG1452 PRINTK("DEBUG: snd_korg1212_playback_copy [%s] %ld %ld\n", stateName[korg1212->cardState], pos, count);1459 #if K1212_DEBUG_LEVEL > 0 1460 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_copy [%s] %ld %ld\n", stateName[korg1212->cardState], pos, count); 1453 1461 #endif 1454 1462 1455 1463 snd_assert(pos + count <= K1212_MAX_SAMPLES, return -EINVAL); 1456 1464 1457 copy_from_user(dst, src, count * K1212_FRAME_SIZE); 1458 1459 return 0; 1465 return copy_from_user(dst, src, count * K1212_FRAME_SIZE) ? -EFAULT : 0; 1460 1466 } 1461 1467 … … 1469 1475 KorgAudioFrame * src = korg1212->recordDataBufsPtr[0].bufferData + pos; 1470 1476 1471 #if def DEBUG1472 PRINTK("DEBUG: snd_korg1212_capture_copy [%s] %ld %ld\n", stateName[korg1212->cardState], pos, count);1477 #if K1212_DEBUG_LEVEL > 0 1478 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_capture_copy [%s] %ld %ld\n", stateName[korg1212->cardState], pos, count); 1473 1479 #endif 1474 1480 1475 1481 snd_assert(pos + count <= K1212_MAX_SAMPLES, return -EINVAL); 1476 1482 1477 copy_to_user(dst, src, count * K1212_FRAME_SIZE); 1478 1479 return 0; 1483 return copy_to_user(dst, src, count * K1212_FRAME_SIZE) ? -EFAULT : 0; 1480 1484 } 1481 1485 … … 1488 1492 KorgAudioFrame * dst = korg1212->playDataBufsPtr[0].bufferData + pos; 1489 1493 1490 #if def DEBUG1491 PRINTK("DEBUG: snd_korg1212_playback_silence [%s]\n", stateName[korg1212->cardState]);1494 #if K1212_DEBUG_LEVEL > 0 1495 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_silence [%s]\n", stateName[korg1212->cardState]); 1492 1496 #endif 1493 1497 … … 1940 1944 iomem2_size = pci_resource_len(korg1212->pci, 2); 1941 1945 1942 #if def DEBUG1943 PRINTK("DEBUG: resources:\n"1946 #if K1212_DEBUG_LEVEL > 0 1947 K1212_DEBUG_PRINTK("K1212_DEBUG: resources:\n" 1944 1948 " iomem = 0x%lx (%d)\n" 1945 1949 " ioport = 0x%lx (%d)\n" … … 2005 2009 korg1212->idRegPtr = (u32 *) (korg1212->iobase + DEV_VEND_ID_OFFSET); 2006 2010 2007 #if def DEBUG2008 PRINTK("DEBUG: card registers:\n"2011 #if K1212_DEBUG_LEVEL > 0 2012 K1212_DEBUG_PRINTK("K1212_DEBUG: card registers:\n" 2009 2013 " Status register = 0x%p\n" 2010 2014 " OutDoorbell = 0x%p\n" … … 2039 2043 } 2040 2044 2041 #if def DEBUG2042 PRINTK("DEBUG: Shared Buffer Area = 0x%p (0x%08lx), %d bytes\n", korg1212->sharedBufferPtr, korg1212->sharedBufferPhy, sizeof(KorgSharedBuffer));2043 #endif 2044 2045 #ifndef LARGEALLOC2045 #if K1212_DEBUG_LEVEL > 0 2046 K1212_DEBUG_PRINTK("K1212_DEBUG: Shared Buffer Area = 0x%p (0x%08lx), %d bytes\n", korg1212->sharedBufferPtr, korg1212->sharedBufferPhy, sizeof(KorgSharedBuffer)); 2047 #endif 2048 2049 #ifndef K1212_LARGEALLOC 2046 2050 2047 2051 korg1212->DataBufsSize = sizeof(KorgAudioBuffer) * kNumBuffers; … … 2055 2059 } 2056 2060 2057 #if def DEBUG2058 PRINTK("DEBUG: Play Data Area = 0x%p (0x%08x), %d bytes\n",2061 #if K1212_DEBUG_LEVEL > 0 2062 K1212_DEBUG_PRINTK("K1212_DEBUG: Play Data Area = 0x%p (0x%08x), %d bytes\n", 2059 2063 korg1212->playDataBufsPtr, korg1212->PlayDataPhy, korg1212->DataBufsSize); 2060 2064 #endif … … 2068 2072 } 2069 2073 2070 #if def DEBUG2071 PRINTK("DEBUG: Record Data Area = 0x%p (0x%08x), %d bytes\n",2074 #if K1212_DEBUG_LEVEL > 0 2075 K1212_DEBUG_PRINTK("K1212_DEBUG: Record Data Area = 0x%p (0x%08x), %d bytes\n", 2072 2076 korg1212->recordDataBufsPtr, korg1212->RecDataPhy, korg1212->DataBufsSize); 2073 2077 #endif 2074 2078 2075 #else // LARGEALLOC2079 #else // K1212_LARGEALLOC 2076 2080 2077 2081 korg1212->recordDataBufsPtr = korg1212->sharedBufferPtr->recordDataBufs; … … 2080 2084 korg1212->RecDataPhy = (u32) &((KorgSharedBuffer *) korg1212->sharedBufferPhy)->recordDataBufs; 2081 2085 2082 #endif // LARGEALLOC2086 #endif // K1212_LARGEALLOC 2083 2087 2084 2088 korg1212->dspCodeSize = sizeof (dspCode); … … 2096 2100 } 2097 2101 2098 #if def DEBUG2099 PRINTK("DEBUG: DSP Code area = 0x%p (0x%08x) %d bytes [%s]\n",2102 #if K1212_DEBUG_LEVEL > 0 2103 K1212_DEBUG_PRINTK("K1212_DEBUG: DSP Code area = 0x%p (0x%08x) %d bytes [%s]\n", 2100 2104 korg1212->dspMemPtr, korg1212->dspMemPhy, korg1212->dspCodeSize, 2101 2105 stateName[korg1212->cardState]); … … 2104 2108 rc = snd_korg1212_Send1212Command(korg1212, K1212_DB_RebootCard, 0, 0, 0, 0); 2105 2109 2106 #if def DEBUG2107 if (rc) PRINTK("DEBUG: Reboot Card - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);2110 #if K1212_DEBUG_LEVEL > 0 2111 if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Reboot Card - RC = %d [%s]\n", rc, stateName[korg1212->cardState]); 2108 2112 #endif 2109 2113 … … 2202 2206 } 2203 2207 2204 #ifndef LARGEALLOC2208 #ifndef K1212_LARGEALLOC 2205 2209 2206 2210 // ------------------------------------------------------ … … 2240 2244 static void snd_korg1212_card_free(snd_card_t *card) 2241 2245 { 2242 #if def DEBUG2243 PRINTK("DEBUG: Freeing card\n");2246 #if K1212_DEBUG_LEVEL > 0 2247 K1212_DEBUG_PRINTK("K1212_DEBUG: Freeing card\n"); 2244 2248 #endif 2245 2249 snd_korg1212_free(card->private_data); … … 2281 2285 korg1212->iomem, korg1212->irq); 2282 2286 2283 #if def DEBUG2284 PRINTK("DEBUG: %s\n", card->longname);2287 #if K1212_DEBUG_LEVEL > 0 2288 K1212_DEBUG_PRINTK("K1212_DEBUG: %s\n", card->longname); 2285 2289 #endif 2286 2290 -
GPL/branches/alsa-resync1/alsa-kernel/pci/maestro3.c
r206 r207 37 37 #include <linux/interrupt.h> 38 38 #include <linux/init.h> 39 #include <linux/pci.h> 39 40 #include <linux/slab.h> 40 41 #include <linux/vmalloc.h> -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme96.c
r112 r207 28 28 #include <linux/delay.h> 29 29 #include <linux/init.h> 30 #include <linux/pci.h> 30 31 #include <linux/slab.h> 31 32 #include <sound/core.h> … … 38 39 39 40 /* note, two last pcis should be equal, it is not a bug */ 40 EXPORT_NO_SYMBOLS;41 41 42 42 MODULE_AUTHOR("Anders Torger <torger@ludd.luth.se>"); -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/hammerfall_mem.c
r206 r207 5 5 Copyright (C) 1999 Paul Barton-Davis 6 6 7 This module is only needed if you compiled the rme9652driver with7 This module is only needed if you compiled the hammerfall driver with 8 8 the PREALLOCATE_MEMORY option. It allocates the memory need to 9 9 run the board and holds it until the module is unloaded. Because … … 24 24 You should have received a copy of the GNU General Public License 25 25 along with this program; if not, write to the Free Software 26 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.27 28 $Id: rme9652_mem.c,v 1.1.1.1 2003/07/02 13:56:54 eleph Exp $26 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 28 hammerfall_mem.c,v 1.2 2002/06/19 08:52:11 perex Exp 29 29 30 30 … … 35 35 */ 36 36 37 #ifdef ALSA_BUILD38 37 #ifdef TARGET_OS2 39 38 #include <sound/driver.h> 40 39 #endif 41 #define MODULE42 #endif43 40 #include <linux/config.h> 44 41 #include <linux/version.h> 45 #if defined(ALSA_BUILD) && defined(CONFIG_MODVERSIONS) && !defined(__GENKSYMS__) && !defined(__DEPEND__)46 #define MODVERSIONS47 #include <linux/modversions.h>48 #include <sound/sndversions.h>49 #endif50 42 #include <linux/module.h> 51 43 #include <linux/pci.h> 52 44 #include <linux/init.h> 45 #include <linux/mm.h> 53 46 #include <sound/initval.h> 54 47 55 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0) 56 #include <linux/kernel.h> 57 #include <linux/sched.h> 58 #include <linux/malloc.h> 59 #include <asm/io.h> 60 #define __init 61 #define __exit 62 #define virt_to_page(x) (&mem_map[MAP_NR(x)]) 63 #define pci_for_each_dev(dev) \ 64 for(dev = pci_devices; dev; dev = dev->next) 65 #endif 66 67 #define RME9652_CARDS 8 68 #define RME9652_CHANNEL_BUFFER_SAMPLES (16*1024) 69 #define RME9652_CHANNEL_BUFFER_BYTES (4*RME9652_CHANNEL_BUFFER_SAMPLES) 48 #define HAMMERFALL_CARDS 8 49 #define HAMMERFALL_CHANNEL_BUFFER_SAMPLES (16*1024) 50 #define HAMMERFALL_CHANNEL_BUFFER_BYTES (4*HAMMERFALL_CHANNEL_BUFFER_SAMPLES) 70 51 71 52 /* export */ 72 53 73 54 static int snd_enable[8] = {1,1,1,1,1,1,1,1}; 74 MODULE_PARM(snd_enable, "1-" __MODULE_STRING( RME9652_CARDS) "i");55 MODULE_PARM(snd_enable, "1-" __MODULE_STRING(HAMMERFALL_CARDS) "i"); 75 56 MODULE_PARM_DESC(snd_enable, "Enable cards to allocate buffers for."); 76 57 … … 78 59 MODULE_DESCRIPTION("Memory allocator for RME Hammerfall"); 79 60 MODULE_CLASSES("{sound}"); 61 MODULE_LICENSE("GPL"); 80 62 81 63 /* Since we don't know at this point if we're allocating memory for a 82 64 Hammerfall or a Hammerfall/Light, assume the worst and allocate 83 65 space for the maximum number of channels. 84 85 See note in rme9652.h about why we allocate for an extra channel. 66 67 The extra channel is allocated because we need a 64kB-aligned 68 buffer in the actual interface driver code (see rme9652.c or hdsp.c 69 for details) 86 70 */ 87 71 88 #define TOTAL_SIZE (26+1)*( RME9652_CHANNEL_BUFFER_BYTES)89 #define NBUFS 2* RME9652_CARDS90 91 #define RME9652_BUF_ALLOCATED 0x192 #define RME9652_BUF_USED 0x293 94 typedef struct rme9652_buf_stru rme9652_buf_t;95 96 struct rme9652_buf_stru {72 #define TOTAL_SIZE (26+1)*(HAMMERFALL_CHANNEL_BUFFER_BYTES) 73 #define NBUFS 2*HAMMERFALL_CARDS 74 75 #define HAMMERFALL_BUF_ALLOCATED 0x1 76 #define HAMMERFALL_BUF_USED 0x2 77 78 typedef struct hammerfall_buf_stru hammerfall_buf_t; 79 80 struct hammerfall_buf_stru { 97 81 struct pci_dev *pci; 98 82 void *buf; … … 101 85 }; 102 86 103 static rme9652_buf_t rme9652_buffers[NBUFS]; 104 105 /* These are here so that we have absolutely no dependencies on any 106 other modules. Dependencies can (1) cause us to lose in the rush 107 for 2x 1.6MB chunks of contiguous memory and (2) make driver 108 debugging difficult because unloading and reloading the snd module 109 causes us to have to do the same for this one. Since on 2.2 110 kernels, and before, we can rarely if ever allocate memory after 111 starting things running, this would be bad. 87 static hammerfall_buf_t hammerfall_buffers[NBUFS]; 88 89 /* These are here so that we have absolutely no dependencies 90 on any other modules. Dependencies can (1) cause us to 91 lose in the rush for 2x1.6MB chunks of contiguous memory 92 and (2) make driver debugging difficult because unloading 93 and reloading the snd module causes us to have to do the 94 same for this one. Since we can rarely if ever allocate 95 memory after starting things running, that would be very 96 undesirable. 112 97 */ 113 98 … … 117 102 #endif 118 103 119 static void * rme9652_malloc_pages(struct pci_dev *pci,104 static void *hammerfall_malloc_pages(struct pci_dev *pci, 120 105 unsigned long size, 121 106 dma_addr_t *dmaaddr) … … 133 118 #endif 134 119 if (res != NULL) { 135 mem_map_t*page = virt_to_page(res);136 mem_map_t*last_page = page + (size + PAGE_SIZE - 1) / PAGE_SIZE;120 struct page *page = virt_to_page(res); 121 struct page *last_page = page + (size + PAGE_SIZE - 1) / PAGE_SIZE; 137 122 while (page < last_page) 138 123 set_bit(PG_reserved, &(page++)->flags); … … 141 126 } 142 127 143 static void rme9652_free_pages(struct pci_dev *pci, unsigned long size,128 static void hammerfall_free_pages(struct pci_dev *pci, unsigned long size, 144 129 void *ptr, dma_addr_t dmaaddr) 145 130 { 146 mem_map_t*page, *last_page;131 struct page *page, *last_page; 147 132 148 133 if (ptr == NULL) … … 159 144 for (pg = 0; PAGE_SIZE * (1 << pg) < size; pg++); 160 145 if (bus_to_virt(dmaaddr) != ptr) { 161 printk(KERN_ERR " rme9652_free_pages: dmaaddr != ptr\n");146 printk(KERN_ERR "hammerfall_free_pages: dmaaddr != ptr\n"); 162 147 return; 163 148 } … … 167 152 } 168 153 169 void *snd_rme9652_get_buffer (int card, dma_addr_t *dmaaddr) 170 171 { 172 int i; 173 rme9652_buf_t *rbuf; 174 175 if (card < 0 || card >= RME9652_CARDS) { 176 printk(KERN_ERR "snd_rme9652_get_buffer: card %d is out of range", card); 177 return NULL; 178 } 179 for (i = card * 2; i < card * 2 + 2; i++) { 180 rbuf = &rme9652_buffers[i]; 181 if (rbuf->flags == RME9652_BUF_ALLOCATED) { 182 rbuf->flags |= RME9652_BUF_USED; 154 void *snd_hammerfall_get_buffer (struct pci_dev *pcidev, dma_addr_t *dmaaddr) 155 { 156 int i; 157 hammerfall_buf_t *rbuf; 158 159 for (i = 0; i < NBUFS; i++) { 160 rbuf = &hammerfall_buffers[i]; 161 if (rbuf->flags == HAMMERFALL_BUF_ALLOCATED) { 162 rbuf->flags |= HAMMERFALL_BUF_USED; 163 rbuf->pci = pcidev; 183 164 MOD_INC_USE_COUNT; 184 165 *dmaaddr = rbuf->addr; … … 190 171 } 191 172 192 void snd_rme9652_free_buffer (int card, void *addr) 193 194 { 195 int i; 196 rme9652_buf_t *rbuf; 197 198 if (card < 0 || card >= RME9652_CARDS) { 199 printk(KERN_ERR "snd_rme9652_get_buffer: card %d is out of range", card); 200 return; 201 } 202 for (i = card * 2; i < card * 2 + 2; i++) { 203 rbuf = &rme9652_buffers[i]; 204 if (rbuf->buf == addr) { 173 void snd_hammerfall_free_buffer (struct pci_dev *pcidev, void *addr) 174 { 175 int i; 176 hammerfall_buf_t *rbuf; 177 178 for (i = 0; i < NBUFS; i++) { 179 rbuf = &hammerfall_buffers[i]; 180 if (rbuf->buf == addr && rbuf->pci == pcidev) { 205 181 MOD_DEC_USE_COUNT; 206 rbuf->flags &= ~ RME9652_BUF_USED;182 rbuf->flags &= ~HAMMERFALL_BUF_USED; 207 183 return; 208 184 } 209 185 } 210 186 211 printk (" RME9652 memory allocator: unknown buffer address passed to free buffer");212 } 213 214 static void __exit rme9652_free_buffers (void)215 216 { 217 int i; 218 rme9652_buf_t *rbuf;187 printk ("Hammerfall memory allocator: unknown buffer address or PCI device ID"); 188 } 189 190 static void __exit hammerfall_free_buffers (void) 191 192 { 193 int i; 194 hammerfall_buf_t *rbuf; 219 195 220 196 for (i = 0; i < NBUFS; i++) { … … 228 204 */ 229 205 230 rbuf = & rme9652_buffers[i];231 232 if (rbuf->flags == RME9652_BUF_ALLOCATED) {233 rme9652_free_pages (rbuf->pci, TOTAL_SIZE, rbuf->buf, rbuf->addr);206 rbuf = &hammerfall_buffers[i]; 207 208 if (rbuf->flags == HAMMERFALL_BUF_ALLOCATED) { 209 hammerfall_free_pages (rbuf->pci, TOTAL_SIZE, rbuf->buf, rbuf->addr); 234 210 rbuf->buf = NULL; 235 211 rbuf->flags = 0; … … 238 214 } 239 215 240 static int __init alsa_ rme9652_mem_init(void)216 static int __init alsa_hammerfall_mem_init(void) 241 217 { 242 218 int i; 243 219 struct pci_dev *pci; 244 rme9652_buf_t *rbuf;220 hammerfall_buf_t *rbuf; 245 221 246 222 /* make sure our buffer records are clean */ 247 223 248 224 for (i = 0; i < NBUFS; i++) { 249 rbuf = & rme9652_buffers[i];225 rbuf = &hammerfall_buffers[i]; 250 226 rbuf->pci = NULL; 251 227 rbuf->buf = NULL; … … 260 236 261 237 i = 0; /* card number */ 262 rbuf = rme9652_buffers;238 rbuf = hammerfall_buffers; 263 239 pci_for_each_dev(pci) { 264 240 int k; 265 if (pci->vendor != 0x10ee || pci->device != 0x3fc4) 241 242 /* check for Hammerfall and Hammerfall DSP cards */ 243 244 if (pci->vendor != 0x10ee || (pci->device != 0x3fc4 && pci->device != 0x3fc5)) 266 245 continue; 267 246 … … 270 249 271 250 for (k = 0; k < 2; ++k) { 272 rbuf->buf = rme9652_malloc_pages(pci, TOTAL_SIZE, &rbuf->addr);251 rbuf->buf = hammerfall_malloc_pages(pci, TOTAL_SIZE, &rbuf->addr); 273 252 if (rbuf->buf == NULL) { 274 rme9652_free_buffers();275 printk(KERN_ERR " RME9652memory allocator: no memory available for card %d buffer %d\n", i, k + 1);253 hammerfall_free_buffers(); 254 printk(KERN_ERR "Hammerfall memory allocator: no memory available for card %d buffer %d\n", i, k + 1); 276 255 return -ENOMEM; 277 256 } 278 rbuf->flags = RME9652_BUF_ALLOCATED;257 rbuf->flags = HAMMERFALL_BUF_ALLOCATED; 279 258 rbuf++; 280 259 } … … 283 262 284 263 if (i == 0) 285 printk(KERN_ERR "RME9652 memory allocator: no RME9652 card found...\n"); 286 264 printk(KERN_ERR "Hammerfall memory allocator: " 265 "no Hammerfall cards found...\n"); 266 else 267 printk(KERN_ERR "Hammerfall memory allocator: " 268 "buffers allocated for %d cards\n", i); 269 287 270 return 0; 288 271 } 289 272 290 static void __exit alsa_ rme9652_mem_exit(void)291 { 292 rme9652_free_buffers();293 } 294 295 module_init(alsa_ rme9652_mem_init)296 module_exit(alsa_ rme9652_mem_exit)297 298 EXPORT_SYMBOL(snd_ rme9652_get_buffer);299 EXPORT_SYMBOL(snd_ rme9652_free_buffer);273 static void __exit alsa_hammerfall_mem_exit(void) 274 { 275 hammerfall_free_buffers(); 276 } 277 278 module_init(alsa_hammerfall_mem_init) 279 module_exit(alsa_hammerfall_mem_exit) 280 281 EXPORT_SYMBOL(snd_hammerfall_get_buffer); 282 EXPORT_SYMBOL(snd_hammerfall_free_buffer); -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/makefile.os2
r32 r207 13 13 # 14 14 #=================================================================== 15 FILE1 = rme9652_mem.obj rme9652.obj15 FILE1 = hammerfall_mem.obj rme9652.obj hdsp.obj 16 16 FILE2 = 17 17 FILE3 = -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/rme9652.c
r112 r207 25 25 #include <linux/delay.h> 26 26 #include <linux/init.h> 27 #include <linux/pci.h> 27 28 #include <linux/slab.h> 28 29 #include <sound/core.h> … … 39 40 static int snd_precise_ptr[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; /* Enable precise pointer */ 40 41 41 EXPORT_NO_SYMBOLS;42 42 MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); 43 43 MODULE_PARM_DESC(snd_index, "Index value for RME Digi9652 (Hammerfall) soundcard."); … … 304 304 }; 305 305 306 #define RME9652_PREALLOCATE_MEMORY /* via module snd- rme9652_mem */306 #define RME9652_PREALLOCATE_MEMORY /* via module snd-hammerfall-mem */ 307 307 308 308 #ifdef RME9652_PREALLOCATE_MEMORY 309 extern void *snd_ rme9652_get_buffer(int card, dma_addr_t *dmaaddr);310 extern void snd_ rme9652_free_buffer(int card, void *ptr);309 extern void *snd_hammerfall_get_buffer(struct pci_dev *, dma_addr_t *dmaaddr); 310 extern void snd_hammerfall_free_buffer(struct pci_dev *, void *ptr); 311 311 #endif 312 312 … … 479 479 int reject_if_open = 0; 480 480 int xrate; 481 482 if (!snd_rme9652_use_is_exclusive (rme9652)) { 483 return -EBUSY; 484 } 481 485 482 486 /* Changing from a "single speed" to a "double speed" rate is … … 523 527 } 524 528 525 if (reject_if_open && 526 (rme9652->capture_pid >= 0 || rme9652->playback_pid >= 0)) { 529 if (reject_if_open && (rme9652->capture_pid >= 0 || rme9652->playback_pid >= 0)) { 527 530 spin_unlock_irq(&rme9652->lock); 528 531 return -EBUSY; … … 532 535 rme9652_stop(rme9652); 533 536 } 534 535 537 rme9652->control_register &= ~(RME9652_freq | RME9652_DS); 536 538 rme9652->control_register |= rate; … … 1938 1940 rme9652->capture_buffer_addr); 1939 1941 #else 1940 snd_ rme9652_free_buffer(rme9652->dev, rme9652->capture_buffer_unaligned);1942 snd_hammerfall_free_buffer(rme9652->pci, rme9652->capture_buffer_unaligned); 1941 1943 #endif 1942 1944 } … … 1949 1951 rme9652->playback_buffer_addr); 1950 1952 #else 1951 snd_ rme9652_free_buffer(rme9652->dev, rme9652->playback_buffer_unaligned);1953 snd_hammerfall_free_buffer(rme9652->pci, rme9652->playback_buffer_unaligned); 1952 1954 #endif 1953 1955 } … … 1982 1984 pb = snd_malloc_pci_pages(rme9652->pci, RME9652_DMA_AREA_BYTES, &pb_addr); 1983 1985 #else 1984 cb = snd_ rme9652_get_buffer(rme9652->dev, &cb_addr);1985 pb = snd_ rme9652_get_buffer(rme9652->dev, &pb_addr);1986 cb = snd_hammerfall_get_buffer(rme9652->pci, &cb_addr); 1987 pb = snd_hammerfall_get_buffer(rme9652->pci, &pb_addr); 1986 1988 #endif 1987 1989 … … 1989 1991 if (cb) { 1990 1992 #ifdef RME9652_PREALLOCATE_MEMORY 1991 snd_ rme9652_free_buffer(rme9652->dev, cb);1993 snd_hammerfall_free_buffer(rme9652->pci, cb); 1992 1994 #else 1993 1995 snd_free_pci_pages(rme9652->pci, RME9652_DMA_AREA_BYTES, cb, cb_addr); … … 1996 1998 if (pb) { 1997 1999 #ifdef RME9652_PREALLOCATE_MEMORY 1998 snd_ rme9652_free_buffer(rme9652->dev, pb);2000 snd_hammerfall_free_buffer(rme9652->pci, pb); 1999 2001 #else 2000 2002 snd_free_pci_pages(rme9652->pci, RME9652_DMA_AREA_BYTES, pb, pb_addr); … … 2128 2130 channel); 2129 2131 snd_assert(channel_buf != NULL, return -EIO); 2130 copy_from_user(channel_buf + pos * 4, src, count * 4); 2132 if (copy_from_user(channel_buf + pos * 4, src, count * 4)) 2133 return -EFAULT; 2131 2134 return count; 2132 2135 } … … 2143 2146 channel); 2144 2147 snd_assert(channel_buf != NULL, return -EIO); 2145 copy_to_user(dst, channel_buf + pos * 4, count * 4); 2148 if (copy_to_user(dst, channel_buf + pos * 4, count * 4)) 2149 return -EFAULT; 2146 2150 return count; 2147 2151 } … … 2342 2346 rme9652_silence_playback(rme9652); 2343 2347 } 2348 } else { 2349 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) 2350 rme9652_silence_playback(rme9652); 2344 2351 } 2345 2352 _ok: … … 2769 2776 rme9652->card = card; 2770 2777 2778 pci_read_config_word(rme9652->pci, PCI_CLASS_REVISION, &rev); 2779 2780 switch (rev & 0xff) { 2781 case 3: 2782 case 4: 2783 case 8: 2784 case 9: 2785 break; 2786 2787 default: 2788 /* who knows? */ 2789 return -ENODEV; 2790 } 2791 2771 2792 if ((err = pci_enable_device(pci)) < 0) 2772 2793 return err; … … 2780 2801 } 2781 2802 2782 if (request_irq(pci->irq, snd_rme9652_interrupt, SA_INTERRUPT|SA_SHIRQ, "rme9652", (void *)rme9652)) {2783 snd_printk("unable to grab IRQ %d\n", pci->irq);2784 return -EBUSY;2785 }2786 rme9652->irq = pci->irq;2787 2788 2803 rme9652->iobase = (unsigned long) ioremap_nocache(rme9652->port, RME9652_IO_EXTENT); 2789 2804 if (rme9652->iobase == 0) { … … 2792 2807 } 2793 2808 2809 if (request_irq(pci->irq, snd_rme9652_interrupt, SA_INTERRUPT|SA_SHIRQ, "rme9652", (void *)rme9652)) { 2810 snd_printk("unable to request IRQ %d\n", pci->irq); 2811 return -EBUSY; 2812 } 2813 rme9652->irq = pci->irq; 2794 2814 rme9652->precise_ptr = precise_ptr; 2795 2815 … … 2813 2833 */ 2814 2834 2815 pci_read_config_word(rme9652->pci, PCI_CLASS_REVISION, &rev); 2816 strcpy(card->driver, "RME9652"); 2817 switch (rev & 0xff) { 2835 switch (rev) { 2818 2836 case 8: /* original eprom */ 2819 2837 strcpy(card->driver, "RME9636"); … … 2831 2849 break; 2832 2850 case 4: /* W52_G EPROM */ 2851 strcpy(card->driver, "RME9652"); 2833 2852 rme9652->card_name = "RME Digi9652 (Rev G)"; 2834 2853 rme9652->ss_channels = RME9652_NCHANNELS; 2835 2854 break; 2836 default:2837 2855 case 3: /* original eprom */ 2856 strcpy(card->driver, "RME9652"); 2838 2857 if (rme9652->hw_rev == 15) { 2839 2858 rme9652->card_name = "RME Digi9652 (Rev 1.5)"; -
GPL/branches/alsa-resync1/alsa-kernel/pci/sonicvibes.c
r112 r207 27 27 #include <linux/delay.h> 28 28 #include <linux/init.h> 29 #include <linux/pci.h> 29 30 #include <linux/slab.h> 30 31 #include <sound/core.h> … … 39 40 #include <linux/gameport.h> 40 41 #endif 41 42 EXPORT_NO_SYMBOLS;43 42 44 43 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); -
GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident.c
r206 r207 24 24 #include <sound/driver.h> 25 25 #include <linux/init.h> 26 #include <linux/pci.h> 26 27 #include <linux/time.h> 27 28 #include <sound/core.h> -
GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident_main.c
r206 r207 33 33 #include <linux/delay.h> 34 34 #include <linux/init.h> 35 #include <linux/pci.h> 35 36 #include <linux/slab.h> 36 37 #include <linux/vmalloc.h> -
GPL/branches/alsa-resync1/alsa-kernel/pci/ymfpci/ymfpci.c
r92 r207 22 22 #include <sound/driver.h> 23 23 #include <linux/init.h> 24 #include <linux/pci.h> 24 25 #include <linux/time.h> 25 26 #include <sound/core.h> … … 29 30 #define SNDRV_GET_ID 30 31 #include <sound/initval.h> 31 32 EXPORT_NO_SYMBOLS;33 32 34 33 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); -
GPL/branches/alsa-resync1/alsa-kernel/pci/ymfpci/ymfpci_main.c
r106 r207 30 30 #include <linux/delay.h> 31 31 #include <linux/init.h> 32 #include <linux/pci.h> 32 33 #include <linux/slab.h> 33 34 #include <sound/core.h>
Note:
See TracChangeset
for help on using the changeset viewer.