Plaque It!
Sponsored by: Flash of Genius |
[0001] The present invention relates to a multitask control device that causes a processor to execute a plurality of tasks concurrently, and a music data reproduction device.
[0002] In recent years, a general-purpose digital signal processor (DSP) of a program control system which is capable of performing compression processing of data such as audio and video data at a high speed (285MIPS, for instance) has been developed, and used for a wide variety of devices such as modem, CD, MD, DVC and DVD devices as well as a digital cell phone and mobile AV equipment. A computer device incorporating such a processor, for example, a cell phone, realizes a telephone call function by causing the processor to execute a program for calling. However, there have been increasing user demands for the added functions of this cell phone, such as a music recording and/or reproducing device, a TV receiver, and even a device capable of concurrently recording music, watching TV and answering a phone if he/she gets a call. Therefore, there has been increasing tendencies to make this type of computers multifunctional by implementing a multitask control device capable of extending and modifying the functions easily so as to realize various functions.
[0003] This multitask control device causes a powerful processor to process three tasks concurrently, for example, a task for recording and/or reproducing music, a task for receiving TV and a task for a telephone call. These tasks are realized by the functions provided by a real time OS which runs on the processor, such as a task management unit which controls the startup and the stop of the tasks.
[0004] By the way, in order to meet the demands for recording and/or reproducing music, watching TV and making a telephone call at the same time, the spare capacity of the processor for recording and/or reproducing music is 35MIPS on the assumption that 150MIPS and 100MIPS load is put on the processor for processing the TV reception task and the telephone call task respectively.
[0005] That is why, traditionally, in order to avoid the processor from going out of capacity, a task with minimum number of commands for recording and/or reproducing music is created to control the load to within about 30MIPS so that recording and/or reproducing music, receiving TV and making a telephone call can be processed concurrently within the limit of the processing capacity of the processor.
[0006] There is an audio coding system for dividing a digital-audio signal into a plurality of frequency bands to code it in each band, as a conventional art (See Japanese Patent Application Laid-Open No.2000-78018, p. 1, FIG. 1). This audio coding system comprises a plurality of bit allocating means for performing bit allocation with different processing amount by generating bit allocation information for each of the divided bands, wherein bit allocation is executed, based on external control information, by switching among the plurality of means so that a predetermined one of the means is used for the bit allocation, for coding the digital-audio signal. By this system, real-time, non-interrupted and high-quality coded data creation is realized independently of CPU processing capacity in a computer and occupancy of other applications in the CPU.
[0007] However, even in this multitask control device or the music data reproduction device which implements this multitask control device in itself, it is a very rare case to do three actions, recording and/or reproducing music, watching TV and making a telephone call, at the same time. Only a single function of recording and/or reproducing music is usually used. When only a single function, recording and/or reproducing music, for instance, is used, the load of only 30MIPS is put on the processor for processing the music recording and/or reproducing task. In other words, the processor is used well within its capacity, with as much as 255MIPS processing capacity unused.
[0008] By the way, scalability in encoding and decoding audio signals is very high. For example, if the low load of 30MIPS or so with a small number of commands for encoding and decoding is put on the processor, the sound quality is very low, while if the higher load of 200MIPS or so with a larger number of commands for encoding is put on the processor, the sound quality becomes higher as much as the original sound.
[0009] Therefore, there is a problem traditionally that the sound quality is lower with the lower load on the processor because even the high capacity of the processor is not fully used.
[0010] In order to solve this problem, it is conceivable to make full use of the capacity of the processor to improve the sound quality by increasing the number of commands for the task of recording and/or reproducing music so as to put the load of 200MIPS on the processor for processing the task of recording and/or reproducing music.
[0011] However, in this case, if the user watches TV or makes a call during recording and/or reproducing music, the load goes beyond the processing capacity and the processor goes down.
[0012] Such a situation may occur regardless of a task type, and out-of-capacity/quality tradeoffs need to be considered.
[0013] The audio encoding method disclosed in the above-mentioned patent application is used under a CPU having processing capacity of several tens or hundreds of times as large as that of a processor in a cell phone, so above-mentioned problem seems to hardly occur. On the other hand, when there is no other choice but to use a processor of a several tenth or hundredth of a CPU used for a computer even if its processing capacity is improved than before, the above-mentioned problem is significant.
[0014] The present invention has been conceived in view of the traditional problem, and the object of the present invention is to provide a multitask control device and a music data reproduction device capable of improving quality and avoiding out-of-capacity of a processor with relatively low processing capacity.
[0015] In order to solve the above-mentioned problem, the multitask control device according to the present invention is a multitask control device for causing a processor to execute concurrently a plurality of tasks including a first task having a plurality of operation modes, the multitask control device comprising: a judging unit operable to judge whether the first task should be started up or not; and a mode controlling unit operable to cause the processor to execute the first task in one of the operation modes in which the first task has a function realized within the limit of the processor capacity, when the judging unit judges that the first task should be started up. More specifically, the first task is a task for reproducing a digital audio signal, the function is a function of controlling sound quality, and the mode controlling unit may cause the processor to execute the first task in one of the operation modes in which the first task reproduces the signal with highest sound quality within the limit of the processor capacity, when the judging unit judges that the first task should be started up.
[0016] As a result, the range of choice for a function of the first task is broadened if the processor has spare capacity, while the range of choice is narrowed if the processor has no spare capacity. Therefore, the mode controlling unit can cause the processor to execute the first task in the operation mode in which the first task has the highest function realized within the limit of the processing capacity of the processor, and thus the out-of-capacity of the processor can be avoided without fail and the reproduced sound quality can be improved, regardless of the concurrence status of the tasks.
[0017] Here, the function is a highest function realized within the limit of the processor capacity, and the mode controlling unit may cause the processor to execute the first task in one of the operation modes in which the first task has the highest function. Also, the function becomes higher as load on the processor becomes larger, and the mode controlling unit may cause the processor to execute the first task in said one of the operation modes in which the first task operates in the largest load within the limit of the processor capacity, when the judging unit judges that the first task should be started up. In addition, the function becomes higher as the number of commands executed by the processor becomes larger, and the mode controlling unit may cause the processor to execute the first task in said one of the operation modes in which the first task operates according to the largest number of commands within the limit of the processor capacity, when the judging unit judges that the first task should be started up. Furthermore, the function is a filter function for controlling highest sound quality within the limit of the processor capacity, and the mode controlling unit may cause the processor to execute the first task in one of the operation modes in which the first task operates using the largest number of taps within the limit of the processor capacity, when the judging unit judges the first task should be started.
[0018] The mode controlling unit may include: a status change detecting unit operable to detect a status change of respective one of the tasks to be executed by the processor; a specifying unit operable to specify at least one of the tasks to be started up after the status change; and an operation mode determining unit operable to determine one of the operation modes for the first task if the first task is included in said at least one of the tasks specified by the specifying unit. Therefore, when the status change of the tasks occurs, the operation mode for the first task can be determined at appropriate timing.
[0019] In this case, the operation mode determining unit has an operation mode setting table in which said at least one of the tasks specified by the specifying unit and the operation mode for the first task to be started up after the status change are associated with each other, and the operation mode determining unit may determine said operation mode for the first task based on the operation mode setting table. Also, the operation mode determining unit has an operation mode setting table in which the number of the tasks specified by the specifying unit and the operation mode for the first task to be started up after the status change are associated with each other, and the operation mode determining unit may determine said operation mode for the first task based on the operation mode setting table. Therefore, the operation mode for the first task can be determined easily.
[0020] Furthermore, the operation mode determining unit includes: a load calculating unit operable to calculate load which is assignable to the execution of the first task to be started up after the status change; and a comparing unit operable to compare the load calculated by the load calculating unit and the load required for the execution of the first task in respective one of the operation modes, and the operation mode determining unit may determine the operation mode for the first task based on the result of comparison made by the comparing unit. In this case, the operation mode determining unit may further include: a startup request accepting unit operable to accept a startup request of respective one of the tasks; and a startup disabling unit operable to disable the startup of at least one other task than the first task if the load calculated by the load calculating unit is less than a threshold set for the operation mode with the lowest function for the first task, when the startup request accepting unit accepts the startup request of said at least one other task during the execution of the first task. Therefore, it is ensured that the first task is continuously processed in real time in the operation mode with the lowest function, and thus discontinuous reproduction of sound can be avoided. Also, the operation mode determining unit can further include: a startup request accepting unit operable to accept a startup request of respective one of the tasks; and a startup disabling unit operable to disable the startup of at least one other task than the first task, when the startup request accepting unit accepts the startup request of said at least one other task during the execution of the first task. Therefore, the change of the operation mode for the first task is avoided, and thus sound reproduction processing can be continued with constant sound quality.
[0021] In addition, the operation mode determining unit further includes: a command number calculating unit operable to calculate the number of commands which are assignable to the execution of the first task to be started up after the status change; and a comparing unit operable to compare the number of commands calculated by the command number calculating unit and the number of commands required for the execution of the first task in respective one of the operation modes, and the operation mode determining unit may determine the operation mode for the first task based on the result of comparison made by the comparing unit. In this case, the operation mode determining unit can further include: a startup request accepting unit operable to accept a startup request of said respective one of the tasks; and a disabling unit operable to disable the startup of at least one other task than the first task if the number of commands calculated by the command number calculating unit is less than a threshold set for the operation mode with the lowest function for the first task, when the startup request accepting unit accepts the startup request of said at least one other task during the execution of the first task. Therefore, it is also ensured that the first task is continuously processed in real time in the operation mode with the lowest function of the first task, and thus discontinuous reproduction of sound can be avoided. Also, the operation mode determining unit can further include: a startup request accepting unit operable to accept a startup of said respective one of the tasks; and a disabling unit operable to disable the startup of at least one other task than the first task, when the startup request accepting unit accepts the startup request of said at least one other task during the execution of the first task. Therefore, the change of the operation mode for the first task is avoided, and thus sound reproduction processing can be continued with constant sound quality.
[0022] Furthermore, the mode controlling unit may set for the first task a parameter that is associated with the operation mode determined by the operation mode determining unit, and cause the processor to execute the first task in the operation mode corresponding to the parameter. Therefore, the operation mode for the first task can be easily transitioned by a simple process of setting a parameter, and thus the load and the number of commands can be changed.
[0023] In addition, in order to solve the above-mentioned problem, the music data reproduction device according to the present invention is a music data reproduction device comprising a multitask control device for causing a processor to execute concurrently a plurality of tasks including a music reproduction task having a plurality of operation modes, wherein the multitask control device includes: a judging unit operable to judge whether the music reproduction task should be started up or not; and a mode controlling unit operable to cause the processor to execute the music reproduction task in one of the operation modes in which the music reproduction task reproduces music with highest sound quality within the limit of processor capacity, when the judging unit judges that the first task should be started up. More specifically, the music data reproduction device has portability, and at least one other task than the music reproduction task which is executed concurrently by the processor can be one of TV view, browsing, e-mailing and telephone calling. Therefore, a device with high portability such as a cell phone can be used as a high quality music data reproduction device concurrently with TV view, browsing, e-mailing and telephone calling.
[0024] As described above, according to the present invention, when there is enough operational resources, high quality audio signal processing can be performed, and even if there is no spare operational resources, the use of the operational resources can be reduced and the processing can be performed with the highest sound quality within the limit of the processing capacity of the processor. Therefore, the practical value of the present invention is extremely high.
[0025] Note that the present invention can be realized as a multitask control method including steps executed by all the units included in the multitask control device, or as a program for having a computer function as these units. In addition, the program can, of course, be widely distributed via a recording medium such as a DVD and a transmission medium such as the Internet.
[0026] As further information about technical background to this application, Japanese Patent Application No. 2002-180629 filed Jun. 20, 2002 is incorporated herein by reference.
[0027] These and other objects, advantages and features of the invention will become apparent from the following description thereof taken in conjunction with the accompanying drawings that illustrate a specific embodiment of the invention. In the Drawings:
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052] The multitask control device according to the embodiments of the present invention will be explained below with reference to the figures.
[0053] (First Embodiment)
[0054]
[0055] The multitask control device
[0056] The first task
[0057] More specifically speaking, when the parameter value is “1”, the first task
[0058] The second task
[0059] The third task
[0060] The processor
[0061] The task management unit
[0062] Upon receipt of the notification of the status change of the tasks, that is, the scheduled startup or stop of the tasks, from the task management unit
[0063]
[0064] AAC has a scalable structure so as to reproduce sound even if a part of a bit stream of an encoded audio signal is used, and in AAC, an algorithm questing for top quality can be adopted like a professional-grade encoder by combining a plurality of different algorithms, that is, all the tools, or an algorithm for lower quality than the professional-grade encoder, like an SD player, or an algorithm for still lower quality than the SD player, like an portable CD player, can be adopted by omitting a part of the tools (such as a prediction tool) or simplifying the tools.
[0065] For example, for high quality audio encoding, the processing called a psychoacoustic model imitating a masking phenomenon of human hearing is performed to improve the auditory sound quality (See AAC). However, an enormous number of commands are required for performing encoding processing for obtaining reproduced sound which is approximately same as the original sound, and thus a great deal of load is required for this encoding processing. On the contrary, if this processing is simplified, the sound quality is gradually lowered according to the simplification level, while the number of commands is sharply reduced, and thus the load required for this processing can be substantially reduced. In such a case, the program for performing encoding processing for obtaining reproduced sound which is approximately same as the original sound in full consideration of the psychoacoustic model is the operation mode A. The mode for performing the simplified processing of the first task is the operation mode B, and the mode for performing the still more simplified processing of the task is the operation mode C.
[0066] In addition, for high quality audio encoding, in order to suppress the compression distortion to the level as negligible for human hearing as possible, the encoding parameters are repeatedly changed or modified for compression (See AAC). This processing also requires a great deal of load. On the other hand, if this processing is simplified, the sound quality is gradually lowered according to the simplification level, while the load can be substantially reduced. In such a case, the mode for repeating change or modification of the encoding parameters many times is the operation mode A, and the modes for performing more simplified processing are the operation modes A and B.
[0067] More specifically, for the program of the operation mode A, the auditory characteristics are considered, such as variable minimum audible levels by frequency components (the so-called loudness characteristic), the masking characteristic, and insensitivity to absolute time deviation or phase lag. For example, the degree of raising levels in the lower and higher frequency bands is changed by changing the filter characteristic according to the audio signal levels, or the quantization noises are reduced by convoluting the audio signal along the line of the masking characteristic expressed in the Bark scale on the frequency axis (that is, the masking characteristic in which the masking range is narrowed in the lower frequency part and widened in the higher frequency part) according to the audio signal levels (amplitudes) and masking the lower level signal in the vicinity of the audio signal. Similarly, for the program of the operation mode B, the load per unit time is substantially reduced compared with that in the operation mode A by making the range of the masking characteristic same in both lower and higher frequency bands, for example. In addition, for the program of the operation mode C, the load per unit time is slightly reduced compared with that in the operation mode B by building up the levels in the lower and higher frequency bands using the same filter characteristic regardless of audio signal levels.
[0068]
[0069] The operation mode setting table
[0070] This operation mode setting table
[0071] Note that in this operation mode setting table
[0072] In addition, the operation mode setting table
[0073]
[0074] When detecting a change of task status such as a new task startup and a task stop due to an event occurrence (S
[0075] Upon receipt of the notification, the mode setting unit
[0076] By repeating these processes (S
[0077]
[0078] Before the time T1 shown in
[0079] As described above, while the load of only 30MIPS is put on the processor
[0080]
[0081] If the task management unit
[0082] Accordingly, while only the load of 30MIPS+150MIPS=180MIPS is put on the processor in the conventional art, as described above, much more load is put in the first embodiment to increase the operating efficiency of the processor
[0083]
[0084] Before the time T4 shown in
[0085] Next, it is assumed that the task management unit
[0086] Next, it is assumed that the task management unit
[0087] So, the mode setting unit
[0088] In other words, since the processor
[0089] Next, it is assumed that the task management unit
[0090] Next, it is assumed that the task management unit
[0091] As described above, according to the first embodiment of the present invention, operation modes for putting different load values per unit time, for high, medium and low quality sound, on the processor
[0092] In the first embodiment, the operation in the case where three tasks occur concurrently has been explained, but the present invention can be applied, based on the first embodiment, to the case where two tasks, or four or more tasks occur concurrently. Specifically, a plurality of operation modes, with different load values required for the processing per unit time, are switched for the first task, depending on the concurrence status of the tasks. The index for judging the switch of the operation modes for the first task is the total sum of the load of the running tasks other than the first task. If there is much spare capacity in the processor even with the total sum of the load being put on, the maximum load is given to the first task within that much spare capacity limit of the processor for high performance processing, and if there is not so much spare capacity in the processor with the total sum of the load being put on, the maximum load is given to the first task within such less capacity limit of the processor for high-speed processing.
[0093] In the first embodiment, the mode setting unit
[0094] In the first embodiment, the total sum of the load of the running tasks other than the first task is used as an index for judging the switch of the operation modes for the first task, but it is possible to use the total sum of the operational amount required for the processing of the running tasks other than the first task, or the total number of commands included in the programs that form the running tasks other than the first task.
[0095] The number of the running tasks other than the first task may also be used. In this case, the operation mode may be determined and set in the manner as such the operation mode A for the number of other running tasks “0”, the operation mode B for “1” and the operation mode C for “2”. It is very easy to determine and set the operation mode.
[0096] In the first embodiment, three operation modes are available for the first task
[0097] In the first embodiment, a plurality of operation modes with different load values are available for only the first task
[0098] In the first embodiment, the first task
[0099] In this case, there is no need to create one program for changing operation modes according to parameters, existing software can be reused, and thus recycling of existing resources are promoted.
[0100] In addition, in the first embodiment, the present invention is applied to the case where the first task is audio signal encoding, but it can be applied to audio signal reproduction. For example, the present invention may be applied to a virtual surround function in the audio signal reproduction. The virtual surround function is realized by a digital filter with a plurality of taps. For that purpose, if the program is formed so that the numbers of taps (the numbers of FIR filter coefficients) are 8192 (2 to the 13th power) for the operation mode A, 128 (2 to the 7th power) for the operation mode B, and 32 (2 to the 5th power) for the operation mode C, for instance, the operation mode A is set to put more load when concurrent tasks are few in number, and thus the virtual surround effect for enlarging the acoustic field can be maximized. On the contrary, when concurrent tasks are large in number, if the operation modes B and C are set in this order, the virtual surround effect can be gradually degraded.
[0101] (Second Embodiment)
[0102]
[0103] The multitask control device
[0104] The multitask control device
[0105] The task management unit
[0106] The mode setting unit
[0107]
[0108] As shown in this figure, the operation mode determination table
[0109] The first task
[0110] The second task
[0111] As a threshold, a value (140MIPS) which enables real-time decoding of audio data is set for reproducing sound continuously.
[0112]
[0113] As shown in this figure, a cell phone exit
[0114] Here, the recording medium ex
[0115] The task management unit
[0116] Next, the operation of the task management unit
[0117]
[0118] This task startup and stop processing is performed at predetermined time intervals.
[0119] In this processing, the task management unit
[0120] On the other hand, if the task startup request is not received (No in S
[0121] If the task stop request is not received (No in S
[0122]
[0123] In this music reproduction task startup control processing, the task management unit
[0124] On the other hand, if there is the other running task (No in S
[0125] On the other hand, if the assignable processing amount is not the threshold or more, that is, less than the threshold (No in S
[0126]
[0127] When the other task startup request is received, the task management unit
[0128] On the other hand, if the music reproduction task is not running in the concurrence disabling mode, that is, it is running in the concurrence enabling mode (No in S
[0129] On the other hand, if the music reproduction task is not started up (No in S
[0130]
[0131] When the other task stop request is received, the task management unit
[0132] If the music reproduction task is running (Yes in S
[0133] On the other hand, if the task is not running in the concurrence disabling mode (No in S
[0134]
[0135] No task is started up before the time T10 as shown in
[0136] Next, it is assumed that the task management unit