Changeset 333 for GPL/branches/uniaud32-2.0/alsa-kernel
- Timestamp:
- Apr 1, 2008, 10:54:17 AM (17 years ago)
- Location:
- GPL/branches/uniaud32-2.0/alsa-kernel
- Files:
-
- 2 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-2.0/alsa-kernel/core/info_oss.c
r305 r333 93 93 { 94 94 snd_iprintf(buffer, "Sound Driver:3.8.1a-980706 (ALSA v" CONFIG_SND_VERSION " emulation code)\n"); 95 #ifndef TARGET_OS2 95 96 snd_iprintf(buffer, "Kernel: %s %s %s %s %s\n", 96 97 init_utsname()->sysname, … … 99 100 init_utsname()->version, 100 101 init_utsname()->machine); 102 #endif 101 103 snd_iprintf(buffer, "Config options: 0\n"); 102 104 snd_iprintf(buffer, "\nInstalled drivers: \n"); -
GPL/branches/uniaud32-2.0/alsa-kernel/core/makefile.os2
r313 r333 7 7 !include ..\..\makefile.inc 8 8 9 NMAKEOPTS=-f makefile.os2 $(LOGO) 10 11 !if "$(DEBUG)" == "1" 12 NMAKEOPTS += DEBUG=1 13 !endif 14 15 !if "$(KEE)" == "0" 16 NMAKEOPTS += KEE=0 17 KEE=0 18 !else 19 NMAKEOPTS += KEE=1 20 KEE=1 21 !endif 22 23 !if "$(DEBUG)" == "1" 24 !Message BUILDING DEBUG VERSION 25 !else 26 !Message BUILDING RELEASE VERSION 27 !endif 9 NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG) 28 10 29 11 #=================================================================== … … 34 16 FILE1 = sound.obj init.obj memory.obj memalloc.obj sgbuf.obj 35 17 FILE2 = control.obj device.obj misc.obj wrappers.obj 36 #FILE3 = sound_oss.obj info_oss.obj isadma.obj 18 FILE3 = sound_oss.obj info_oss.obj 37 19 FILE4 = pcm.obj pcm_native.obj pcm_lib.obj pcm_misc.obj pcm_timer.obj pcm_memory.obj 38 20 FILE5 = rawmidi.obj … … 70 52 @wmake $(NMAKEOPTS) 71 53 @cd .. 54 @echo BUILDING oss 55 @cd oss 56 @wmake $(NMAKEOPTS) 57 @cd .. 72 58 73 59 clean: .SYMBOLIC … … 76 62 @wmake $(NMAKEOPTS) clean 77 63 @cd .. 64 @echo CLEARING oss 65 @cd oss 66 @wmake $(NMAKEOPTS) clean 67 @cd .. 78 68 -@rm *.err 79 69 @cd $(OBJDIR) -
GPL/branches/uniaud32-2.0/alsa-kernel/core/oss/mixer_oss.c
r305 r333 36 36 MODULE_DESCRIPTION("Mixer OSS emulation for ALSA."); 37 37 MODULE_LICENSE("GPL"); 38 #ifndef TARGET_OS2 38 39 MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MIXER); 40 #endif 39 41 40 42 static int snd_mixer_oss_open(struct inode *inode, struct file *file) … … 44 46 int err; 45 47 48 #ifndef TARGET_OS2 46 49 card = snd_lookup_oss_minor_data(iminor(inode), 50 #else 51 card = snd_lookup_oss_minor_data(MINOR(inode->i_rdev), 52 #endif 47 53 SNDRV_OSS_DEVICE_TYPE_MIXER); 48 54 if (card == NULL) … … 385 391 #endif 386 392 393 #ifndef CONFIG_SND_HAVE_NEW_IOCTL 394 /* need to unlock BKL to allow preemption */ 395 static int snd_mixer_oss_ioctl_old(struct inode *inode, struct file * file, 396 unsigned int cmd, unsigned long arg) 397 { 398 int err; 399 err = snd_mixer_oss_ioctl(file, cmd, arg); 400 return err; 401 } 402 #endif 403 387 404 /* 388 405 * REGISTRATION PART … … 391 408 static const struct file_operations snd_mixer_oss_f_ops = 392 409 { 410 #ifndef TARGET_OS2 393 411 .owner = THIS_MODULE, 412 #endif 394 413 .open = snd_mixer_oss_open, 395 414 .release = snd_mixer_oss_release, 415 #ifdef CONFIG_SND_HAVE_NEW_IOCTL 396 416 .unlocked_ioctl = snd_mixer_oss_ioctl, 397 417 .compat_ioctl = snd_mixer_oss_ioctl_compat, 418 #else 419 .ioctl = snd_mixer_oss_ioctl_old, 420 #endif 398 421 }; 399 422 -
GPL/branches/uniaud32-2.0/alsa-kernel/core/oss/pcm_oss.c
r305 r333 45 45 46 46 static int dsp_map[SNDRV_CARDS]; 47 #ifndef TARGET_OS2 47 48 static int adsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1}; 49 #else 50 static int adsp_map[SNDRV_CARDS] = {1,1,1,1,1,1,1,1}; 51 #endif 48 52 static int nonblock_open = 1; 49 53 … … 57 61 module_param(nonblock_open, bool, 0644); 58 62 MODULE_PARM_DESC(nonblock_open, "Don't block opening busy PCM devices."); 63 #ifndef TARGET_OS2 59 64 MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_PCM); 60 65 MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_PCM1); 66 #endif 61 67 62 68 extern int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg); … … 466 472 } 467 473 474 #ifndef TARGET_OS2 468 475 static int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params, 476 #else 477 int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params, 478 #endif 469 479 snd_pcm_hw_param_t var, unsigned int val, 470 480 int dir) … … 1628 1638 } 1629 1639 } else if (runtime->access == SNDRV_PCM_ACCESS_RW_NONINTERLEAVED) { 1640 #ifndef TARGET_OS2 1630 1641 void __user *buffers[runtime->channels]; 1642 #else 1643 void __user *buffers[32]; 1644 #endif 1631 1645 memset(buffers, 0, runtime->channels * sizeof(void *)); 1632 1646 snd_pcm_lib_writev(substream, buffers, size); … … 2339 2353 wait_queue_t wait; 2340 2354 2355 #ifndef TARGET_OS2 2341 2356 pcm = snd_lookup_oss_minor_data(iminor(inode), 2357 #else 2358 pcm = snd_lookup_oss_minor_data(MINOR(inode->i_rdev), 2359 #endif 2342 2360 SNDRV_OSS_DEVICE_TYPE_PCM); 2343 2361 if (pcm == NULL) { … … 2373 2391 while (1) { 2374 2392 err = snd_pcm_oss_open_file(file, pcm, &pcm_oss_file, 2393 #ifndef TARGET_OS2 2375 2394 iminor(inode), setup); 2395 #else 2396 MINOR(inode->i_rdev), setup); 2397 #endif 2376 2398 if (err >= 0) 2377 2399 break; … … 2595 2617 #endif 2596 2618 2619 #ifndef CONFIG_SND_HAVE_NEW_IOCTL 2620 /* need to unlock BKL to allow preemption */ 2621 static int snd_pcm_oss_ioctl_old(struct inode *inode, struct file * file, 2622 unsigned int cmd, unsigned long arg) 2623 { 2624 int err; 2625 err = snd_pcm_oss_ioctl(file, cmd, arg); 2626 return err; 2627 } 2628 #endif 2629 2597 2630 static ssize_t snd_pcm_oss_read(struct file *file, char __user *buf, size_t count, loff_t *offset) 2598 2631 { … … 2922 2955 static const struct file_operations snd_pcm_oss_f_reg = 2923 2956 { 2957 #ifndef TARGET_OS2 2924 2958 .owner = THIS_MODULE, 2959 #endif 2925 2960 .read = snd_pcm_oss_read, 2926 2961 .write = snd_pcm_oss_write, … … 2928 2963 .release = snd_pcm_oss_release, 2929 2964 .poll = snd_pcm_oss_poll, 2965 #ifdef CONFIG_SND_HAVE_NEW_IOCTL 2930 2966 .unlocked_ioctl = snd_pcm_oss_ioctl, 2931 2967 .compat_ioctl = snd_pcm_oss_ioctl_compat, 2968 #else 2969 .ioctl = snd_pcm_oss_ioctl_old, 2970 #endif 2971 #ifndef TARGET_OS2 2932 2972 .mmap = snd_pcm_oss_mmap, 2973 #endif 2933 2974 }; 2934 2975 -
GPL/branches/uniaud32-2.0/alsa-kernel/core/oss/pcm_plugin.h
r305 r333 179 179 #define pdprintf( fmt, args... ) printk( "plugin: " fmt, ##args) 180 180 #else 181 #ifndef TARGET_OS2 181 182 #define pdprintf( fmt, args... ) 183 #else 184 #define pdprintf printk 185 #endif 182 186 #endif 183 187 -
GPL/branches/uniaud32-2.0/alsa-kernel/core/pcm_lib.c
r320 r333 1338 1338 EXPORT_SYMBOL(snd_pcm_hw_param_last); 1339 1339 1340 #ifdef TARGET_OS21341 int snd_interval_refine_set(struct snd_interval *i, unsigned int val)1342 {1343 struct snd_interval t;1344 t.empty = 0;1345 t.min = t.max = val;1346 t.openmin = t.openmax = 0;1347 t.integer = 1;1348 return snd_interval_refine(i, &t);1349 }1350 1351 int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params,1352 snd_pcm_hw_param_t var, unsigned int val,1353 int dir)1354 {1355 int changed;1356 if (hw_is_mask(var)) {1357 struct snd_mask *m = hw_param_mask(params, var);1358 if (val == 0 && dir < 0) {1359 changed = -EINVAL;1360 snd_mask_none(m);1361 } else {1362 if (dir > 0)1363 val++;1364 else if (dir < 0)1365 val--;1366 changed = snd_mask_refine_set(hw_param_mask(params, var), val);1367 }1368 } else if (hw_is_interval(var)) {1369 struct snd_interval *i = hw_param_interval(params, var);1370 if (val == 0 && dir < 0) {1371 changed = -EINVAL;1372 snd_interval_none(i);1373 } else if (dir == 0)1374 changed = snd_interval_refine_set(i, val);1375 else {1376 struct snd_interval t;1377 t.openmin = 1;1378 t.openmax = 1;1379 t.empty = 0;1380 t.integer = 0;1381 if (dir < 0) {1382 t.min = val - 1;1383 t.max = val;1384 } else {1385 t.min = val;1386 t.max = val+1;1387 }1388 changed = snd_interval_refine(i, &t);1389 }1390 } else1391 return -EINVAL;1392 if (changed) {1393 params->cmask |= 1 << var;1394 params->rmask |= 1 << var;1395 }1396 return changed;1397 }1398 1399 #endif1400 1340 /** 1401 1341 * snd_pcm_hw_param_choose -
GPL/branches/uniaud32-2.0/alsa-kernel/core/pcm_misc.c
r305 r333 445 445 break; 446 446 } 447 447 448 } 448 449 return 0; -
GPL/branches/uniaud32-2.0/alsa-kernel/core/rawmidi.c
r318 r333 42 42 #ifdef CONFIG_SND_OSSEMUL 43 43 static int midi_map[SNDRV_CARDS]; 44 #ifndef TARGET_OS2 44 45 static int amidi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1}; 46 #else 47 static int amidi_map[SNDRV_CARDS] = {1,1,1,1,1,1,1,1}; 48 #endif 45 49 module_param_array(midi_map, int, NULL, 0444); 46 50 MODULE_PARM_DESC(midi_map, "Raw MIDI device number assigned to 1st OSS device."); -
GPL/branches/uniaud32-2.0/alsa-kernel/core/seq/makefile.os2
r313 r333 7 7 !include ..\..\..\makefile.inc 8 8 9 NMAKEOPTS=-f makefile.os2 $(LOGO) 10 11 !if "$(DEBUG)" == "1" 12 NMAKEOPTS += DEBUG=1 13 !endif 14 15 !if "$(KEE)" == "0" 16 NMAKEOPTS += KEE=0 17 KEE=0 18 !else 19 NMAKEOPTS += KEE=1 20 KEE=1 21 !endif 22 23 !if "$(DEBUG)" == "1" 24 !Message BUILDING DEBUG VERSION 25 !else 26 !Message BUILDING RELEASE VERSION 27 !endif 9 NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG) 28 10 29 11 #=================================================================== … … 62 44 63 45 subdirs: .SYMBOLIC 64 # @echo BUILDING instr 65 # @cd instr 66 #@wmake $(NMAKEOPTS)67 #@cd ..46 @echo BUILDING oss 47 @cd oss 48 @wmake $(NMAKEOPTS) 49 @cd .. 68 50 69 51 clean: .SYMBOLIC 70 # @echo BUILDING instr 71 # @cd instr 72 #@wmake $(NMAKEOPTS) clean73 #@cd ..52 @echo BUILDING oss 53 @cd oss 54 @wmake $(NMAKEOPTS) clean 55 @cd .. 74 56 -@rm *.err 2>nul 75 57 @cd $(OBJDIR) -
GPL/branches/uniaud32-2.0/alsa-kernel/core/seq/oss/seq_oss.c
r305 r333 37 37 MODULE_LICENSE("GPL"); 38 38 /* Takashi says this is really only for sound-service-0-, but this is OK. */ 39 #ifndef TARGET_OS2 39 40 MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_SEQUENCER); 40 41 MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MUSIC); 42 #endif 41 43 42 44 #ifdef SNDRV_SEQ_OSS_DEBUG … … 194 196 #endif 195 197 198 #ifndef CONFIG_SND_HAVE_NEW_IOCTL 199 /* need to unlock BKL to allow preemption */ 200 static int odev_ioctl_old(struct inode *inode, struct file * file, 201 unsigned int cmd, unsigned long arg) 202 { 203 int err; 204 err = odev_ioctl(file, cmd, arg); 205 return err; 206 } 207 #endif 208 196 209 static unsigned int 197 210 odev_poll(struct file *file, poll_table * wait) … … 209 222 static const struct file_operations seq_oss_f_ops = 210 223 { 224 #ifndef TARGET_OS2 211 225 .owner = THIS_MODULE, 226 #endif 212 227 .read = odev_read, 213 228 .write = odev_write, … … 215 230 .release = odev_release, 216 231 .poll = odev_poll, 232 #ifdef CONFIG_SND_HAVE_NEW_IOCTL 217 233 .unlocked_ioctl = odev_ioctl, 218 234 .compat_ioctl = odev_ioctl_compat, 235 #else 236 .ioctl = odev_ioctl_old, 237 #endif 219 238 }; 220 239 -
GPL/branches/uniaud32-2.0/alsa-kernel/core/seq/oss/seq_oss_init.c
r305 r333 21 21 */ 22 22 23 #ifdef TARGET_OS2 24 #include <sound/initval.h> 25 #endif 23 26 #include "seq_oss_device.h" 24 27 #include "seq_oss_synth.h" -
GPL/branches/uniaud32-2.0/alsa-kernel/core/seq/oss/seq_oss_midi.c
r305 r333 57 57 static struct seq_oss_midi *midi_devs[SNDRV_SEQ_OSS_MAX_MIDI_DEVS]; 58 58 59 #ifndef TARGET_OS2 59 60 static DEFINE_SPINLOCK(register_lock); 61 #else 62 spinlock_t register_lock = SPIN_LOCK_UNLOCKED; 63 #endif 64 60 65 61 66 /* -
GPL/branches/uniaud32-2.0/alsa-kernel/core/seq/oss/seq_oss_synth.c
r305 r333 76 76 }; 77 77 78 #ifndef TARGET_OS2 78 79 static DEFINE_SPINLOCK(register_lock); 80 #else 81 spinlock_t register_lock = SPIN_LOCK_UNLOCKED; 82 #endif 79 83 80 84 /* -
GPL/branches/uniaud32-2.0/alsa-kernel/core/sound_oss.c
r305 r333 19 19 * 20 20 */ 21 #ifdef TARGET_OS2 22 #include <sound/config.h> 23 #endif 21 24 22 25 #ifdef CONFIG_SND_OSSEMUL 23 24 26 #if !defined(CONFIG_SOUND) && !(defined(MODULE) && defined(CONFIG_SOUND_MODULE)) 25 27 #error "Enable the OSS soundcore multiplexer (CONFIG_SOUND) in the kernel." … … 133 135 break; 134 136 } 137 #ifndef TARGET_OS2 135 138 register1 = register_sound_special_device(f_ops, minor, carddev); 136 139 if (register1 != minor) … … 143 146 snd_oss_minors[track2] = preg; 144 147 } 148 #endif 145 149 mutex_unlock(&sound_oss_mutex); 146 150 return 0; -
GPL/branches/uniaud32-2.0/alsa-kernel/drivers/makefile.os2
r313 r333 7 7 !include ..\..\makefile.inc 8 8 9 NMAKEOPTS=-f makefile.os2 $(LOGO) 10 11 !if "$(DEBUG)" == "1" 12 NMAKEOPTS += DEBUG=1 13 !endif 14 15 !if "$(KEE)" == "0" 16 NMAKEOPTS += KEE=0 17 KEE=0 18 !else 19 NMAKEOPTS += KEE=1 20 KEE=1 21 !endif 22 23 !if "$(DEBUG)" == "1" 24 !Message BUILDING DEBUG VERSION 25 !else 26 !Message BUILDING RELEASE VERSION 27 !endif 9 NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG) 28 10 29 11 #=================================================================== -
GPL/branches/uniaud32-2.0/alsa-kernel/include/sound/config.h
r315 r333 280 280 #define CONFIG_HAS_DMA 281 281 #define CONFIG_SND_SEQUENCER 282 //#define CONFIG_SND_OSSEMUL 282 #define CONFIG_SND_OSSEMUL 283 #define CONFIG_SND_PCM_OSS 284 #define CONFIG_SND_MIXER_OSS 283 285 #define SNDRV_LITTLE_ENDIAN 284 286 #define EXPORT_SYMBOL(a) -
GPL/branches/uniaud32-2.0/alsa-kernel/include/sound/pcm.h
r319 r333 658 658 { 659 659 snd_pcm_sframes_t avail = runtime->status->hw_ptr + runtime->buffer_size - runtime->control->appl_ptr; 660 #if defined TARGET_OS2 661 if ( runtime->buffer_size > runtime->control->appl_ptr) 662 avail = runtime->status->hw_ptr + runtime->buffer_size - runtime->control->appl_ptr; 663 else 664 { 665 666 avail = runtime->control->appl_ptr - runtime->status->hw_ptr; 667 if ( avail > runtime->buffer_size ) 668 avail = 0; 669 else 670 avail = runtime->buffer_size - avail; 671 } 672 #endif /* TARGET_OS2 */ 660 673 if (avail < 0) 661 674 avail += runtime->boundary; -
GPL/branches/uniaud32-2.0/alsa-kernel/isa/makefile.os2
r313 r333 7 7 !include ..\..\makefile.inc 8 8 9 NMAKEOPTS=-f makefile.os2 $(LOGO) 10 11 !if "$(DEBUG)" == "1" 12 NMAKEOPTS += DEBUG=1 13 !endif 14 15 !if "$(KEE)" == "0" 16 NMAKEOPTS += KEE=0 17 KEE=0 18 !else 19 NMAKEOPTS += KEE=1 20 KEE=1 21 !endif 22 23 !if "$(DEBUG)" == "1" 24 !Message BUILDING DEBUG VERSION 25 !else 26 !Message BUILDING RELEASE VERSION 27 !endif 9 NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG) 28 10 29 11 #=================================================================== -
GPL/branches/uniaud32-2.0/alsa-kernel/makefile.os2
r312 r333 1 1 LOGO=-h 2 2 3 NMAKEOPTS=-f makefile.os2 $(LOGO) 4 5 !if "$(DEBUG)" == "1" 6 NMAKEOPTS += DEBUG=1 7 !endif 8 9 !if "$(KEE)" == "0" 10 NMAKEOPTS += KEE=0 11 KEE=0 12 !else 13 NMAKEOPTS += KEE=1 14 KEE=1 15 !endif 16 17 18 !if "$(DEBUG)" == "1" 19 !Message BUILDING DEBUG VERSION 20 !else 21 !Message BUILDING RELEASE VERSION 22 !endif 23 3 NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG) 24 4 25 5 #=================================================================== -
GPL/branches/uniaud32-2.0/alsa-kernel/pci/makefile.os2
r319 r333 7 7 !include ..\..\makefile.inc 8 8 9 NMAKEOPTS=-f makefile.os2 $(LOGO) 10 11 !if "$(DEBUG)" == "1" 12 NMAKEOPTS += DEBUG=1 13 !endif 14 15 !if "$(KEE)" == "0" 16 NMAKEOPTS += KEE=0 17 KEE=0 18 !else 19 NMAKEOPTS += KEE=1 20 KEE=1 21 !endif 22 23 !if "$(DEBUG)" == "1" 24 !Message BUILDING DEBUG VERSION 25 !else 26 !Message BUILDING RELEASE VERSION 27 !endif 9 NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG) 28 10 29 11 #=================================================================== … … 90 72 @wmake $(NMAKEOPTS) 91 73 @cd .. 92 ## @echo BUILDING korg121293 ## @cd korg121294 ## @wmake $(NMAKEOPTS)95 ## @cd ..96 74 @echo BUILDING nm256 97 75 @cd nm256 -
GPL/branches/uniaud32-2.0/alsa-kernel/synth/makefile.os2
r313 r333 7 7 !include ..\..\makefile.inc 8 8 9 NMAKEOPTS=-f makefile.os2 $(LOGO) 10 11 !if "$(DEBUG)" == "1" 12 NMAKEOPTS += DEBUG=1 13 !endif 14 15 !if "$(KEE)" == "0" 16 NMAKEOPTS += KEE=0 17 KEE=0 18 !else 19 NMAKEOPTS += KEE=1 20 KEE=1 21 !endif 22 23 !if "$(DEBUG)" == "1" 24 !Message BUILDING DEBUG VERSION 25 !else 26 !Message BUILDING RELEASE VERSION 27 !endif 28 9 NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG) 29 10 30 11 #===================================================================
Note:
See TracChangeset
for help on using the changeset viewer.