The original TiVo product, as proposed by Mike Ramsay and me in 1997, was for a home network-based multimedia server, streaming content to thin clients throughout the home. To build such a product requires a solid software foundation. The home environment may be one of the most mission-critical applications conceivable. From a consumer's perspective, the device must operate flawlessly, be reliable and robust, and handle power failure gracefully.
At that time, I had become familiar with Linux through a number of avenues. At Silicon Graphics (SGI), I was the executive sponsor of an effort to port Linux to the SGI Indy workstation, based on the MIPS R5000. I was using several early Linux distributions for personal experimental and development work.
This experience led me to believe that Linux would serve TiVo well as the operating system foundation. It was based on well-tested APIs, included a solid disk management system, a large base of support software and tools, and virtual memory and paging. It also provided access to and control of the software source code. With my operating system development background, I felt comfortable that we could handle any minor modifications or bug fixes needed to achieve the product goals. I also had a great deal of experience at Hewlett-Packard and SGI with molding Unix-like operating systems to handle real-time computing tasks. I felt that Linux could be similarly enhanced to provide the real-time performance needed to support consumer-quality television viewing.6
At the time, however, open source software was viewed with suspicion. People often asserted that open source software could never be as reliable as proprietary software. Software released under the GPL was looked upon with particular disfavor, because many people assumed that such software contaminated everything it touched and would disallow proprietary developments. Careful reading of the GPL convinced me that these fears were unfounded and that Linux could give us a powerful development advantage while allowing the protection of our intellectual property.
Early in the existence of TiVo, we realized that the home networking bandwidth available to support a client-server multimedia environment was not going to be easily available in the foreseeable future. We decided to collapse our design into a single product, the TiVo Client Device. The TCD takes the form of a television set-top box about the size of a video tape recorder. It contains a number of off-the-shelf electronic components, including a microprocessor, memory, modem, MPEG2 real-time encoder and decoder, and most significantly, a large-capacity PC OEM disk drive. Using patented and patent-pending technologies, the TCD has the ability to encode and store a television program on the disk drive in real time, while in parallel retrieving a program from the disk drive and outputting it as a standard television signal. This early digital video recorder could thus record one program while playing back another program that had been recorded earlier. In fact, the program being played back might even be the one being recorded, only shifted in time. This provides some of the more well-known features of a DVR—the ability to "pause" live television and to skip through television commercials.
To make the TCD reliable and easy to use, we needed to provide it with information about television programs and schedules, enabling the consumer to peruse the available programming and choose programs to be saved for later viewing. This program-guide data is automatically downloaded from our central servers during a daily telephone call and provides up to a 14-day window into future programming.
Early in the design of the TCD, we realized that delivering the simplicity and ease of use we desired would require a complex, interlocking set of capabilities. Maintaining a television-like viewing experience meant that video playback must never stop, and playback had to be perfect at all times, with no glitches or audio/video synchronization problems. Capture and storage of programs had to be similarly perfect, with no dropped frames and accurate tuning and timing. Searching the television guide or scheduling recordings must not interfere with these or other operations, such as the daily phone call to the TiVo servers. This implied the use of a preemptible multitasking operating system with both realtime and background processing abilities.
Our earlier focus on Linux turned out to be prescient when applied to the TCD. Here was an operating system that was well-developed in multitasking, while optimizing hardware resource usage. In addition, the availability of virtual memory made the software far easier to debug and validate, and paging allowed us to have a great deal of functionality available in our limited memory footprint of 16 megabytes.
For cost reasons, we used the IBM PowerPC 403GCX processor in the first TCD. With an external clock of 27 megahertz (clock doubled on chip), this processor was anemic by current standards, but quite powerful by embedded-system standards of the mid-1990s. It provided a simple memory management unit (MMU), allowing us to run Linux, as well as providing a great deal of embedded-system debugging support. This processor turned out to be ideal for our needs.
Linux posed some problems, however. A PowerPC port of Linux was available, but it was not mature and did not support the IBM 400 series microprocessors. It was also based on a "development" version of the Linux kernel (an odd-numbered version 2.1) rather than on a "stable" version of Linux. But it was enough. With a few months of effort, we ported Linux to this processor and were able to boot the first prototype TCD in the lab.
There was yet more work to do. We needed to modify the kernel to allow direct I/O (bypassing the file system buffer cache) for moving audio and video data into and out of user space. We had to change the buffer cache and paging system to interoperate properly with these changes. We needed to add extensive logging of kernel operation to help track down and eliminate realtime performance and scheduling problems. This was in addition to many minor changes to enhance functionality and improve performance.
Fortunately, we were able to perform most application development on Linux-based PCs. This was a great advantage, because the full Linux development environment was available and we could perform extensive testing quickly. On the last day of March 1999, we shipped the first TiVo boxes to retailers, the first commercial DVR ever shipped in the world. We then published our Linux kernel sources with our changes, many of which have been incorporated into new versions of the Linux kernel.
Tivo
There are 0 replies to this message