The present invention relates generally to data streaming systems, and more particularly but not by limitation to portable data streaming systems.
In audio and video playback applications where a data storage device (such as a hard disc drive) has a faster data transmission rate than an output device (such as a speaker or video display), data streaming can be used to conserve power. In particular, battery-powered devices such as portable music and video players use a memory buffer in an effort to ensure a continous stream of data to the output device. To ensure continuous data transmission, the memory buffer is cyclically refilled by the data storage device before the memory buffer exhausts its contents.
In such portable devices, environmental conditions such as shock, vibration, or temperature or humidity extremes can temporarily slow the transmission rate of the data storage device. When the data storage device is slowed, the device may not be able to refill the buffer before it is exhausted, and there is an undesirable break or interruption of playback for the user. Larger memories have been tried in buffers in an effort to avoid this problem, however, the use of larger memories drains down batteries quickly.
A method and apparatus are needed that will avoid breaks in playback due to changes in environmental conditions without incurring excessive power consumption. Embodiments of the present invention provide solutions to these and other problems, and offer other advantages over the prior art.
A data streaming system is disclosed. The data streaming system comprises a data storage device that provides an intermittent data stream. The data storage device includes an environment sensor that generates a sensor output. The data storage device generates a variable time-to-fill estimate as a function of the sensor output.
The data streaming system also comprises a buffer circuit. The buffer circuit receives the intermittent data stream and provides a buffer data stream. The buffer circuit also generates a time-to-exhaust estimate.
The data streaming system also comprises a comparator. The comparator receives the time-to-fill and time-to-exhaust estimates and generates a comparator output. The comparator output couples to the data storage device to control energization of the data storage device.
Other features and benefits that characterize embodiments of the present invention will be apparent upon reading the following detailed description and review of the associated drawings.
In the embodiments described below, a data streaming system includes a data storage device that provides a variable time-to-fill estimate based on an environment sensor output. The data streaming system also includes a buffer circuit that provides time-to-exhaust estimate. A comparator compares the time-to-fill estimate with the time-to-exhaust estimate and provides a comparator output that controls energization of the data storage device. The energization is cyclical and varies based on environmental conditions to avoid breaks in playback and to provide continuous playback for the user without excessive power consumption.
Instead of allocating a fixed time before the buffer runs out of media data before refilling it, the disclosed arrangement provides performance prediction to ensure continuous playback and low power consumption. The storage device estimates or predicts how fast it will be able to deliver the data requested by the buffer circuit based on environmental conditions. The buffer circuit estimates or predicts how much time will elapse before it is exhausted. The comparator uses the information to energize the storage device to refill the buffer.
In a portable MP3 player example, the player can query the performance expectation of the hard disk drive as much as 30 seconds before the music buffer runs out. If this player is exposed to jogging condition, the shock sensor in the hard disk drive can allow the drive to estimate that it will take 20 seconds instead of 5 seconds to fulfill the requested data. This allows the player to issue the buffer refill request as early as 30 seconds instead of the original designed time of 10 seconds. Similarly in car audio applications, the hard disk drive may be exposed to very high operating temperatures so that it will take longer than 10 seconds to refill the music buffer. This performance estimation command will allow a host computer to provide more time for the hard disk drive to fulfill its request to refill a buffer. Various examples are described below in connection with
The data storage device 202 provides an intermittent data stream 204. The data storage device 202 includes one or more environment sensors 206 that sense an environmental condition of the data storage device 202 and that couple one or more environmental sensor outputs 208 to a time-to-fill estimating circuit 210. The time-to-fill estimating circuit 210 generates a variable time-to-fill estimate 212 as a function of the environmental sensor output 208. The time-to-fill estimate 212 comprises a performance predictor for a maximum rate at which the data storage device 202 is capable of delivering data under current environmental conditions. The environmental sensors 206 and the time-to-fill estimating circuit 210 are described in more detail below by way of an example illustrated in
The data streaming system 200 also comprises a buffer circuit 220. The buffer circuit 220 receives the intermittent data stream 204 and provides the buffer data stream 222. The buffer circuit 220 includes a time-to-exhaust estimating circuit 224 that generates a time-to-exhaust estimate 226. The time-to-exhaust estimate 226 is described in more detail below in connection with an example illustrated in
The data streaming system 200 also comprises a comparator 230. The comparator 230 receives the time-to-fill estimate 212 and the time-to-exhaust estimate 226. The comparator 230 generates a comparator output 232 that couples to the data storage device 202 to control energization of the data storage device 202 from the energy storage device 203. The operation of the comparator 230 is described in more detail below in connection with an example timing diagram illustrated in
The data storage device 202 receives data on line 240 and stores the data. The data received on line 240 is typically a music file or a video file. At a later time, a user can playback the stored data through the output device 201 which can be an audio headset or a video display, or both. The data storage device 202 is operated intermittently at a high data rate during playback to quickly fill up the buffer circuit 220 with a portion of the file being played back, and then shut off by comparator output 232 to conserve energy. In a preferred arrangement, the comparator output 232 is shut off when the buffer circuit 220 is completely filled with data. The buffer circuit 220 provides the buffer data stream at a lower data rate to the output device 201. The operation of the data storage device 202 is cyclical. The data storage device 202 can be powered down or used for other tasks when there is adequate data in the buffer circuit 220 for uninterrupted playback.
The timing diagram 300 has a vertical axis 308 that represents an exemplary environmental variable such as acceleration (vibration). The acceleration is low when the data storage device 200 is at rest during time intervals 310, 312. The acceleration is high when the data storage device is set in motion by an environmental disturbance, such as when a user carrying the data storage device 200 is jogging during time interval 314. The high acceleration during interval 314 causes a read head in the data storage device 200 to become intermittently misaligned with tracks to be read on a disc, for example, and the rate at which the data storage device can deliver data is slowed down due to the time needed to reestablish alignment between the read head and the desired tracks.
The timing diagram 300 has a vertical axis 320 that represents magnitudes of time estimates such as a time-to-exhaust estimate 322 (broken line) and a time to fill estimate 324 (solid line). When the acceleration rises to a high level at the start of interval 314, the time-to-fill estimate 324 increases because the drive is slowed down to a lower data rate by the high level of acceleration and the drive will take longer to transfer data due to the lower data rate.
As the buffer circuit 220 transfers data out to the output device 201, the time-to-exhaust estimate goes down as illustrated at 326. When the time-to-exhaust estimate 322 drops down to the same level as the time-to-fill estimate at crossover point 330, then the comparator output turns the data storage device 202 ON at 332. The data storage device 202 spins up to its operating speed at 334, and data is read from the data storage device at 336, refilling the buffer circuit 220 with data. As the buffer circuit 220 refills with data, the time-to-exhaust estimate increases at 338. In a preferred arrangement, once the data storage device 202 is energized, it is allowed to run until the buffer circuit 220 is filled with data. When the buffer circuit 220 is full again at 340, the data storage device shuts off at 342. The data storage device 202 then waits for the next crossover point 350 of time-to-exhaust estimate 322 and time-to-fill estimate 324 to reenergize the data storage device. The data storage device 202 is de-energized from 340 to 350 in
The control of the energization by the comparator output 232 prevents exhausting of data stored in the buffer circuit 220. The intermittent data stream 204 has a first data transmission rate (while data is being sent), and the buffer data stream 222 has a second data transmission rate that is slower than the first data transmission rate. The intermittent data stream 204 refills the buffer circuit 220 before the buffer circuit 220 is depleted of data, so that the buffer data stream 222 is a continuous data stream, or a stream that is fast enough to supply the data needs of the output device 201. The energization cycles on and off to reduce energy consumption in the data streaming system 200.
In
Also in
A processor (not illustrated) in the buffer circuit maintains a read address pointer 606 which points to an address of the next data word to be read and provided to a buffer data stream (such as buffer data stream 222 in
The processor in the buffer circuit also maintains an end-of-data address pointer 608 which points to an address of the last data word that has been provided by a data storage device (such as data storage device 202) and stored in the buffer circuit. When the end-of data address pointer 608 points to address FFFFFFF, and is incremented by 1 when an additional word of data is received, then the end-of-data pointer 608 moves to next higher address, which is 0000000.
The processor calculates a mathematical address difference 610 between the end-of-data address pointer 608 and the read address pointer 606. The mathematical address difference 610 represents the amount of data remaining in the buffer that has not been read yet. The processor multiples the address difference by a scale factor to generate a time-to-exhaust estimate (such as time to exhaust estimate 226 in
This performance estimation arrangement can provide metrics like sustained data streaming rate. This data streaming rate can be reduced if the device is exposed to shock, vibration or extreme temperatures. The value of this data streaming rate can be determined through data collection and experiments during the design and development of the device.
It is found that typical joggers incur an external shock of frequencies between 3 Hz to 5 Hz to the disk drive. This frequency is low enough for the drive firmware to recover from off-tracks and retry the read operations. However the read throughput of the drive falls drastically. Experiments done on a drive show that the sustained transfer rate can drop from 20 MB/sec to as low as 4 MB/sec. By allowing the compressed audio player to ask for an estimate of the read performance of the disk drive under jogging environment, the player will know that it should be requesting to refill its music buffer 50 seconds before its music buffer exhausts instead of 10 seconds. This performance prediction provides increased resistance to acceleration in jogging situations, and avoids unnecessary waste of energization when acceleration is not present, thereby increasing battery life. There are fewer spin up/down cycles of the data storage device which leads to longer battery life and increased reliability of the data storage device.
It will be understood by those skilled in the art that various circuit functions described in the embodiments can be realized in a variety of combinations of hardware, firmware or software depending on the applications. It will also be understood by those skilled in the art that feature described in one embodiment may be appropriately applied to other embodiments.
In summary, a data streaming system (such as 200) is disclosed. The data streaming system comprises a data storage device (such as 202) that provides an intermittent data stream (such as 204). The data storage device includes an environment sensor (such as 206) that generates a sensor output (such as 208). The data storage device generates a variable time-to-fill estimate (such as 212) as a function of the sensor output.
The data streaming system also comprises a buffer circuit (such as 220). The buffer circuit receives the intermittent data stream and provides a buffer data stream (such as 222). The buffer circuit also generates a time-to-exhaust estimate (such as 226).
The data streaming system also comprises a comparator (such as 230). The comparator receives the time-to-fill and time-to-exhaust estimates and generates a comparator output (such as 232). The comparator output couples to the data storage device to control energization of the data storage device.
It is to be understood that even though numerous characteristics and advantages of various embodiments of the invention have been set forth in the foregoing description, together with details of the structure and function of various embodiments of the invention, this disclosure is illustrative only, and changes may be made in detail, especially in matters of structure and arrangement of parts within the principles of the present invention to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed. For example, the particular elements may vary depending on the particular application for the media streaming system while maintaining substantially the same functionality without departing from the scope of the present invention. In addition, although a preferred embodiment described herein is directed to a disc drive system for audio or video applications, it will be appreciated by those skilled in the art that the teachings of the present invention can be applied to other data streaming applications, without departing from the scope of the present invention.