Changeset 328

Show
Ignore:
Timestamp:
03/30/08 08:59:18 (8 months ago)
Author:
gentux2
Message:

Added option for ACPI support provided by Pavel, requires AcpiDrv?.lib

Location:
GPL/trunk
Files:
13 modified

Legend:

Unmodified
Added
Removed
  • GPL/trunk/Configure.cmd

    r327 r328  
    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/trunk/alsa-kernel/core/makefile.os2

    r327 r328  
    77!include ..\..\makefile.inc 
    88 
    9 NMAKEOPTS=-f makefile.os2 $(LOGO) 
     9NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG) 
    1010 
    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 
    2811 
    2912#=================================================================== 
  • GPL/trunk/alsa-kernel/core/seq/makefile.os2

    r327 r328  
    77!include ..\..\..\makefile.inc 
    88 
    9 NMAKEOPTS=-f makefile.os2 $(LOGO) 
     9NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG) 
    1010 
    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 
    2811 
    2912#=================================================================== 
  • GPL/trunk/alsa-kernel/drivers/makefile.os2

    r327 r328  
    77!include ..\..\makefile.inc 
    88 
    9 NMAKEOPTS=-f makefile.os2 $(LOGO) 
     9NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG) 
    1010 
    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 
    2811 
    2912#=================================================================== 
  • GPL/trunk/alsa-kernel/include/sound/pcm.h

    r61 r328  
    654654{ 
    655655        snd_pcm_sframes_t avail = runtime->status->hw_ptr + runtime->buffer_size - runtime->control->appl_ptr; 
     656 
     657#if defined TARGET_OS2 && ACPI 
     658       if ( runtime->buffer_size > runtime->control->appl_ptr) 
     659          avail = runtime->status->hw_ptr + runtime->buffer_size - runtime->control->appl_ptr; 
     660       else 
     661       { 
     662 
     663          avail = runtime->control->appl_ptr - runtime->status->hw_ptr; 
     664          if ( avail > runtime->buffer_size ) 
     665             avail = 0; 
     666          else 
     667             avail = runtime->buffer_size - avail; 
     668       } 
     669#endif /* TARGET_OS2 && ACPI */ 
    656670        if (avail < 0) 
    657671                avail += runtime->boundary; 
  • GPL/trunk/alsa-kernel/isa/makefile.os2

    r327 r328  
    77!include ..\..\makefile.inc 
    88 
    9 NMAKEOPTS=-f makefile.os2 $(LOGO) 
     9NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG) 
    1010 
    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 
    2811 
    2912#=================================================================== 
  • GPL/trunk/alsa-kernel/makefile.os2

    r111 r328  
    11LOGO=-h 
    22 
    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 
     3NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG) 
    234 
    245 
  • GPL/trunk/alsa-kernel/pci/makefile.os2

    r327 r328  
    77!include ..\..\makefile.inc 
    88 
    9 NMAKEOPTS=-f makefile.os2 $(LOGO) 
     9NMAKEOPTS=-f makefile.os2 $(LOGO) ACPI=$(ACPI) KEE=$(KEE) DEBUG=$(DEBUG) 
    1010 
    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 
    2811 
    2912#=================================================================== 
  • GPL/trunk/alsa-kernel/synth/makefile.os2

    r327 r328  
    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/trunk/drv32/makefile.os2

    r327 r328  
    1 # $Id: makefile.os2,v 1.3 2003/07/21 18:35:39 vladest Exp $ 
    21# 
    32# Makefile for the 32bit UNIAUD driver 
     
    8887    @%write $^@ option alignment=16 
    8988    @%write $^@ option map=$(WMAPNAME) 
    90 !if "$(KEE)" == "1" 
     89!if "$(ACPI) == "1" 
     90    @%write $^@ option description '$(%BUILDLEVEL) (ACPI)' 
     91!else if "$(KEE)" == "1" 
    9192    @%write $^@ option description '$(%BUILDLEVEL) (KEE)' 
    9293!else 
     
    9697    @for %f in ($(FILES)) do @%append $^@ file $(OBJDIR)\%f 
    9798    @for %f in ($(LIBS)) do @%append $^@ library %f 
     99!if "$(ACPI) == "1" 
     100    @%write $^@ library $(ACPI_LIB)\AcpiDrv.lib 
     101!endif 
    98102    @%write $^@ library $(%WATCOM)\lib386\os2\clib3r.lib 
    99103    @%write $^@ library $(%WATCOM)\lib386\os2\os2386.lib 
     
    104108    @for %f in ($(FILES)) do @%append $^@ $(OBJDIR)\%f 
    105109    @for %f in ($(LIBS)) do @%append $^@ %f 
     110!if "$(ACPI)" == "1" 
     111    @%write $^@ $(ACPI_LIB)\AcpiDrv.lib 
     112!endif 
    106113    @%write $^@ $(%WATCOM)\lib386\os2\clib3r.lib 
    107114    @%write $^@ $(%WATCOM)\lib386\os2\os2386.lib 
     
    110117 
    111118$(OBJDIR)\$(TARGET).sys: $(LNKFILE) $(FILES) $(LIBS) 
    112 !if "$(KEE)" == "1" 
     119!if "$(ACPI)" == "1" 
     120     @%write $(DEFFILE) description '$(%BUILDLEVEL) (ACPI)' 
     121!else if "$(KEE)" == "1" 
    113122     @%write $(DEFFILE) description '$(%BUILDLEVEL) (KEE)' 
    114123!else 
     
    119128 
    120129     copy $(OBJDIR)\$(TARGET).sys $(ALSA_BIN) 
    121 !if "$(KEE)" == "1" 
    122 #     copy $(OBJDIR)\$(TARGET).sys $(ALSA_BIN)\$(TARGET)kee.sys 
    123           
     130!if "$(ACPI)" == "1" 
     131      copy $(OBJDIR)\$(TARGET).sys $(ALSA_BIN_)\$(TARGET)acpi.sys 
     132!else if "$(KEE)" == "1" 
    124133      copy $(OBJDIR)\$(TARGET).sys $(ALSA_BIN_)\$(TARGET)kee.sys 
    125134!else 
    126 #     copy $(OBJDIR)\$(TARGET).sys $(ALSA_BIN)\$(TARGET)w4.sys 
    127135     copy $(OBJDIR)\$(TARGET).sys $(ALSA_BIN_)\$(TARGET)w4.sys 
    128136!endif 
  • GPL/trunk/include/watcom32.mk

    r32 r328  
    66DIREXT = W4 
    77KEE    = 0 
     8!else if "$(ACPI)" == "1" 
     9DIREXT = ACP 
     10ACPI   = 1 
     11KEE    = 1 
    812!else 
    913DIREXT = KEE 
  • GPL/trunk/lib32/pci.c

    r289 r328  
    5454#define PCI_CONFIG_DATA         0xCFC 
    5555 
     56#ifdef ACPI 
     57APIRET APIENTRY ACPIFindPCIDevice(ULONG Bus, ULONG Dev, ULONG Fun, ULONG *PicIRQ, ULONG *ApicIRQ, ULONG *Hdl, char *Component); 
     58#endif 
    5659 
    5760//****************************************************************************** 
     
    134137                            struct pci_dev near *pcidev, int idx) 
    135138{ 
     139#ifdef ACPI 
     140    APIRET           rc; 
     141#endif 
    136142    int         resNo, addr, found = 0; 
    137143    u32         devNr, busNr, funcNr, detectedId, pciId, cfgaddrreg, temp, temp2; 
     144#ifdef ACPI 
     145    ULONG            temp1,temp3; //PS++ 
     146#endif 
    138147    u8          headerType; 
    139148 
     
    220229                        // IRQ and PIN 
    221230                        pci_read_config_dword(pcidev, PCI_INTERRUPT_LINE, &temp); 
     231#ifdef ACPI 
     232                        temp2 = temp3 = 0; 
     233                        rc = ACPIFindPCIDevice( (ULONG)busNr,                        // Bus 
     234                                                (ULONG)devNr,                        // Dev 
     235                                                (ULONG)(pcidev->devfn >> 8) & 7,     // Function 
     236                                                &temp1,                              // PIC IRQ 
     237                                                &temp3,                              // APIC IRQ 
     238                                                NULL,                                // ACPI handle to finding device 
     239                                                "Uniaud32");                         // Name for acpi log 
     240                        if (!rc) 
     241                        { 
     242                        // Check APIC IRQ, if we have /SMP /APIC, must be set 
     243                        if (temp3) 
     244                           temp = (temp & (~0xff)) | (temp3 & 0xff); 
     245                        // Check PIC IRQ 
     246                        else if (temp1) 
     247                                 temp = (temp & (~0xff)) | (temp1 & 0xff); 
     248                        dprintf(("pci_query_device: IRQs ACPI PIC%d APIC%d", temp1, temp3)); 
     249                        } 
     250#endif /* ACPI */ 
    222251                        if( (u8)temp && (u8)temp != 0xff ) 
    223252                        { 
  • GPL/trunk/makefile.os2

    r32 r328  
    55!if "$(DEBUG)" == "1" 
    66NMAKEOPTS += DEBUG=1 
     7!else 
     8NMAKEOPTS += DEBUG=0 
    79!endif 
    810 
     
    1012NMAKEOPTS += KEE=0 
    1113KEE=0 
     14!Message KEE=0, so ACPI=0 
     15NMAKEOPTS += ACPI=0 
     16ACPI=0 
    1217!else 
    1318NMAKEOPTS += KEE=1 
    1419KEE=1 
     20!endif 
     21 
     22!include Makefile.inc 
     23!if "$(ACPI_LIB)" == "" || "$(ACPI)" == "0" 
     24NMAKEOPTS += ACPI=0 
     25ACPI=0 
     26!else 
     27NMAKEOPTS += ACPI=1 
     28ACPI=1 
    1529!endif 
    1630