Changeset 333

Show
Ignore:
Timestamp:
04/01/08 10:54:17 (8 months ago)
Author:
psmedley
Message:

Add ACPI support, make OSS compatability stuff build

Location:
GPL/branches/uniaud32-2.0
Files:
2 added
28 modified

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-2.0/Configure.cmd

    r313 r333  
    4444        call lineout sIncFile, 'ALSA_LIB_      =' sAlsaBase'\lib'; 
    4545        call lineout sIncFile, 'ALSA_BIN_      =' sAlsaBase'\bin'; 
    46         call lineout sIncFile, '!ifdef 32BIT' 
    4746        call lineout sIncFile, 'ALSA_INCLUDE   =' sAlsaBase'\include'; 
    4847        call lineout sIncFile, 'ALSA_TOOLS     =' sAlsaBase'\tools'; 
    49         call lineout sIncFile, '!else' 
    50         call lineout sIncFile, 'ALSA_INCLUDE   =' sAlsaBase'\OCO\include'; 
    51         call lineout sIncFile, 'ALSA_TOOLS     =' sAlsaBase'\OCO\tools'; 
    52         call lineout sIncFile, '!endif' 
    5348        call lineout sIncFile, '' 
    5449        say 'Enter DDK base directory (e.g. c:\ddk\base)'; 
     
    6055        call lineout sIncFile, 'WATCOM         =' sWatcomPath; 
    6156 
     57        say 'Enter directory location for AcpiDrv.lib (e.g. C:\ACPI)';  
     58        say 'Or leave blank if not present.'  
     59        sAcpiLibPath = linein();  
     60        call lineout sIncFile, 'ACPI_LIB       =' sAcpiLibPath;  
     61 
    6262        call lineout sIncFile, '################################################################################' 
    6363        call lineout sIncFile, '# Include the right watcom makefile' 
    6464        call lineout sIncFile, '################################################################################' 
    65         call lineout sIncFile, '!ifdef 32BIT' 
    6665        call lineout sIncFile, '!include 'sAlsaBase'\include\watcom32.mk' 
    6766        call lineout sIncFile, '!include 'sAlsaBase'\include\watcom32.mak' 
    68         call lineout sIncFile, '!else' 
    69         call lineout sIncFile, '!include 'sAlsaBase'\OCO\include\watcom16.mk' 
    70         call lineout sIncFile, '!include 'sAlsaBase'\OCO\include\watcom16.mak' 
    71         call lineout sIncFile, '!endif' 
    7267        call lineout sIncFile, '' 
    7368 
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/info_oss.c

    r305 r333  
    9393{ 
    9494        snd_iprintf(buffer, "Sound Driver:3.8.1a-980706 (ALSA v" CONFIG_SND_VERSION " emulation code)\n"); 
     95#ifndef TARGET_OS2 
    9596        snd_iprintf(buffer, "Kernel: %s %s %s %s %s\n", 
    9697                    init_utsname()->sysname, 
     
    99100                    init_utsname()->version, 
    100101                    init_utsname()->machine); 
     102#endif 
    101103        snd_iprintf(buffer, "Config options: 0\n"); 
    102104        snd_iprintf(buffer, "\nInstalled drivers: \n"); 
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/makefile.os2

    r313 r333  
    77!include ..\..\makefile.inc 
    88 
    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 
     9NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG)  
    2810 
    2911#=================================================================== 
     
    3416FILE1    = sound.obj init.obj memory.obj memalloc.obj sgbuf.obj 
    3517FILE2    = control.obj device.obj misc.obj wrappers.obj  
    36 #FILE3    = sound_oss.obj info_oss.obj isadma.obj 
     18FILE3    = sound_oss.obj info_oss.obj  
    3719FILE4    = pcm.obj pcm_native.obj pcm_lib.obj pcm_misc.obj pcm_timer.obj pcm_memory.obj 
    3820FILE5    = rawmidi.obj 
     
    7052    @wmake $(NMAKEOPTS) 
    7153    @cd .. 
     54    @echo BUILDING oss 
     55    @cd oss 
     56    @wmake $(NMAKEOPTS) 
     57    @cd .. 
    7258 
    7359clean: .SYMBOLIC 
     
    7662    @wmake $(NMAKEOPTS) clean 
    7763    @cd .. 
     64    @echo CLEARING oss 
     65    @cd oss 
     66    @wmake $(NMAKEOPTS) clean 
     67    @cd .. 
    7868    -@rm *.err 
    7969    @cd $(OBJDIR) 
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/oss/mixer_oss.c

    r305 r333  
    3636MODULE_DESCRIPTION("Mixer OSS emulation for ALSA."); 
    3737MODULE_LICENSE("GPL"); 
     38#ifndef TARGET_OS2 
    3839MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MIXER); 
     40#endif 
    3941 
    4042static int snd_mixer_oss_open(struct inode *inode, struct file *file) 
     
    4446        int err; 
    4547 
     48#ifndef TARGET_OS2 
    4649        card = snd_lookup_oss_minor_data(iminor(inode), 
     50#else 
     51        card = snd_lookup_oss_minor_data(MINOR(inode->i_rdev), 
     52#endif 
    4753                                         SNDRV_OSS_DEVICE_TYPE_MIXER); 
    4854        if (card == NULL) 
     
    385391#endif 
    386392 
     393#ifndef CONFIG_SND_HAVE_NEW_IOCTL 
     394/* need to unlock BKL to allow preemption */ 
     395static 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 
    387404/* 
    388405 *  REGISTRATION PART 
     
    391408static const struct file_operations snd_mixer_oss_f_ops = 
    392409{ 
     410#ifndef TARGET_OS2 
    393411        .owner =        THIS_MODULE, 
     412#endif 
    394413        .open =         snd_mixer_oss_open, 
    395414        .release =      snd_mixer_oss_release, 
     415#ifdef CONFIG_SND_HAVE_NEW_IOCTL 
    396416        .unlocked_ioctl =       snd_mixer_oss_ioctl, 
    397417        .compat_ioctl = snd_mixer_oss_ioctl_compat, 
     418#else 
     419        .ioctl =        snd_mixer_oss_ioctl_old, 
     420#endif   
    398421}; 
    399422 
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/oss/pcm_oss.c

    r305 r333  
    4545 
    4646static int dsp_map[SNDRV_CARDS]; 
     47#ifndef TARGET_OS2 
    4748static int adsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1}; 
     49#else 
     50static int adsp_map[SNDRV_CARDS] = {1,1,1,1,1,1,1,1}; 
     51#endif 
    4852static int nonblock_open = 1; 
    4953 
     
    5761module_param(nonblock_open, bool, 0644); 
    5862MODULE_PARM_DESC(nonblock_open, "Don't block opening busy PCM devices."); 
     63#ifndef TARGET_OS2 
    5964MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_PCM); 
    6065MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_PCM1); 
     66#endif 
    6167 
    6268extern int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg); 
     
    466472} 
    467473 
     474#ifndef TARGET_OS2 
    468475static int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params, 
     476#else 
     477int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params, 
     478#endif 
    469479                                 snd_pcm_hw_param_t var, unsigned int val, 
    470480                                 int dir) 
     
    16281638                                } 
    16291639                        } else if (runtime->access == SNDRV_PCM_ACCESS_RW_NONINTERLEAVED) { 
     1640#ifndef TARGET_OS2 
    16301641                                void __user *buffers[runtime->channels]; 
     1642#else 
     1643                                void __user *buffers[32]; 
     1644#endif 
    16311645                                memset(buffers, 0, runtime->channels * sizeof(void *)); 
    16321646                                snd_pcm_lib_writev(substream, buffers, size); 
     
    23392353        wait_queue_t wait; 
    23402354 
     2355#ifndef TARGET_OS2 
    23412356        pcm = snd_lookup_oss_minor_data(iminor(inode), 
     2357#else 
     2358        pcm = snd_lookup_oss_minor_data(MINOR(inode->i_rdev), 
     2359#endif 
    23422360                                        SNDRV_OSS_DEVICE_TYPE_PCM); 
    23432361        if (pcm == NULL) { 
     
    23732391        while (1) { 
    23742392                err = snd_pcm_oss_open_file(file, pcm, &pcm_oss_file, 
     2393#ifndef TARGET_OS2 
    23752394                                            iminor(inode), setup); 
     2395#else 
     2396                                            MINOR(inode->i_rdev), setup); 
     2397#endif 
    23762398                if (err >= 0) 
    23772399                        break; 
     
    25952617#endif 
    25962618 
     2619#ifndef CONFIG_SND_HAVE_NEW_IOCTL 
     2620/* need to unlock BKL to allow preemption */ 
     2621static 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 
    25972630static ssize_t snd_pcm_oss_read(struct file *file, char __user *buf, size_t count, loff_t *offset) 
    25982631{ 
     
    29222955static const struct file_operations snd_pcm_oss_f_reg = 
    29232956{ 
     2957#ifndef TARGET_OS2 
    29242958        .owner =        THIS_MODULE, 
     2959#endif 
    29252960        .read =         snd_pcm_oss_read, 
    29262961        .write =        snd_pcm_oss_write, 
     
    29282963        .release =      snd_pcm_oss_release, 
    29292964        .poll =         snd_pcm_oss_poll, 
     2965#ifdef CONFIG_SND_HAVE_NEW_IOCTL 
    29302966        .unlocked_ioctl =       snd_pcm_oss_ioctl, 
    29312967        .compat_ioctl = snd_pcm_oss_ioctl_compat, 
     2968#else 
     2969        .ioctl =        snd_pcm_oss_ioctl_old, 
     2970#endif 
     2971#ifndef TARGET_OS2 
    29322972        .mmap =         snd_pcm_oss_mmap, 
     2973#endif 
    29332974}; 
    29342975 
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/oss/pcm_plugin.h

    r305 r333  
    179179#define pdprintf( fmt, args... ) printk( "plugin: " fmt, ##args) 
    180180#else 
     181#ifndef TARGET_OS2 
    181182#define pdprintf( fmt, args... )  
     183#else 
     184#define pdprintf printk 
     185#endif 
    182186#endif 
    183187 
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/pcm_lib.c

    r320 r333  
    13381338EXPORT_SYMBOL(snd_pcm_hw_param_last); 
    13391339 
    1340 #ifdef TARGET_OS2 
    1341 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         } else 
    1391                 return -EINVAL; 
    1392         if (changed) { 
    1393                 params->cmask |= 1 << var; 
    1394                 params->rmask |= 1 << var; 
    1395         } 
    1396         return changed; 
    1397 } 
    1398  
    1399 #endif 
    14001340/** 
    14011341 * snd_pcm_hw_param_choose 
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/pcm_misc.c

    r305 r333  
    445445                        break; 
    446446                } 
     447 
    447448        } 
    448449        return 0; 
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/rawmidi.c

    r318 r333  
    4242#ifdef CONFIG_SND_OSSEMUL 
    4343static int midi_map[SNDRV_CARDS]; 
     44#ifndef TARGET_OS2 
    4445static int amidi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1}; 
     46#else 
     47static int amidi_map[SNDRV_CARDS] = {1,1,1,1,1,1,1,1}; 
     48#endif 
    4549module_param_array(midi_map, int, NULL, 0444); 
    4650MODULE_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  
    77!include ..\..\..\makefile.inc 
    88 
    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 
     9NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG)  
    2810 
    2911#=================================================================== 
     
    6244 
    6345subdirs: .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 .. 
    6850 
    6951clean: .SYMBOLIC 
    70 #    @echo BUILDING instr 
    71 #    @cd instr 
    72 #    @wmake $(NMAKEOPTS) clean 
    73 #    @cd .. 
     52    @echo BUILDING oss 
     53    @cd oss 
     54    @wmake $(NMAKEOPTS) clean 
     55    @cd .. 
    7456    -@rm *.err 2>nul 
    7557    @cd $(OBJDIR) 
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/seq/oss/seq_oss.c

    r305 r333  
    3737MODULE_LICENSE("GPL"); 
    3838/* Takashi says this is really only for sound-service-0-, but this is OK. */ 
     39#ifndef TARGET_OS2 
    3940MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_SEQUENCER); 
    4041MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MUSIC); 
     42#endif 
    4143 
    4244#ifdef SNDRV_SEQ_OSS_DEBUG 
     
    194196#endif 
    195197 
     198#ifndef CONFIG_SND_HAVE_NEW_IOCTL 
     199/* need to unlock BKL to allow preemption */ 
     200static 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 
    196209static unsigned int 
    197210odev_poll(struct file *file, poll_table * wait) 
     
    209222static const struct file_operations seq_oss_f_ops = 
    210223{ 
     224#ifndef TARGET_OS2 
    211225        .owner =        THIS_MODULE, 
     226#endif 
    212227        .read =         odev_read, 
    213228        .write =        odev_write, 
     
    215230        .release =      odev_release, 
    216231        .poll =         odev_poll, 
     232#ifdef CONFIG_SND_HAVE_NEW_IOCTL 
    217233        .unlocked_ioctl =       odev_ioctl, 
    218234        .compat_ioctl = odev_ioctl_compat, 
     235#else 
     236        .ioctl =        odev_ioctl_old, 
     237#endif 
    219238}; 
    220239 
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/seq/oss/seq_oss_init.c

    r305 r333  
    2121 */ 
    2222 
     23#ifdef TARGET_OS2 
     24#include <sound/initval.h> 
     25#endif 
    2326#include "seq_oss_device.h" 
    2427#include "seq_oss_synth.h" 
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/seq/oss/seq_oss_midi.c

    r305 r333  
    5757static struct seq_oss_midi *midi_devs[SNDRV_SEQ_OSS_MAX_MIDI_DEVS]; 
    5858 
     59#ifndef TARGET_OS2 
    5960static DEFINE_SPINLOCK(register_lock); 
     61#else 
     62spinlock_t register_lock = SPIN_LOCK_UNLOCKED; 
     63#endif 
     64 
    6065 
    6166/* 
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/seq/oss/seq_oss_synth.c

    r305 r333  
    7676}; 
    7777 
     78#ifndef TARGET_OS2 
    7879static DEFINE_SPINLOCK(register_lock); 
     80#else 
     81spinlock_t register_lock = SPIN_LOCK_UNLOCKED; 
     82#endif 
    7983 
    8084/* 
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/sound_oss.c

    r305 r333  
    1919 * 
    2020 */ 
     21#ifdef TARGET_OS2 
     22#include <sound/config.h> 
     23#endif 
    2124 
    2225#ifdef CONFIG_SND_OSSEMUL 
    23  
    2426#if !defined(CONFIG_SOUND) && !(defined(MODULE) && defined(CONFIG_SOUND_MODULE)) 
    2527#error "Enable the OSS soundcore multiplexer (CONFIG_SOUND) in the kernel." 
     
    133135                break; 
    134136        } 
     137#ifndef TARGET_OS2 
    135138        register1 = register_sound_special_device(f_ops, minor, carddev); 
    136139        if (register1 != minor) 
     
    143146                snd_oss_minors[track2] = preg; 
    144147        } 
     148#endif 
    145149        mutex_unlock(&sound_oss_mutex); 
    146150        return 0; 
  • GPL/branches/uniaud32-2.0/alsa-kernel/drivers/makefile.os2

    r313 r333  
    77!include ..\..\makefile.inc 
    88 
    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 
     9NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG)  
    2810 
    2911#=================================================================== 
  • GPL/branches/uniaud32-2.0/alsa-kernel/include/sound/config.h

    r315 r333  
    280280#define CONFIG_HAS_DMA 
    281281#define CONFIG_SND_SEQUENCER 
    282 //#define CONFIG_SND_OSSEMUL 
     282#define CONFIG_SND_OSSEMUL 
     283#define CONFIG_SND_PCM_OSS 
     284#define CONFIG_SND_MI