1291688 參 1 九、發明說明: 【發明所屬之技術領域】 本电明係有關於一種電源管理方法,特別有關於一種 光碟機的電源管理方法。 【先前技術】 為了減少電子裝置的能量消耗,廠商通常會針對該電 擊子1置設計一套電源管理(P〇wer management)方法,令該電 子裝置在不使用的時候進入一休眠狀態,以降低能量損耗。 弟1圖為傳統的多媒體命令(Multimedia Commands, MMC)協定之狀態圖,可用來作為一光碟機的電源管理方 法。根據傳統的多媒體命令協定,該光碟機會在一閒置(idle) 狀恶102、一待機(standby)狀態104、一休眠(sleep)狀態 1〇6、一使用(active)狀態1〇8、以及一關閉(0ff)狀態ι10之 間切換。傳統的多媒體命令協定之切換條件包括··硬體重 ® d又指令或媒體未就緒指令(hard reset or media not ready)112、媒體插入(media insertion)114 與 116、閒置命 令(idle command) 118、待機命令(standby command) 120、媒 體存取指令(media access)122與124、間置計時器屆時或閒 置指令(idle timer expires or idle command) 126、待機計時器 屆時或待機指令(standby timer expires or standby command) 128、裝置重設指令(device reset) 130、電源移除 (power removed)132、以及休眠指令 134、136、與 138。如 第1圖所示,光碟機只有在發生一休眠指令134、136、或 0535-A21539TWF(N2);A05138;Glorious_Tien 1291688 138 =,才會由該間置狀態1〇2、該待機狀態ι〇4、或該使 用狀,% 108切換至該休眠狀態1〇6。因此,在傳統的多媒 體命令協定的架構下,除非發生該休眠指令 134、136、或 138否則即使已鉍長時間不使用該光碟機,該光碟機仍然 無法切換至該休眠狀態。 【發明内容】 本發明提供一種電源管理方法,可以將長時間不使用 的光碟機切換至—休眠狀態,以節省更多的能源。 、本發明所提供的電源管理方法包括在一光碟機之碟盤 為收入(tray丨11)狀態、該碟盤上沒有碟片、並且該光碟機 、准持在閒置狀態或一待機狀態超過一段時間時,將該光 碟機切換至—休眠狀態;以及在該細機之碟盤為-退出 狀心(tray out)並且該光碟機維持在該閒置狀態或該待機 狀1、超過^ ^又日^間時,將該光碟機切換至該休眠狀態。 該種電源管理方法跳出該休眠狀態的方法可包括:在 該光業枝為名休眠狀態、並且該碟盤在該收入狀態與該退 出狀^之間切換4,令該光碟機退出該休眠狀態並且切換 至該待機狀癌。可藉由按下一退/送碟鍵(eject/tray pushed-m button),將該碟盤在該收入狀態與該退出狀態之 間切換。亦可藉由外力將該碟盤推入該光碟機,使該碟盤 由該退出狀態切換至該收入狀態。 該電源管理方法更可包括:在該光碟機為該休眠狀態 日守,由一自動回應模組(auto-response module)代替該光碟 機回應一作業系統對該光碟機所下達的一非媒體存取指令 0535-A21539TWF(N2);A05138;Glorious_Tien 1291688 =、民狀態21G。該電源管理方法更包括使用—計時器計 亥光碟機維持在該閒置狀態施或該待機狀態2〇8的時 間。 如第2圖所示,本發明之電源管理方法更可包括條件 、〜在忒光碟機為該休眠狀態21〇、並且該碟盤在該收入 $態與該退出狀態之間切換時,令該光碟機退出該休眠狀 ^ 1〇並且切換至該待機狀態208。可藉由按下該光碟機 • 2 一退/送碟鍵,令該碟盤由該收入狀態切換至該退出狀 ^或由5亥退出狀態切換至該收入狀態,以觸發條件204。 亦:藉由外力將該碟盤推入該光碟機,將該碟盤由該退出 狀;L、切換至該收入狀態,以觸發條件2〇4。 第^圖所述之電源管理方法更包括:在該光碟機為該 休眠狀您210時,由一自動回應模組(aut〇resp〇nsem〇duie) $替該光碟機回應一作業系統對該光碟機所下達的一非媒 月丑存取私令(n〇n_media access c〇mmand),以維持該光碟機 • 休眠狀悲210。因此,該光碟機不會受該非媒體存取 才曰々心音,可被維持在該休眠狀態2丨〇,以降低不必要的 能量損耗。 ^此段敘述第2圖所述之電源管理方法的其他規則。該 $碟機在該休眠狀態210時不會回應該作業系統對該光碟 枝斤下達的媒體存取指令(media access command)。因 =,該媒體存取指令會逾時⑴㈤⑶讨)。此時,該作業系統 曰對孩光碟機下達一軟體重設指令(s〇丘reset cornniand), 以切換該光碟機至該待機狀態208。 〇535-A21539TWF(N2);A05138;Glorious„Tien 1291688 態208。電腦系統30〇更句 、 下該退/送碟鍵310將該碟般由=达碟鍵310 ’可錯由按 態、或由該退出狀態切換“:入狀態切換至該退出狀 該碟盤推入該光碟機302,。亦可藉由外力將 該收入狀態。 吏忒碟盤由該退出狀態切換至 機30;:::更包括—自動回應模组308。在該光碟 械302為該休眠狀態21〇 該光碟機搬回應-作㈣二'動回應模組3。8會代替 3〇2所下達的-非媒々π (未顯示在圖中)對該光碟機 ^ , ”壯子指令,使該光碟機3〇2得以維 ::该:眠狀態21〇。該光碟機3〇2在 =應^統所下達的-媒體存取指令。因此該媒 ΓΓιΓΓΓ該作業系統會另行對該光碟機搬下 抓令,以切換該光碟機地至該待機狀態 電腦系統300之控制單元3〇4更可遵循 入八 協定(第1圖所示之電源管理方法…控健㈣機; 光碟機3G2更可以操作在_使用狀態(第2圖之如二 關閉狀態(第2圖之214)。 )乂及 以上所敘述的實施例乃用來幫助讀者了解本發明的技 術’亚非用⑽制本發明的範圍。任何減本 =範圍所衍生絲的技術,皆屬於本說明書ς欲保護: 0535-Α21539TWF(N2);A051 38;Glorious_Tien 1291688 【圖式簡皁說明】 第1圖為傳統的多媒體命令(MMC)協定之狀態圖; 第2圖為本發明之電源管理方法的實施例之狀態圖; 第3圖為本發明所提出的電腦系統之實施例,用以實 現本發明之電源管理方法。 【主要元件符號說明】 102、206〜閒置狀態; 104、208〜待機狀態; 106、210〜休眠狀態; 108、212〜使用狀態; 110、214〜關閉狀態; 112-138〜傳統MMC協定之狀態圖的切換條件; 202、204〜本發明之電源管理方法所提出的切換條件; 300〜本發明之電腦系統; 302〜光碟機; 304〜控制單元; 306〜計時器; 308〜自動回應模組; 310〜退/送碟鍵。 0535-A21539TWF(N2);A05138;Glorious_Tien 121291688 Ref. 1 IX. Description of the invention: [Technical field to which the invention pertains] This invention relates to a power management method, and more particularly to a power management method for an optical disk drive. [Prior Art] In order to reduce the energy consumption of the electronic device, the manufacturer usually designs a power management method for the electric shock device 1 so that the electronic device enters a sleep state when not in use to reduce Energy loss. Figure 1 shows the state diagram of the traditional Multimedia Commands (MMC) protocol, which can be used as a power management method for an optical disk drive. According to the conventional multimedia command protocol, the optical disc is in an idle state 102, a standby state 104, a sleep state 1〇6, an active state 1〇8, and a Turn off (0ff) to switch between states ι10. The switching conditions of the conventional multimedia command protocol include: hard weight or d not instruction 112, media insertion 114 and 116, idle command 118, Standby command 120, media access 122 and 124, idle timer expires or idle command 126, standby timer or standby command (standby timer expires or Standby command 128, device reset 130, power removed 132, and sleep commands 134, 136, and 138. As shown in Figure 1, the disc player will only be in the sleep state 134, 136, or 0535-A21539TWF (N2); A05138; Glorious_Tien 1291688 138 =, the intervening state will be 2, the standby state ι〇 4. Or the usage, % 108 switches to the sleep state 1〇6. Therefore, under the framework of the conventional multimedia command protocol, unless the sleep instruction 134, 136, or 138 occurs, the optical disk drive cannot be switched to the sleep state even if the optical disk drive has not been used for a long time. SUMMARY OF THE INVENTION The present invention provides a power management method for switching an optical disk drive that is not used for a long time to a sleep state to save more energy. The power management method provided by the present invention includes a disk (disc丨11) state on a disk of a CD player, no disc on the disk, and the disk drive, the idle state, or a standby state exceeds one segment. At the time of time, the disc drive is switched to the sleep state; and the disc of the fine machine is - exited and the optical disc drive is maintained in the idle state or the standby state 1, more than ^ ^ During the interval, the disc drive is switched to the sleep state. The method for the power management method to jump out of the sleep state may include: in the sleep state of the optical industry, and the disk is switched between the revenue state and the exit state, so that the optical disk machine exits the sleep state. And switch to the standby cancer. The disc can be switched between the revenue status and the exit status by pressing the eject/tray pushed-m button. The disc can also be pushed into the disc by an external force to switch the disc from the exit state to the revenue state. The power management method may further include: when the CD player is in the dormant state, the auto-response module is replaced by an auto-response module to respond to a non-media storage issued by the operating system to the optical disc drive. Take instruction 0535-A21539TWF (N2); A05138; Glorious_Tien 1291688 =, citizen state 21G. The power management method further includes maintaining the time in the idle state or the standby state 2〇8 using the timer. As shown in FIG. 2, the power management method of the present invention may further include a condition, when the optical disk drive is in the sleep state 21〇, and the disk is switched between the revenue $state and the exit state, The disc player exits the sleep state and switches to the standby state 208. The condition 204 can be triggered by pressing the disc player 2 to retract/send the disc to switch the disc from the revenue status to the exit status or to switch from the 5th exit status to the revenue status. Also: the disc is pushed into the disc player by an external force, and the disc is ejected by the exiting; L. is switched to the income state to trigger the condition 2〇4. The power management method described in the figure further includes: when the CD player is in the dormant state 210, an automatic response module (aut〇resp〇nsem〇duie)$ is used to respond to the operating system of the optical disk drive. A non-media access ugly order (n〇n_media access c〇mmand) issued by the CD player to maintain the CD player. Therefore, the optical disk drive is not subject to the non-media access, and can be maintained in the sleep state 2丨〇 to reduce unnecessary energy loss. ^ This paragraph describes other rules of the power management method described in Figure 2. The disc player does not respond to the media access command issued by the operating system to the disc in the sleep state 210. Because of the =, the media access command will expire (1) (5) (3). At this time, the operating system sends a soft weight setting command to the child disc drive to switch the disc drive to the standby state 208. 〇 535-A21539TWF (N2); A05138; Glorious „Tien 1291688 state 208. The computer system 30 〇 句 、 下 下 下 下 下 下 退 退 退 退 退 退 退 退 退 退 退 退 退 = = = = = = = = = By the exit state switching ": the incoming state is switched to the exit mode, the disk is pushed into the optical disk drive 302. The income status can also be obtained by external force. The disk is switched from the exit state to the machine 30;::: further includes an automatic response module 308. When the optical disc 302 is in the sleep state 21, the optical disc drive responds to the (four) two's dynamic response module 3. 8 instead of the 3〇2 issued - non-media π (not shown in the figure) CD player ^, "Zhuangzi command, so that the CD player 3〇2 can be dimensioned:: The sleep state 21〇. The CD player 3〇2 in the = should be unified - media access instructions. Therefore the media ΓΓιΓΓΓ The operating system will separately remove the drive to switch the drive to the control unit 3〇4 of the standby computer system 300. ... control (4) machine; CD player 3G2 can be operated in the _ use state (Fig. 2 closed state (214 of Figure 2).) and the above described embodiments are used to help the reader understand the present invention. The technology of 'Asia and Africa' (10) is the scope of the present invention. Any technique for reducing the amount of yarn derived from the range is in this specification and is intended to be protected: 0535-Α21539TWF(N2); A051 38; Glorious_Tien 1291688 Figure 1 is a state diagram of the traditional Multimedia Command (MMC) protocol; Figure 2 is the current FIG. 3 is a state diagram of an embodiment of a power management method according to the present invention; FIG. 3 is an embodiment of a computer system according to the present invention for implementing the power management method of the present invention. [Description of main component symbols] 102, 206~ idle state; 104, 208~ standby state; 106, 210~ sleep state; 108, 212~ use state; 110, 214~off state; 112-138~ switching condition of state diagram of traditional MMC protocol; 202, 204~ power supply of the invention Management method proposed switching conditions; 300~ computer system of the present invention; 302~CD player; 304~ control unit; 306~timer; 308~automatic response module; 310~return/send disc key. 0535-A21539TWF( N2); A05138; Glorious_Tien 12