Abstract:
A volume control handler allows users to dynamically alter the volume level of an audio device when the device is under control of a DOS mode application. The dynamic volume adjustment is performed without pausing or halting the DOS mode application. A system incorporating the volume control handler allows users of DOS mode applications to control a device&#39;s volume output in a manner similar to that provided by WINDOWS-compliant applications.

Description:
BACKGROUND OF THE INVENTION 
     The invention generally relates to the control of peripheral devices in a computer system and, more particularly, to a system and method that provides dynamic control of a device&#39;s operating parameters. Dynamic control is achieved without pausing or halting an executing. 
     In computer systems executing under control of a modern operating system, volume control of audio generators, FM synthesizers, and other audio generating equipment can be effected by control buttons on the computer system&#39;s enclosure. An illustrative operating system that provides this capability is the WINDOWS operating system from Microsoft Corporation. In a WINDOWS-compatible application, pressing the control buttons generates a System Management Interrupt (SMI) which, in accordance with WINDOWS operating procedures, invokes a Basic Input-Output System (BIOS) routine that is designed to perform the specified task, e.g., increase or decrease the volume level. 
     A SMI is a non-maskable interrupt which is generally sent directly to the computer system&#39;s host processor. SMI routines are generally part of the BIOS and are designed to process events (e.g., depression of a volume-up button) in a very time efficient manner. 
     SUMMARY OF THE INVENTION 
     The invention, generally, provides apparatus and methods to process system management interrupt signals via a BIOS level handler. The handler allows control of a peripheral device parameter (e.g., volume), including auto-repeat capability, regardless of generating system mode. 
     Advantages of the invention include, but are not limited to, allowing the user to control the volume of a peripheral device under program control, without exiting the program, and regardless of the underlying operating systems mode. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING 
     FIG. 1 illustrates a computer system providing dynamic control of an audio device parameter. 
     FIG. 2 illustrates a bezel button volume control handler. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Referring initially to FIG. 1, an illustrative computer system 100 in accordance with the invention includes a host processor or CPU 102 having SMI input capability and control buttons 104 (hereinafter referred to as bezel buttons) coupled to the CPU&#39;s SMI input. Bezel buttons 104 may be on an external surface of a the computer system&#39;s enclosure or display monitor. In the illustrative computer system 100, the bezel buttons 104 implement volume-up and volume-down buttons for controlling an audio circuit 106 and/or an FM synthesizer 108. Illustrative host processors 102 include the PENTIUM and PENTIUM PRO family of processors from Intel Corporation. 
     The computer system 100 may also include Read Only Memory (ROM) 110, Random Access Memory (RAM) 112, non-volatile RAM (NVRAM) 114, and an Automatic System Recovery (ASR) circuit 116 connected to the system bus 118. System ROM 110 can use programmable versions of read only memory such as Electrically Erasable Programmable ROM (EEPROM). Non-Volatile RAM (NVRAM) 114 can be a CMOS memory device capable of retaining stored information after the system 100 is powered down. The system&#39;s SMI and Basic Input-Output System (BIOS) routines are generally stored in the NVRAM 114. 
     A bridge circuit 120 couples the system bus 118 to a secondary bus 122. The secondary bus could be, for example, a Peripheral Component Interface (PCI) bus, an Industry Standard Architecture (ISA) bus, an Extended Industry Standard Architecture (EISA) bus, or a combination of one or more of these buses. An input/output (I/O) control circuit 124 provides an interface for a user keyboard 126, a pointer device 128, and serial 130 and parallel 132 ports. Other components coupled to the secondary bus 122 include the audio generator circuit 106, the FM synthesizer 108, a video controller 134 and associated display 136, a disk controller 138 and associated disks (one shown) 140. The secondary bus 122 may also have slots 142 for additional components. 
     In the computer system 100 volume control of WINDOWS-compliant applications can be managed by a bezel button control driver. (WINDOWS is a trademark of Microsoft Corporation.) The bezel button control driver is a device driver which is loaded (made available to execute) from the disk 140 into system RAM 112 when the WINDOWS operating system is loaded. When the bezel button control driver is loaded, it registers with the operating system&#39;s BIOS so that other applications and routines can determine that bezel button volume control is available. Bezel button driver registration is generally accomplished by setting a status flag in the NVRAM 108 indicating the driver is loaded. 
     When the computer system transitions from a WINDOWS operating mode to a Disk Operating System (DOS) operating mode, WINDOWS device drivers such as the bezel button control driver are unloaded (i.e., removed from system RAM 112 and, therefore, not available for execution). Computer system 100 may be placed into the DOS mode by, for example, booting the computer system directly into DOS or by selecting full-screen mode presentation for a DOS application executing in a DOS window under the WINDOWS operating system. 
     When executing in DOS mode, a peripheral&#39;s volume, under program control, may generally only be adjusted by either pausing or halting the application, adjusting the volume, and then restarting the application. Both of these techniques require the user halt the program, an unwanted interruption for many users. 
     Referring to FIG. 2, a volume control handler 200 provides volume control of a peripheral device. The handler 200 is a BIOS routine permanently stored in system ROM 110 and is available for execution whenever the computer system is booted. 
     Pressing a bezel button generates a SMI (step 202) which, in turn, initiates a routine that interrogates the bezel button hardware. The routine initiated as a result of the SMI determines which button is pressed and initiates execution of the handler 200. 
     If the depressed bezel button is a volume control button (the `yes` prong of step 204) and the computer system 100 is operating in the DOS mode (the `yes` prong of step 206), the volume output of the audio circuit 106 and/or FM synthesizer 108 is adjusted (step 208). If a volume-up bezel button is pressed, the volume is increased by one step. If a volume-down button is pressed, the volume is decreased by one step. If both the volume-up and the volume-down bezel buttons are pushed at the same time, the audio circuit 106 and FM synthesizer 108 are muted. If muted when a volume-up or volume-down button was detected, the mute is canceled and the volume adjusted accordingly. In one embodiment, the audio circuit 106 and FM synthesizer 108 incorporate Sound Blaster compatible registers, a well-known industry standard. The handler 200 can determine if the system is operating in the DOS mode by, for example, checking to see if the WINDOWS bezel button driver is loaded/registered as discussed above. 
     Once the volume is adjusted at step 208, the volume control handler 200 sets a timer (step 210) and exits (step 212). The timer can be set for any predetermined time period and, in one embodiment, is configured to expire 0.25 seconds (250 msec) after being set. Upon expiration, the timer generates a SMI that initiates execution of the handler 200 at step 204. In this embodiment, the timer implements an auto-repeat function. That is, if the user continues to hold down a volume control bezel button, the volume is adjusted (increased or decreased) every 250 msec. 
     If the computer system is not operating in the DOS mode (the `no` prong of step 206), a Non-Maskable Interrupt (NMI) is generated to signal the host processor 102 that the WINDOWS volume control routine (e.g., bezel button driver) should be invoked to process the button event (step 214) and the timer is set as discussed above (step 210). 
     If the button depressed was not a volume control button (the `no` prong of step 204), control passes to the routine designed to service the event generating the SMI (step 216) and the volume control handler exits (step 212). On exiting, the handler 200 clears the SMI status so that future SMIs may be processed. 
     The foregoing description is illustrative only and is not to be interpreted as limiting. It will be recognized that various changes in the details of the illustrated computer system and method of operation may be made without departing from the spirit of the invention. Specifically, the invention is not limited to the WINDOWS and DOS operating systems. The invention may be implemented in digital electronic circuitry or in computer hardware, firmware, software, or in combinations of them. For example, the invention may be implemented, at least in part, as a computer program tangibly embodied in a machine-readable storage device for execution by a computer processor. Method steps according to the invention may be performed by a computer processor executing instructions organized, e.g., into program modules to operate on input data such as a SMI event and to generate output, such as volume control signals. Storage devices suitable for tangible embodying computer program instructions include all forms of non-volatile memory including, but not limited to: semiconductor memory devices such as programmable read only memory (PROM) and flash PROM devices; magnetic disks (fixed, floppy, and removable); other magnetic media such as tape; optical media such as CD-ROM disks; and electro-optic devices.