JP3569592B2 - Codec - Google Patents

Codec Download PDF

Info

Publication number
JP3569592B2
JP3569592B2 JP03248596A JP3248596A JP3569592B2 JP 3569592 B2 JP3569592 B2 JP 3569592B2 JP 03248596 A JP03248596 A JP 03248596A JP 3248596 A JP3248596 A JP 3248596A JP 3569592 B2 JP3569592 B2 JP 3569592B2
Authority
JP
Japan
Prior art keywords
bus
pcm data
memory
buffer means
memory block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP03248596A
Other languages
Japanese (ja)
Other versions
JPH09231160A (en
Inventor
典雄 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP03248596A priority Critical patent/JP3569592B2/en
Publication of JPH09231160A publication Critical patent/JPH09231160A/en
Application granted granted Critical
Publication of JP3569592B2 publication Critical patent/JP3569592B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
この発明は、音声信号等の比較的長時間に亙る信号の符復号処理に好適な符復号装置に関する。
【0002】
【従来の技術】
現在、各種の分野においてマルチメディア化が進められており、ユーザに提供する情報の種類の豊富化、情報の提供形態の豊富化が図られている。パーソナルコンピュータ等の機器に関しても、古くからPCM音源等を搭載したものが各種提供されていたが、最近では、楽音のみならず、人の音声や音楽等を再生あるいは記録する機能を備えたものが提供されている。ここで、人の声や音楽等は、楽音などに比較すると持続時間が極めて長いため、記録・再生のための専用のハードウェアをパーソナルコンピュータ等に搭載することとなる。
【0003】
図2はかかるハードウェアをパーソナルコンピュータに適用した例を示すものである。この図において、1はパーソナルコンピュータのCPU、2はRAM等によるメモリ、3はCODEC(Coder−Decoder;符復号装置)、4はDMAC(Direct Memory Access Controller)、5は以上の各部を接続するバスである。
【0004】
このパーソナルコンピュータでは、メモリ2内に確保された所定サイズの記憶エリアをバッファとして使用し、ハードディスク装置(図示略)等から再生されたPCM音声データをCODEC3を介して連続的なアナログ信号に変換して出力する処理あるいは逆に外部からのアナログ信号をCODEC3によってPCM音声データに変換し、ハードディスク装置等に格納する処理を実行することが可能である。
【0005】
CODEC3は、マイクロホン等の入力装置(図示略)を介して得られる外界の音のアナログ音声信号をサンプリングすると共にPCM符号化し、PCM音声データとしてパーソナルコンピュータ内部へ取り込む符号化処理と、パーソナルコンピュータ内部で生成されたPCM音声データをアナログ音声信号に変換し、スピーカ等の出力装置へ供給する復号処理を行う手段である。
【0006】
この符号化処理および復号処理は、メモリ2およびCODEC3間のPCM音声データの伝送とは全く非同期に一定のサンプリング周波数のクロックに従って連続的に行う必要がある。このため、CODEC3には、符号化処理あるいは復号処理とCODEC3に対するPCM音声データの入出力動作とのタイミング上のずれを吸収するためのバッファが内蔵されている。
【0007】
また、CODEC3とメモリ2との間のPCM音声データの伝送はDMA転送により行われる。このDMA転送はDMAC4の制御下で行われる。
【0008】
このような構成において、外部へ音声を出力する処理は次のようにして行われる。まず、CPU1により、例えばハードディスク装置から所定量のPCM音声データが読み出されてメモリ2に格納され、このPCM音声データのメモリ2における格納開始アドレス、データサイズ等、DMA転送の制御に必要な情報がDMAC4に設定される。また、CPU1により、PCM音声データをD/A変換する際のサンプリング周波数等、復号処理の制御に必要な情報がCODEC3に設定される。
【0009】
以上の初期設定が完了すると、DMA転送が開始される。すなわち、DMAC4により、メモリ2内のPCM音声データが先頭のものから順に1バイトずつ読み出されてCODEC3に供給される。この結果、CODEC3のバッファ内がPCM音声データによって満たされる。そして、CODEC3では、上記初期設定により設定されたサンプリング周波数のクロックが発生され、このクロックに同期し、バッファ内のPCM音声データがアナログ音声信号に順次変換され、外部へ出力される。バッファ内の未処理のPCM音声データが残り少なくなると、CODEC3からDMAC4へその旨を示す信号が送られる。この結果、DMAC4により新たなPCM音声データがメモリ2から読み出され、CODEC3に供給される。以後、同様に、CODEC3のバッファ内のPCM音声データが残り少なくなる毎にメモリ2からCODEC3へのPCM音声データのDMA転送が行われる。
【0010】
メモリ2内のPCM音声データのDMA転送が終了すると、DMAC4からCPU1に割込信号が送られる。この結果、CPU1により、再び所定量のPCM音声データがメモリ2に格納され、DMA転送の制御に必要な情報がDMAC4に設定される。そして、上述と同様、PCM音声データのDMA転送が行われ、このPCM音声データが一定のサンプリング周波数でアナログ音声信号に変換される。以上の動作が繰り返されることにより、長時間に及ぶ音声が再生される。
【0011】
一方、外部から取り込んだ音声をPCM音声データとしてハードディスク装置等に格納する処理は、次のようにして行われる。まず、上述と同様、メモリ2内の所定サイズの記憶エリアがPCM音声データを一時記憶するためのバッファとして使用されるが、この記憶エリアを指定する情報がDMAC4に設定される。また、上述と同様にCODEC3の初期設定が行われる。
【0012】
そして、初期設定が完了すると、CODEC3では、上記初期設定により設定されたサンプリング周波数のクロックが発生され、このクロックに同期し、外部からのアナログ音声信号がPCM音声データに順次変換され、バッファ内に蓄積される。そして、バッファ内に所定量のPCM音声データが溜まると、CODEC3からDMAC4へその旨を示す信号が送られる。この結果、DMAC4によりCODEC3のバッファ内のPCM音声データが読み出され、メモリ2にDMA転送される。以後、同様に、CODEC3のバッファ内に所定量のPCM音声データが溜まる毎にCODEC3からメモリ2へのPCM音声データのDMA転送が行われる。
【0013】
メモリ2内のPCM音声データ用の記憶エリアがPCM音声データによって満たされると、DMAC4からCPU1に割込信号が送られる。この結果、CPU1により、メモリ2内のPCM音声データが読み出され、ハードディスク装置等に送られる。そして、上述と同様、PCM音声データのDMA転送が行われる。以上の動作が繰り返されることにより、長時間に及ぶ音声がハードディスク装置等に録音される。
【0014】
【発明が解決しようとする課題】
ところで、上述した従来の技術のうちDMACを使用したものは、システムが複雑であるためコストが嵩むという問題があった。また、CODECとDMACとの間で制御信号の授受を行うことにより、DMACによるPCM音声データのDMA転送を行っていたため、制御が複雑であると同時に非効率的であるという問題があった。
【0015】
この発明は、以上説明した事情に鑑みてなされたものであり、効率的に外部との間の情報の授受および該情報についての符復号処理を行うことができる符復号装置を提供することを目的としている。
【0016】
【課題を解決するための手段】
請求項1に係る発明は、バスを介してメモリに接続され、外部から取り込んだアナログ信号を指定されたサンプリング周波数で符号化し、この符号化により得られるPCMデータを前記バスを介して前記メモリに供給する処理と、前記バスを介して前記メモリからPCMデータを順次取り込み、該PCMデータを、指定されたサンプリング周波数でアナログ信号に変換して外部へ出力する処理を行う符復号装置において、
外部から取り込んだアナログ信号を符号化して得たPCMデータを蓄積するための第1のバッファ手段と、
前記メモリから取り込んだ、アナログ信号に変換すべきPCMデータを蓄積するための第2のバッファ手段と、
前記第1のバッファ手段に蓄積されたPCMデータを前記メモリに供給する場合には、前記バスに接続されたCPUが前記メモリに所定サイズのメモリブロックを確保した後、前記第1のバッファ手段に所定量のPCMデータが蓄積される毎に前記バスの使用権を獲得し、前記第1のバッファ手段に所定量の空きエリアが確保されるまで前記第1のバッファ手段からPCMデータを読み出して前記バスを介して前記メモリブロックへ転送し、前記バスの使用権を解放する処理を繰り返すとともに、前記メモリブロックがPCMデータにより満たされると、前記CPUに新たなメモリブロックの確保を要求する割込信号を送る一方、
前記第2のバッファ手段に蓄積されたPCMデータをアナログ信号に変換して外部へ出力する場合には、前記バスに接続されたCPUが前記メモリに所定サイズのメモリブロックを確保して当該メモリブロックにPCMデータを格納した後、前記第2のバッファ手段に所定量の空きエリアが確保される毎に前記バスの使用権を獲得し、前記第2のバッファ手段に所定量のPCMデータが蓄積されるまで前記メモリブロックからPCMデータを読み出して前記バスを介して前記第2のバッファ手段に転送し、前記バスの使用権を解放する処理を繰り返すとともに、前記メモリブロック内のPCMデータが全て読み出されると、新たなPCMデータを前記メモリブロックに格納するよう前記CPUに要求する割込信号を送るバスコントローラとを具備することを特徴とする符復号装置を要旨とする。
【0017】
請求項2に係る発明は、前記バスコントローラは、前記第2のバッファ手段に蓄積されたPCMデータをアナログ信号に変換して外部へ出力する場合には、前記確保されたメモリブロックの開始アドレスとその範囲を示す情報とを前記CPUから取得し、当該取得した開始アドレスとその範囲を示す情報とに基づいて前記メモリブロックからPCMデータを読み出すことを特徴とする請求項1記載の符復号装置を要旨とする。
【0019】
【発明の実施の形態】
以下、本発明を更に理解しやすくするため、実施の形態について説明する。
かかる実施の形態は、本発明の一態様を示すものであり、この発明を限定するものではなく、本発明の範囲で任意に変更可能である。
【0020】
図1はこの発明の一実施形態であるCODEC3aを使用したパーソナルコンピュータの構成を示すブロック図である。本実施形態は、上記図2に示す構成においてDMAC4を取り除き、CODEC3の代りにCODEC3aを使用した構成となっている。このCODEC3aは、CPUインタフェース31、バスコントローラ32、再生FIFO33、録音FIFO34、D/A変換器35およびA/D変換器36により構成されている。
【0021】
上述した図2の構成では、アドレス情報の発生等、メモリ2をアクセスするための制御はDMAC4により行われ、一方、外部の装置との間のアナログ音声信号の授受、符号化処理および復号処理はCODEC3により行われるため、メモリ2に対するアクセスとCODEC3内での処理とが歩調を合わせて進行するようにDMAC4とCODEC3との間で頻繁に制御情報の授受を行う必要があった。しかしながら、本実施形態では、これらの各処理はすべてCODEC3aによって行われ、各処理の制御はバスコントローラ32により行われる。また、本実施形態では、バス5として、PCIバス等の高速バスを使用する。
【0022】
以下、本実施形態の動作を説明する。まず、外部へ音声を出力する場合、CPU1により、メモリ2内の所定サイズのメモリブロックが確保される。そして、ハードディスク装置等から所定量のPCM音声データが読み出され、このメモリブロックに格納される。次にCPU1により、上記メモリブロックの開始アドレス、範囲およびPCM音声データのデータビット数、D/A変換をする際のサンプリング周波数等の情報が出力され、これらの情報がCODEC3a内のCPUインタフェース31を介しバスコントローラ32に設定される。
【0023】
この初期設定が完了すると、バスコントローラ32により、バス5の使用権が獲得される。そして、上記開始アドレスを初期値として読み出しアドレスが順次出力され、上記メモリブロック内のPCM音声データが先頭のものから順に1バイトずつ読み出される。この読み出された一連のPCM音声データはバス5を介して再生FIFO33に蓄積される。一定量のPCM音声データの蓄積が完了すると、バス5は解放される。一方、バスコントローラ32により、上記初期設定により設定されたサンプリング周波数を有するサンプリングクロックが発生される。そして、このサンプリングクロックに同期し、再生FIFO33からPCM音声データが取り出され、D/A変換器35によってアナログ音声信号に変換され、外部の装置へ出力される。この出力動作が進められることにより、再生FIFO33内に蓄積されたPCM音声データの数が減ってゆくこととなるが、再生FIFO33内の空き状況はバスコントローラ32により監視される。そして、再生FIFO33内に一定の空きエリアが生じると、バスコントローラ32により、再び上記メモリブロックからPCM音声データが読み出され、再生FIFO33に補充される。以下、同様に、再生FIFO33内に一定の空きエリアが生じる毎に、メモリブロックからPCM音声データが読み出され、再生FIFO33に補充される。
【0024】
メモリ2内のPCM音声データがすべて読み出されると、バスコントローラ32からCPUインタフェース31を介してCPU1へ割込信号が送られる。この結果、再び所定量のPCM音声データがメモリ2内のメモリブロックに格納され、メモリブロックの開始アドレス、範囲等の情報がバスコントローラ32に設定される。そして、上述と同様、PCM音声データの再生FIFO33への供給が行われ、このPCM音声データが一定のサンプリング周波数でアナログ音声信号に変換される。以上の動作が繰り返されることにより、長時間に及ぶ音声が再生される。
【0025】
一方、外部から取り込んだ音声をPCM音声データとしてハードディスク装置等に格納する処理は、次のようにして行われる。まず、CPU1により、メモリ2内の所定サイズのメモリブロックがPCM音声データを一時記憶するためのバッフとして確保される。そして、このメモリブロックの開始アドレス、範囲を指定する情報およびPCM音声データのビット数、A/D変換の際のサンプリング周波数を指定する情報が出力され、CODEC3a内のバスコントローラ32に初期設定される。
【0026】
そして、初期設定が完了すると、上記初期設定により設定されたサンプリング周波数のサンプリングクロックがバスコントローラ32により発生される。A/D変換器36では、このサンプリングクロックに同期し、外部からのアナログ音声信号がPCM音声データに順次変換され、録音FIFO34に蓄積される。そして、録音FIFO34内に所定量のPCM音声データが溜まると、バスコントローラ32によりバス5の使用権が獲得される。そして、録音FIFO34内のPCM音声データが読み出され、バス5を介して上記メモリブロックに順次書き込まれる。録音FIFO34内に一定の空きエリアが確保されると、メモリブロックに対するPCM音声データの供給が停止され、バス5が解放される。以後、同様に、録音FIFO34内に所定量のPCM音声データが溜まる毎に、バスコントローラ32によって録音FIFO34からPCM音声データが読み出され、メモリブロックに格納される。
【0027】
上記メモリブロックがPCM音声データによって満たされると、バスコントローラ32からCPUインタフェース31を介してCPU1に割込信号が送られる。この結果、CPU1により、新たな別のメモリブロックが確保され、このメモリブロックの開始アドレス、範囲を指定する情報がバスコントローラ32に設定される。そして、以後は、この新たに確保されたメモリブロックに録音FIFO34から読み出されるPCM音声データが格納される。この新たなメモリブロックへのPCM音声データの格納が行われる間に、それまでに使用されていたメモリブロックからPCM音声データが読み出され、ハードディスク装置等に格納される。新たに確保されたメモリブロックがPCM音声データによって満たされた場合には、再びメモリブロックの確保が行われ、上述の動作が繰り返される。
【0028】
以上、CODEC3a内に再生FIFOおよび録音FIFOを設けた構成を例に説明したが、これらのFIFOを設けず、サンプリングクロックが発生される毎にメモリ2とD/A変換器35またはA/D変換器36との間でPCM音声データの授受を行うようにしてもよい。ただし、この構成の場合、PCM音声データの授受を1回行う毎に、バスの使用権の獲得等の制御が必要となり、データ転送をすることができない無駄な時間が生じてしまう。また、他のデバイスがバスを長時間使用した場合に、バスコントローラ32がバスの使用権を獲得できず、メモリ内のPCM音声データのうち一部が読み出されなかったり(アンダーラン)、CODEC3aによって発生されたPCM音声データの一部がメモリに書き込まれなかったりするおそれがある(オーバーラン)。従って、バスの使用効率、再生・録音の動作を確実なものにするためには、FIFOを設けた構成の方が望ましい。
【0029】
以上、本発明をPCM音声データの再生・録音機能の両方に適用した実施形態について説明したが、再生機能のみに適用してもよい。すなわち、PCM音声データをアナログ信号に変換して外部に出力する際に、バスコントローラによる制御の下、バスの使用権を獲得し、このバスを介して変換対象たるPCM音声データを取得するようにしてもよい。この場合、メモリから読み出されるPCM音声データのみならず、CPUがソフトウェアを実行することにより生成されるPCM音声データをも含めて上記バスコントローラによる制御下で取得するようにすると効果的である。
【0030】
【発明の効果】
以上説明したように、この発明によれば、符号化処理、復号処理に伴って必要となるバスの使用権の獲得、メモリとの間のPCMデータの授受が、すべて符復号装置内のバスコントローラの制御の下で行われるため、制御に無駄がなく、効率的に符号化処理、復号処理およびPCMデータの記憶・再生を行うことができるという効果がある。また、DMACを別途設ける必要がないため、装置全体のコストを低減することができるという効果がある。
【図面の簡単な説明】
【図1】この発明の一実施形態であるCODECを使用したパーソナルコンピュータの構成を示すブロック図である。
【図2】従来の技術を示す図である。
【符号の説明】
1……CPU、2……メモリ、5……バス、
3a……CODEC(符復号装置)、31……CPUインタフェース、
32……バスコントローラ、33……再生FIFO(バッファ手段)、
34……録音FIFO(バッファ手段)、
35……D/A変換器、36……A/D変換器。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a codec suitable for codec processing of a signal such as an audio signal for a relatively long time.
[0002]
[Prior art]
2. Description of the Related Art At present, multimedia is being promoted in various fields, and the types of information to be provided to users and the types of information provision are being enriched. Various types of personal computers and other devices equipped with a PCM sound source and the like have been provided for a long time. Recently, however, devices having a function of reproducing or recording not only musical sounds but also human voices and music have been provided. Are provided. Here, since the duration of human voice, music, and the like is much longer than that of musical sounds, dedicated hardware for recording and reproduction is mounted on a personal computer or the like.
[0003]
FIG. 2 shows an example in which such hardware is applied to a personal computer. In this figure, 1 is a CPU of a personal computer, 2 is a memory such as a RAM, 3 is a CODEC (Code-Decoder; codec), 4 is a DMAC (Direct Memory Access Controller), and 5 is a bus connecting the above components. It is.
[0004]
In this personal computer, a storage area of a predetermined size secured in the memory 2 is used as a buffer, and PCM audio data reproduced from a hard disk device (not shown) is converted into a continuous analog signal via a CODEC 3. It is possible to execute a process of converting an external analog signal into PCM audio data by the CODEC 3 and storing the same in a hard disk device or the like.
[0005]
The CODEC 3 samples an analog audio signal of an external sound obtained through an input device (not shown) such as a microphone and performs PCM encoding on the sampled audio signal. The encoding process takes in PCM audio data into the personal computer. This is a means for performing a decoding process of converting the generated PCM audio data into an analog audio signal and supplying it to an output device such as a speaker.
[0006]
The encoding process and the decoding process need to be continuously performed according to a clock of a fixed sampling frequency completely asynchronously with the transmission of the PCM audio data between the memory 2 and the CODEC 3. For this reason, the CODEC 3 has a built-in buffer for absorbing a timing difference between the encoding process or the decoding process and the input / output operation of the PCM audio data to the CODEC 3.
[0007]
The transmission of PCM audio data between the CODEC 3 and the memory 2 is performed by DMA transfer. This DMA transfer is performed under the control of the DMAC 4.
[0008]
In such a configuration, the process of outputting sound to the outside is performed as follows. First, the CPU 1 reads a predetermined amount of PCM audio data from, for example, a hard disk device and stores it in the memory 2. Information necessary for controlling DMA transfer, such as a storage start address of the PCM audio data in the memory 2 and a data size. Is set to DMAC4. In addition, the CPU 1 sets information necessary for controlling the decoding process, such as a sampling frequency when the PCM audio data is D / A converted, in the CODEC 3.
[0009]
When the above initialization is completed, the DMA transfer is started. That is, the PCM audio data in the memory 2 is read one byte at a time in order from the first one by the DMAC 4 and supplied to the CODEC 3. As a result, the buffer of the CODEC 3 is filled with the PCM audio data. Then, in the CODEC 3, a clock having the sampling frequency set by the initial setting is generated, and in synchronization with this clock, the PCM audio data in the buffer is sequentially converted into an analog audio signal and output to the outside. When the amount of unprocessed PCM audio data in the buffer becomes small, a signal indicating that fact is sent from the CODEC 3 to the DMAC 4. As a result, new PCM audio data is read from the memory 2 by the DMAC 4 and supplied to the CODEC 3. Thereafter, similarly, whenever the PCM audio data in the buffer of the CODEC 3 becomes small, the DMA transfer of the PCM audio data from the memory 2 to the CODEC 3 is performed.
[0010]
When the DMA transfer of the PCM audio data in the memory 2 ends, an interrupt signal is sent from the DMAC 4 to the CPU 1. As a result, the CPU 1 stores a predetermined amount of PCM audio data in the memory 2 again, and sets information necessary for DMA transfer control in the DMAC 4. Then, similarly to the above, the DMA transfer of the PCM audio data is performed, and the PCM audio data is converted into an analog audio signal at a fixed sampling frequency. By repeating the above operation, a sound for a long time is reproduced.
[0011]
On the other hand, the process of storing the voice fetched from outside as PCM voice data in a hard disk device or the like is performed as follows. First, as described above, a storage area of a predetermined size in the memory 2 is used as a buffer for temporarily storing PCM audio data, and information designating this storage area is set in the DMAC 4. Further, the initial setting of the CODEC 3 is performed in the same manner as described above.
[0012]
When the initialization is completed, the CODEC 3 generates a clock having the sampling frequency set by the above-described initialization, and in synchronization with this clock, an external analog audio signal is sequentially converted into PCM audio data and stored in the buffer. Stored. When a predetermined amount of PCM audio data is accumulated in the buffer, a signal indicating that fact is sent from CODEC 3 to DMAC 4. As a result, the PCM audio data in the buffer of the CODEC 3 is read by the DMAC 4 and DMA-transferred to the memory 2. Thereafter, similarly, every time a predetermined amount of PCM audio data is accumulated in the buffer of the CODEC 3, DMA transfer of the PCM audio data from the CODEC 3 to the memory 2 is performed.
[0013]
When the storage area for the PCM audio data in the memory 2 is filled with the PCM audio data, the DMAC 4 sends an interrupt signal to the CPU 1. As a result, the PCM audio data in the memory 2 is read by the CPU 1 and sent to a hard disk device or the like. Then, similarly to the above, the DMA transfer of the PCM audio data is performed. By repeating the above operation, a long-lived sound is recorded on the hard disk device or the like.
[0014]
[Problems to be solved by the invention]
By the way, among the above-mentioned conventional techniques, those using DMAC have a problem that the cost is increased due to the complexity of the system. In addition, since control signals are exchanged between the CODEC and the DMAC to perform DMA transfer of PCM voice data by the DMAC, there is a problem that control is complicated and inefficient.
[0015]
The present invention has been made in view of the circumstances described above, and has as its object to provide a codec that can efficiently transmit and receive information to and from the outside and perform codec processing on the information. And
[0016]
[Means for Solving the Problems]
The invention according to claim 1 is connected to a memory via a bus, encodes an analog signal fetched from the outside at a designated sampling frequency, and transmits PCM data obtained by the encoding to the memory via the bus. A codec device that performs a process of supplying and a process of sequentially taking in PCM data from the memory via the bus, converting the PCM data into an analog signal at a specified sampling frequency, and outputting the analog signal to the outside;
First buffer means for storing PCM data obtained by encoding an analog signal taken from the outside;
Second buffer means for storing PCM data to be converted into an analog signal, which is fetched from the memory;
When supplying the PCM data accumulated in the first buffer means to the memory, the CPU connected to the bus secures a memory block of a predetermined size in the memory, and then transmits the data to the first buffer means. Each time a predetermined amount of PCM data is accumulated, the right to use the bus is acquired, and the PCM data is read from the first buffer means until the predetermined amount of free area is secured in the first buffer means. An interrupt signal for requesting the CPU to secure a new memory block when the memory block is filled with PCM data while repeating the process of transferring to the memory block via the bus and releasing the right to use the bus. While sending
When converting the PCM data stored in the second buffer means to an analog signal and outputting the analog signal to the outside, the CPU connected to the bus secures a memory block of a predetermined size in the memory, and After the PCM data is stored in the second buffer means, every time a predetermined amount of free area is secured in the second buffer means, the right to use the bus is acquired, and the predetermined amount of PCM data is accumulated in the second buffer means. Until the PCM data is read from the memory block and transferred to the second buffer means via the bus, the process of releasing the right to use the bus is repeated, and all the PCM data in the memory block is read. When, and a bus controller for sending an interrupt signal for requesting the CPU to store the new PCM data to said memory block And gist codec device, characterized by Bei.
[0017]
In the invention according to claim 2, when the bus controller converts the PCM data stored in the second buffer means into an analog signal and outputs the analog signal to the outside, the bus controller determines the start address of the secured memory block. 2. The codec according to claim 1, wherein information indicating the range is obtained from the CPU, and PCM data is read from the memory block based on the obtained start address and information indicating the range. Make a summary.
[0019]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments will be described to make the present invention easier to understand.
These embodiments show one aspect of the present invention, and do not limit the present invention, and can be arbitrarily changed within the scope of the present invention.
[0020]
FIG. 1 is a block diagram showing the configuration of a personal computer using a CODEC 3a according to an embodiment of the present invention. This embodiment has a configuration in which the DMAC 4 is removed from the configuration shown in FIG. 2 and a CODEC 3 a is used instead of the CODEC 3. The CODEC 3a includes a CPU interface 31, a bus controller 32, a reproduction FIFO 33, a recording FIFO 34, a D / A converter 35, and an A / D converter 36.
[0021]
In the configuration of FIG. 2 described above, control for accessing the memory 2, such as generation of address information, is performed by the DMAC 4. On the other hand, transmission / reception of an analog audio signal with an external device, encoding processing, and decoding processing are performed. Since it is performed by the CODEC 3, it is necessary to frequently exchange control information between the DMAC 4 and the CODEC 3 so that the access to the memory 2 and the processing in the CODEC 3 progress in step with each other. However, in the present embodiment, all of these processes are performed by the CODEC 3a, and control of each process is performed by the bus controller 32. In this embodiment, a high-speed bus such as a PCI bus is used as the bus 5.
[0022]
Hereinafter, the operation of the present embodiment will be described. First, when outputting sound to the outside, the CPU 1 secures a memory block of a predetermined size in the memory 2. Then, a predetermined amount of PCM audio data is read from a hard disk device or the like, and stored in this memory block. Next, the CPU 1 outputs information such as the start address of the memory block, the range, the number of data bits of the PCM audio data, and the sampling frequency when performing D / A conversion, and the information is transmitted to the CPU interface 31 in the CODEC 3a. This is set in the bus controller 32 via
[0023]
When this initialization is completed, the bus controller 32 acquires the right to use the bus 5. Then, read addresses are sequentially output using the start address as an initial value, and the PCM audio data in the memory block is read one byte at a time starting from the first one. The read series of PCM audio data is stored in the reproduction FIFO 33 via the bus 5. When the accumulation of a certain amount of PCM audio data is completed, the bus 5 is released. On the other hand, the bus controller 32 generates a sampling clock having the sampling frequency set by the initial setting. Then, in synchronization with the sampling clock, PCM audio data is extracted from the reproduction FIFO 33, converted into an analog audio signal by the D / A converter 35, and output to an external device. As the output operation proceeds, the number of PCM audio data stored in the reproduction FIFO 33 decreases, but the vacancy state in the reproduction FIFO 33 is monitored by the bus controller 32. When a certain free area is generated in the reproduction FIFO 33, the PCM audio data is read from the memory block again by the bus controller 32 and supplied to the reproduction FIFO 33. Hereinafter, similarly, every time a certain free area is generated in the reproduction FIFO 33, the PCM audio data is read from the memory block and is supplemented to the reproduction FIFO 33.
[0024]
When all the PCM audio data in the memory 2 has been read, an interrupt signal is sent from the bus controller 32 to the CPU 1 via the CPU interface 31. As a result, a predetermined amount of PCM audio data is stored again in the memory block in the memory 2, and information such as the start address and range of the memory block is set in the bus controller 32. Then, as described above, the PCM audio data is supplied to the reproduction FIFO 33, and the PCM audio data is converted into an analog audio signal at a fixed sampling frequency. By repeating the above operation, a sound for a long time is reproduced.
[0025]
On the other hand, the process of storing the voice fetched from outside as PCM voice data in a hard disk device or the like is performed as follows. First, the CPU 1, the memory blocks of a predetermined size in the memory 2 is secured as buffers for temporarily storing PCM audio data. Then, information specifying the start address and range of the memory block, the number of bits of the PCM audio data, and information specifying the sampling frequency at the time of A / D conversion are output and initialized in the bus controller 32 in the CODEC 3a. .
[0026]
When the initialization is completed, the bus controller 32 generates a sampling clock having the sampling frequency set by the initialization. In the A / D converter 36, an external analog audio signal is sequentially converted into PCM audio data in synchronization with the sampling clock, and is stored in the recording FIFO 34. When a predetermined amount of PCM audio data is accumulated in the recording FIFO 34, the bus controller 32 acquires the right to use the bus 5. Then, the PCM audio data in the recording FIFO 34 is read and sequentially written to the memory block via the bus 5. When a certain free area is secured in the recording FIFO 34, the supply of the PCM audio data to the memory block is stopped, and the bus 5 is released. Thereafter, similarly, every time a predetermined amount of PCM audio data accumulates in the recording FIFO 34, the bus controller 32 reads the PCM audio data from the recording FIFO 34 and stores it in a memory block.
[0027]
When the memory block is filled with the PCM audio data, an interrupt signal is sent from the bus controller 32 to the CPU 1 via the CPU interface 31. As a result, the CPU 1 secures another new memory block, and sets information specifying a start address and a range of the memory block in the bus controller 32. Thereafter, the PCM audio data read from the recording FIFO 34 is stored in the newly secured memory block. While the PCM audio data is stored in the new memory block, the PCM audio data is read from the memory block that has been used so far and stored in the hard disk device or the like. When the newly secured memory block is filled with the PCM audio data, the memory block is secured again, and the above operation is repeated.
[0028]
As described above, the configuration in which the reproduction FIFO and the recording FIFO are provided in the CODEC 3a has been described as an example. However, these FIFOs are not provided, and each time a sampling clock is generated, the memory 2 and the D / A converter 35 or A / D converter PCM audio data may be exchanged with the device 36. However, in the case of this configuration, every time transmission and reception of PCM audio data is performed once, control such as acquisition of the right to use the bus is required, and wasteful time during which data cannot be transferred occurs. Further, when another device uses the bus for a long time, the bus controller 32 cannot acquire the right to use the bus, a part of the PCM audio data in the memory is not read (underrun), or the CODEC 3a Some of the PCM audio data generated by the above may not be written to the memory (overrun). Therefore, in order to ensure the bus use efficiency and the operation of reproduction / recording, it is more preferable to provide the FIFO.
[0029]
Although the embodiment in which the present invention is applied to both the reproduction and recording functions of PCM audio data has been described above, the invention may be applied to only the reproduction function. That is, when the PCM audio data is converted to an analog signal and output to the outside, the right to use the bus is acquired under the control of the bus controller, and the PCM audio data to be converted is acquired via the bus. You may. In this case, it is effective to acquire not only the PCM audio data read from the memory but also the PCM audio data generated by the CPU executing the software under the control of the bus controller.
[0030]
【The invention's effect】
As described above, according to the present invention, the acquisition of the right to use the bus necessary for the encoding process and the decoding process, and the transfer of the PCM data to and from the memory are all performed by the bus controller in the codec. Therefore, there is an effect that the encoding process, the decoding process, and the storage and reproduction of the PCM data can be efficiently performed without wasteful control. Further, since there is no need to separately provide a DMAC, there is an effect that the cost of the entire apparatus can be reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a personal computer using a CODEC according to an embodiment of the present invention.
FIG. 2 is a diagram showing a conventional technique.
[Explanation of symbols]
1 ... CPU, 2 ... memory, 5 ... bus,
3a: CODEC (codec), 31: CPU interface,
32 bus controller 33 playback FIFO (buffer means)
34: Recording FIFO (buffer means),
35 D / A converter, 36 A / D converter.

Claims (2)

バスを介してメモリに接続され、外部から取り込んだアナログ信号を指定されたサンプリング周波数で符号化し、この符号化により得られるPCMデータを前記バスを介して前記メモリに供給する処理と、前記バスを介して前記メモリからPCMデータを順次取り込み、該PCMデータを、指定されたサンプリング周波数でアナログ信号に変換して外部へ出力する処理を行う符復号装置において、
外部から取り込んだアナログ信号を符号化して得たPCMデータを蓄積するための第1のバッファ手段と、
前記メモリから取り込んだ、アナログ信号に変換すべきPCMデータを蓄積するための第2のバッファ手段と、
前記第1のバッファ手段に蓄積されたPCMデータを前記メモリに供給する場合には、前記バスに接続されたCPUが前記メモリに所定サイズのメモリブロックを確保した後、前記第1のバッファ手段に所定量のPCMデータが蓄積される毎に前記バスの使用権を獲得し、前記第1のバッファ手段に所定量の空きエリアが確保されるまで前記第1のバッファ手段からPCMデータを読み出して前記バスを介して前記メモリブロックへ転送し、前記バスの使用権を解放する処理を繰り返すとともに、前記メモリブロックがPCMデータにより満たされると、前記CPUに新たなメモリブロックの確保を要求する割込信号を送る一方、
前記第2のバッファ手段に蓄積されたPCMデータをアナログ信号に変換して外部へ出力する場合には、前記バスに接続されたCPUが前記メモリに所定サイズのメモリブロックを確保して当該メモリブロックにPCMデータを格納した後、前記第2のバッファ手段に所定量の空きエリアが確保される毎に前記バスの使用権を獲得し、前記第2のバッファ手段に所定量のPCMデータが蓄積されるまで前記メモリブロックからPCMデータを読み出して前記バスを介して前記第2のバッファ手段に転送し、前記バスの使用権を解放する処理を繰り返すとともに、前記メモリブロック内のPCMデータが全て読み出されると、新たなPCMデータを前記メモリブロックに格納するよう前記CPUに要求する割込信号を送るバスコントローラと
を具備することを特徴とする符復号装置。
A process connected to a memory via a bus, encoding an analog signal fetched from outside at a specified sampling frequency, and supplying PCM data obtained by the encoding to the memory via the bus; A codec device for sequentially fetching PCM data from the memory via the memory, converting the PCM data into an analog signal at a designated sampling frequency, and outputting the analog signal to the outside;
First buffer means for storing PCM data obtained by encoding an analog signal taken from the outside;
Second buffer means for accumulating PCM data to be converted into an analog signal, fetched from the memory;
When supplying the PCM data accumulated in the first buffer means to the memory, the CPU connected to the bus secures a memory block of a predetermined size in the memory, and then transmits the data to the first buffer means. Each time a predetermined amount of PCM data is accumulated, the right to use the bus is acquired, and the PCM data is read from the first buffer means until the predetermined amount of free area is secured in the first buffer means. An interrupt signal for requesting the CPU to secure a new memory block when the memory block is filled with PCM data while repeating the process of transferring to the memory block via the bus and releasing the right to use the bus. While sending
When converting the PCM data stored in the second buffer means to an analog signal and outputting the analog signal to the outside, the CPU connected to the bus secures a memory block of a predetermined size in the memory, and After the PCM data is stored in the second buffer means, every time a predetermined amount of free area is secured in the second buffer means, the right to use the bus is acquired, and the predetermined amount of PCM data is accumulated in the second buffer means. Until the PCM data is read from the memory block and transferred to the second buffer means via the bus, the process of releasing the right to use the bus is repeated, and all the PCM data in the memory block is read. When, and a bus controller for sending an interrupt signal for requesting the CPU to store the new PCM data to said memory block Codec device, characterized by Bei.
前記バスコントローラは、前記第2のバッファ手段に蓄積されたPCMデータをアナログ信号に変換して外部へ出力する場合には、前記確保されたメモリブロックの開始アドレスとその範囲を示す情報とを前記CPUから取得し、当該取得した開始アドレスとその範囲を示す情報とに基づいて前記メモリブロックからPCMデータを読み出すことを特徴とする請求項1記載の符復号装置。The bus controller, when converting the PCM data stored in the second buffer means into an analog signal and outputting the analog signal to the outside, stores the start address of the secured memory block and the information indicating the range. 2. The codec according to claim 1, wherein the codec is obtained from a CPU, and the PCM data is read from the memory block based on the obtained start address and information indicating the range.
JP03248596A 1996-02-20 1996-02-20 Codec Expired - Fee Related JP3569592B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03248596A JP3569592B2 (en) 1996-02-20 1996-02-20 Codec

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03248596A JP3569592B2 (en) 1996-02-20 1996-02-20 Codec

Publications (2)

Publication Number Publication Date
JPH09231160A JPH09231160A (en) 1997-09-05
JP3569592B2 true JP3569592B2 (en) 2004-09-22

Family

ID=12360296

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03248596A Expired - Fee Related JP3569592B2 (en) 1996-02-20 1996-02-20 Codec

Country Status (1)

Country Link
JP (1) JP3569592B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5459937B2 (en) * 2007-04-19 2014-04-02 スパンション エルエルシー Integrated circuit and audio device
JP5987203B1 (en) * 2015-01-30 2016-09-07 三菱電機株式会社 A / D converter, D / A converter, and PLC

Also Published As

Publication number Publication date
JPH09231160A (en) 1997-09-05

Similar Documents

Publication Publication Date Title
JP5971550B2 (en) Audio data input device and output device
JP2003032617A (en) Data record reproducing device and method therefor
JP2009157272A (en) Audio playback device
JP2002132263A5 (en)
TW522307B (en) Data transfer apparatus, data transfer system, and data transfer method
JP3569592B2 (en) Codec
US6180864B1 (en) Tone generation device and method, and distribution medium
US20050223132A1 (en) Communication method and processor
KR0129565B1 (en) Mpeg/cd audio processing apparatus in multimedia system
JP2005190332A (en) Data transfer control unit
KR100546578B1 (en) Apparatus For Converting Digital Audio Data Format
JP3251670B2 (en) PCM audio data processing method
JP4325781B2 (en) Crypto device
JP2000259553A (en) Data processor
JP3321090B2 (en) Music reproduction method and music reproduction apparatus in information processing apparatus
JP4023332B2 (en) Recording / playback device
JP2004086439A (en) Data recording/reproducing device, and data read/write control method to its hard disk drive
JP4257656B2 (en) Audio data processing device
JP3393608B2 (en) Audio processing device
JP2001159957A (en) Method and device for controlling memory
JP2005228421A (en) Digital information recording/reproducing apparatus
JPH06230799A (en) Signal recorder
JP2604695B2 (en) Computer device with intermediate address interrupt
JP2005182967A (en) Audio information apparatus
KR100204877B1 (en) A transportation apparatus for voice data in vms

Legal Events

Date Code Title Description
A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040621

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080625

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090625

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100625

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100625

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110625

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120625

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees