JP2010124250A - A/d conversion apparatus, d/a conversion apparatus, and signal processing apparatus - Google Patents

A/d conversion apparatus, d/a conversion apparatus, and signal processing apparatus Download PDF

Info

Publication number
JP2010124250A
JP2010124250A JP2008296180A JP2008296180A JP2010124250A JP 2010124250 A JP2010124250 A JP 2010124250A JP 2008296180 A JP2008296180 A JP 2008296180A JP 2008296180 A JP2008296180 A JP 2008296180A JP 2010124250 A JP2010124250 A JP 2010124250A
Authority
JP
Japan
Prior art keywords
gain
input
output
gain switching
unit
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.)
Pending
Application number
JP2008296180A
Other languages
Japanese (ja)
Inventor
Ikuhiro Matsumoto
郁広 松本
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.)
Kenwood KK
Kenwood Engineering Corp
Original Assignee
Kenwood KK
Kenwood Engineering 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 Kenwood KK, Kenwood Engineering Corp filed Critical Kenwood KK
Priority to JP2008296180A priority Critical patent/JP2010124250A/en
Publication of JP2010124250A publication Critical patent/JP2010124250A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Analogue/Digital Conversion (AREA)
  • Control Of Amplification And Gain Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To correct gain errors of an input gain switching unit on former stages of an A/D conversion unit. <P>SOLUTION: In an A/D conversion apparatus, a control unit 31 allows a base signal of 1 kHz sine-wave generated by a base signal generation unit 25 to be input into an input gain changeover unit 21 at a measuring time, and upon changeover to 6 stages from the minimum gain to the maximum gain, allows the A/D conversion unit 22 to determine and store a compensation coefficient for denying a gain relative error of each stage for the minimum gain from a digital signal level after the A/D conversion. At a normal time, the digital signal level that has been A/D-converted from an input analog audio signal through the input gain changeover unit 21 in the A/D conversion unit 22 is monitored. When a lower level state persists or when it increases to excessively higher, the gain is changed over so that the input level of the A/D conversion unit 22 is optimum, and at the same time, the compensation coefficient corresponding to the changeover gain is set for a level correction unit 23 to allow the gain error to be corrected. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明はA/D変換装置、D/A変換装置、信号処理装置に係り、とくに入力アナログ信号または出力アナログ信号に対するゲインを切り換え可能としたA/D変換装置、D/A変換装置、信号処理装置に関する。   The present invention relates to an A / D conversion device, a D / A conversion device, and a signal processing device, and in particular, an A / D conversion device, a D / A conversion device, and a signal processing that can switch a gain for an input analog signal or an output analog signal. Relates to the device.

例えば車載オーディオシステムではヘッドユニットはダッシュボードに設置されるが、パワーアンプやスピーカボックスはヘッドユニットから離れたトランクやドアなどに設置される場合が多い。ヘッドユニット内のチューナ部、CD再生部等のソース回路部からは一定レベルのオーディオ信号が出力されるようになっており、ヘッドユニットに設けられた音量調整部でユーザ所望の音量に調整したのち、ケーブルを介してパワーアンプ側に出力される。パワーアンプでDSP(ディジタルシグナルプロセッサ)により帯域制限等の信号処理を行いたい場合、ヘッドユニット側から入力した音量調整後のアナログオーディオ信号をA/D変換器で一旦ディジタルオーディオ信号に変換し、信号処理後、D/A変換器で元のアナログ信号に戻すようにしている。   For example, in an in-vehicle audio system, the head unit is installed on the dashboard, but the power amplifier and the speaker box are often installed on a trunk or a door away from the head unit. An audio signal of a certain level is output from a source circuit unit such as a tuner unit and a CD playback unit in the head unit, and after the volume is adjusted to a user desired volume by a volume adjustment unit provided in the head unit. And output to the power amplifier via the cable. If you want to perform signal processing such as band limitation with a DSP (digital signal processor) with a power amplifier, the analog audio signal after volume adjustment input from the head unit side is converted into a digital audio signal with an A / D converter. After the processing, the original analog signal is restored by the D / A converter.

ところで、ユーザが音楽を聴取するときの最大の音量と最小の音量の信号レベルには大きな開きがあり、稀に聞く程度の大音量と比較すると普段の音量はそれよりも小さな音量であり、ときに普段の音量よりもさらに小さな音量で聞きたい場合もある。小音量時と大音量時の差は個人差もあるが40dB程度あるのが普通である。音量調整後のアナログオーディオ信号をA/D変換するとき、システムの最大信号レベルでクリップしないようにシステムを構成する必要がある。たとえば、16ビットA/D変換器を用いて信号レベルが最大のときにフルビットのディジタル信号に変換されるように構成したとき、小音量時は最大音量時に対して信号レベルが40dB小さいとすると、小音量時ではA/D変換器の上位側の約7ビットが使用されず、9ビットのA/D変換器を用いたのと等価となってしまい、量子化歪の影響でオーディオ信号のクオリティが非常に悪化してしまう問題がある。この点につき音量調整部をパワーアンプのDSPの後段に設け、A/D変換器の入力を一定の信号レベルとしてクオリティの悪化を回避することが考えられる。けれども、通常、音量調整操作部はヘッドユニットに設けられるので、ダッシュボードのヘッドユニットからトランクルームのパワーアンプまで音量調整信号ラインをオーディオ信号ラインと別個に配線する必要が生じ、また一般にパワーアンプには音量調整信号の入力端子が付属しないため、製品の汎用性がなくなる欠点があり現実的な解決策でない。
スピーカの付加機能として帯域制限等をDSPによる信号処理で実現しようとする場合もまったく同様で、一般にスピーカには音量調整後のアナログオーディオ信号が入力されるため、小音量時に量子化歪の影響でオーディオ信号のクオリティが非常に悪化してしまう欠点がある。
By the way, when the user listens to music, there is a big difference in the signal level between the maximum volume and the minimum volume, and the normal volume is lower than the volume that is rarely heard. Sometimes you want to hear a volume that is even lower than the normal volume. The difference between the low volume and the high volume is usually 40 dB, although there are individual differences. When the analog audio signal after volume adjustment is A / D converted, the system needs to be configured not to clip at the maximum signal level of the system. For example, when a 16-bit A / D converter is used to convert a full-bit digital signal when the signal level is maximum, the signal level is 40 dB lower than the maximum volume at a low volume. When the volume is low, the upper 7 bits of the A / D converter are not used, which is equivalent to using a 9-bit A / D converter. There is a problem that the quality is very deteriorated. In this regard, it is conceivable to provide a volume adjustment unit at the subsequent stage of the DSP of the power amplifier and to avoid deterioration in quality by setting the input of the A / D converter to a constant signal level. However, since the volume adjustment operation unit is usually provided in the head unit, it is necessary to wire the volume adjustment signal line separately from the audio signal line from the dashboard head unit to the trunk room power amplifier. Since an input terminal for a volume adjustment signal is not attached, there is a drawback that the versatility of the product is lost, and this is not a realistic solution.
As an additional function of the speaker, the same is true when trying to implement band limiting or the like by signal processing by a DSP. Generally, an analog audio signal after volume adjustment is input to the speaker. There is a drawback that the quality of the audio signal is extremely deteriorated.

この問題を解決するため、信号レベルが大きく可変する音量調整後のアナログオーディオ信号を対象に信号処理する場合、図1に示す如くDSP1の前後段のA/D変換器2とD/A変換器3の前後に更に入力ゲイン可変回路4と出力ゲイン可変回路5を設けるようにしている。そして、音量増大により入力アナログオーディオ信号Ainのレベルが大きくなってA/D変換器2の出力がクリップしそうなときは入力ゲイン可変回路4のゲインを下げ、A/D変換器2の入力レベルを最適化する一方、その分、出力ゲイン可変回路5のゲインを上げて全体としてユーザ所望の音量に見合った出力レベルが得られるようにし、反対に小音量化により入力アナログオーディオ信号Ainのレベルが小さくなってA/D変換器2の出力の信号歪が顕著になりそうなときは入力ゲイン可変回路4のゲインを上げ、A/D変換器2の入力レベルを最適化する一方、その分、出力ゲイン可変回路5のゲインを下げて、全体としてユーザ所望の音量に見合った出力レベルが得られるようにすることが考えられる。たとえば、実開平5−55617号には、入力アナログオーディオ信号Ainのレベルが過大となったときに、入力ゲイン可変回路(第1のVCA)でゲインを下げ、その分、出力ゲイン可変回路(第2のVCA)でゲインを上げる発明が開示されている(特許文献1)。   In order to solve this problem, in the case of processing an analog audio signal after volume adjustment whose signal level is largely variable, the A / D converter 2 and the D / A converter before and after the DSP 1 as shown in FIG. 3 is further provided with an input gain variable circuit 4 and an output gain variable circuit 5. When the level of the input analog audio signal Ain increases due to the increase in volume and the output of the A / D converter 2 is likely to clip, the gain of the input gain variable circuit 4 is lowered, and the input level of the A / D converter 2 is decreased. On the other hand, the gain of the output gain variable circuit 5 is increased by that amount so that an output level corresponding to the volume desired by the user can be obtained as a whole. On the contrary, the level of the input analog audio signal Ain is reduced by reducing the volume. When the signal distortion of the output of the A / D converter 2 is likely to become remarkable, the gain of the input gain variable circuit 4 is increased to optimize the input level of the A / D converter 2, while the output is correspondingly increased. It is conceivable to lower the gain of the variable gain circuit 5 so that an output level commensurate with the volume desired by the user can be obtained as a whole. For example, in Japanese Utility Model Laid-Open No. 5-55617, when the level of the input analog audio signal Ain becomes excessive, the gain is decreased by the input gain variable circuit (first VCA), and the output gain variable circuit (first (VCA of 2) has been disclosed (Patent Document 1).

けれども、アナログ回路で構成された入力ゲイン可変回路や出力ゲイン可変回路では、素子部品の回路定数の組み合わせの制約や素子部品の回路定数のバラツキのためゲインの精度が悪く、入力ゲイン可変回路と出力ゲイン可変回路で相補的にゲインを可変した時に信号が不連続となって大きなノイズが発生する欠点があった。例えば、図2は反転増幅器OP、抵抗R1乃至R9、スイッチ素子SW1乃至SW3により構成したアナログゲイン切り換え回路であり、スイッチ素子に74HC4053(例えば東芝製TC74HC4053AP)を用い、少ないスイッチ素子で比較的正確にゲインを切り換えられるようにしたものであり、図3に示す如く、3ビットの制御信号ContA、ContB、ContCの「H」「L」の組み合わせによりゲインを×1、×2、×4、×8、×16、×32の6段階の2の乗数倍の設定ゲインに切り換え可能である。図2の構成の場合、×1、×2、×4、×8、×16、×32の計算上のゲインは0.88(誤差−12.00%)、1.76(誤差−12.00%)、3.52(誤差−12.00%)、7.08(誤差−11.50%)、14.06(誤差−12.13%)、27.94(誤差−12.69%)となり、×1のゲインを基準にしたとき、×2、×4、×8、×16、×32は1.995倍(相対誤差−0.25%)、3.991倍(同−0.22%)、8.014倍(同−0.22%)、15.920倍(同−0.50%)、31.634(同−1.14%)となる(但し、抵抗値のバラツキ誤差は考慮していない)。ゲイン切り換え回路としては、かなり正確な回路であるが、上述の入力信号のレベル変化に追従してゲインを可変させる場合は、精度不足となる。例えば、計算上と抵抗値のバラツキを合わせたゲインの切り換え誤差が1%の場合、信号に対して−40dB程度のオーディオ信号としては比較的大きなパルス的なノイズが発生することになる。   However, the input gain variable circuit and output gain variable circuit composed of analog circuits have poor gain accuracy due to restrictions on combinations of circuit constants of element parts and variations in circuit constants of element parts. When the gain is varied in a complementary manner by the gain variable circuit, the signal becomes discontinuous and a large noise is generated. For example, FIG. 2 shows an analog gain switching circuit composed of an inverting amplifier OP, resistors R1 to R9, and switch elements SW1 to SW3. 74HC4053 (for example, TC74HC4053AP manufactured by Toshiba) is used as the switch element, and the switch element is relatively accurate with a small number of switch elements. The gain can be switched, and as shown in FIG. 3, the gain is set to x1, x2, x4, x8 by combining "H" and "L" of the 3-bit control signals ContA, ContB, and ContC. , X16, and x32 can be switched to a setting gain that is a multiple of 2 in 6 stages. In the case of the configuration of FIG. 2, the gains for calculation of x1, x2, x4, x8, x16, and x32 are 0.88 (error -12.00%) and 1.76 (error -12.12). 00%), 3.52 (error -12.00%), 7.08 (error -11.50%), 14.06 (error -12.13%), 27.94 (error -12.69%) ), And x2, x4, x8, x16, and x32 are 1.995 times (relative error -0.25%) and 3.991 times (same -0). .22%), 8.014 times (-0.22%), 15.920 times (-0.50%), 31.634 (-1.14%) (however, the resistance value Variation error is not considered). The gain switching circuit is a fairly accurate circuit, but the accuracy is insufficient when the gain is varied following the level change of the input signal. For example, when the gain switching error including the variation in the calculation and the resistance value is 1%, a relatively large pulse noise is generated as an audio signal of about −40 dB with respect to the signal.

これとは別に、オーディオ信号に対する音量調整をアナログ領域において行なう電子ボリューム回路がある。この電子ボリューム回路は入力端子とグランド間に多数の抵抗素子を直列に接続した抵抗分圧回路と、入力端子及び各抵抗間の接続点と出力端子との間に介装された多数のアナログスイッチを内蔵しており、アナログスイッチを択一的に閉じて入力アナログオーディオ信号の電圧値を可変の分圧値で分圧し、信号レベルを減衰させる。この電子ボリューム回路では、例えば0dB〜−35dBまで1dB単位のステップで減衰させる場合、36個の抵抗素子と36個のアナログスイッチが必要となり、構成が複雑・大形化し、コストも高くなってしまう。一方、音量調整はディジタルタル領域においてDSPによる演算処理でも可能であるが、減衰量が大きくなると有効ビット長が小さくなって、量子化歪が大きくなってしまう。   Apart from this, there is an electronic volume circuit that adjusts the volume of an audio signal in the analog domain. This electronic volume circuit has a resistance voltage dividing circuit in which a number of resistance elements are connected in series between the input terminal and the ground, and a number of analog switches interposed between the input terminal and the connection point between each resistor and the output terminal. The analog switch is alternatively closed to divide the voltage value of the input analog audio signal by a variable voltage dividing value and attenuate the signal level. In this electronic volume circuit, for example, when attenuation is performed in steps of 1 dB from 0 dB to -35 dB, 36 resistive elements and 36 analog switches are required, which makes the configuration complicated and large, and increases the cost. . On the other hand, the sound volume can be adjusted by a calculation process using a DSP in the digital tall region. However, when the attenuation is increased, the effective bit length is reduced and the quantization distortion is increased.

そこで、図4に示す如く、電子ボリューム回路6の前段に、入力アナログオーディオ信号をA/D変換するA/D変換器7、ディジタル流域で減衰演算を行なうDSP8、DSP8の出力をD/A変換するD/A変換器9を設け、電子ボリューム回路6では6dBの大きなステップ幅で減衰し、DSP8では1dBの小さなステップ幅で減衰させるようにし、制御回路10が目標音量(目標減衰量)となるように電子ボリューム回路6とDSP8を制御するようにしたハイブリッド型の音量調整回路が提案されている(特許文献2)。
けれども、アナログ回路で構成された電子ボリューム回路6はDSP8に比して直線性が悪く、例えば電子ボリューム回路6の−6dBが実際には−5dBしか無い場合がある。このとき、全体の減衰量を−5dBとするため、電子ボリューム回路6の減衰量を0dB、DSP8を−5dBに切り換えたときと、全体の減衰量を1dB落として−6dBとするため、電子ボリューム回路6の減衰量を−6dB、DSP8を0dBに切り換えたときとで、ほぼ同じ減衰量になって音量が殆んど変化しない問題があった。
Therefore, as shown in FIG. 4, the A / D converter 7 that performs A / D conversion of the input analog audio signal, the DSP 8 that performs attenuation calculation in the digital basin, and the output of the DSP 8 are D / A converted before the electronic volume circuit 6. The D / A converter 9 is provided so that the electronic volume circuit 6 attenuates with a large step width of 6 dB, and the DSP 8 attenuates with a small step width of 1 dB, so that the control circuit 10 has a target sound volume (target attenuation). As described above, a hybrid volume adjustment circuit that controls the electronic volume circuit 6 and the DSP 8 has been proposed (Patent Document 2).
However, the electronic volume circuit 6 composed of an analog circuit has poor linearity as compared with the DSP 8, and for example, the electronic volume circuit 6 may actually have only −5 dB of −6 dB. At this time, in order to set the overall attenuation to −5 dB, the electronic volume circuit 6 is switched to 0 dB and the DSP 8 is switched to −5 dB. When the entire attenuation is decreased by 1 dB to −6 dB, the electronic volume is reduced. There is a problem that the attenuation is almost the same when the attenuation of the circuit 6 is switched to −6 dB and the DSP 8 is switched to 0 dB, and the sound volume hardly changes.

実開平5−55617号公報の段落0025、図1Japanese Utility Model Laid-Open No. 5-55617, paragraph 0025, FIG. 特開2001−7670号公報の段落0026、図5Japanese Patent Laid-Open No. 2001-7670, paragraph 0026, FIG.

本発明は上記した従来技術の問題に鑑み、A/D変換手段の前段に設けられた入力ゲイン切り換え手段のゲイン切り換え誤差を補正可能なA/D変換装置を提供することをその目的とする。また、D/A変換手段の後段に設けられた出力ゲイン切り換え手段のゲイン切り換え誤差を補正可能なD/A変換装置を提供することをその目的とする。また、前後段に設けられた入力ゲイン切り換え手段と出力ゲイン切り換え手段のゲイン切り換え誤差を補正可能な信号処理装置を提供することをその目的とする。   An object of the present invention is to provide an A / D conversion device capable of correcting a gain switching error of an input gain switching unit provided in a preceding stage of the A / D conversion unit in view of the above-described problems of the prior art. It is another object of the present invention to provide a D / A converter capable of correcting a gain switching error of an output gain switching unit provided at a subsequent stage of the D / A converting unit. It is another object of the present invention to provide a signal processing apparatus capable of correcting a gain switching error between input gain switching means and output gain switching means provided at the front and rear stages.

本発明のA/D変換装置の1つでは、入力アナログ信号をA/D変換するA/D変換手段と、A/D変換手段の前段に設けられて入力アナログ信号に対し複数段階の所定の設定値のゲインに切り換え可能な入力ゲイン切り換え手段と、を備えたA/D変換装置において、入力ゲイン切り換え手段のゲイン測定用の基準信号を発生する基準信号発生手段と、通常時は入力アナログ信号を選択して入力ゲイン切り換え手段に入力させ、測定時は基準信号を選択して入力ゲイン切り換え手段に入力させる選択手段と、測定時、基準信号が選択手段を介して入力ゲイン切り換え手段に印加されているときに、入力ゲイン切り換え手段のゲインを各段階に切り換えたときのA/D変換手段の出力レベルを測定するレベル測定手段と、レベル測定手段で測定したレベルに基づき、入力ゲイン切り換え手段の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定する補正係数決定手段と、通常時、選択手段を介して入力ゲイン切り換え手段に入力アナログ信号が印加されているときに、入力ゲイン切り換え手段のゲインに応じてA/D変換手段から出力されたディジタル信号に対し、補正係数決定手段で決定された補正係数に基づきレベル補正を行なう補正手段と、を備えたことを特徴としている。
本発明のA/D変換装置の他の1つでは、入力ゲイン切り換え手段の複数段階のゲイン設定値は2の乗数倍または1/2の乗数倍の値としたこと、を特徴としている。
本発明のD/A変換装置の1つでは、ディジタル信号をD/A変換して出力するD/A変換手段と、D/A変換手段の後段に設けられて出力アナログ信号に対し複数段階の所定の設定値のゲインに切り換え可能な出力ゲイン切り換え手段と、を備えたD/A変換装置において、出力ゲイン切り換え手段のゲイン測定用の基準信号を発生する基準信号発生手段と、通常時は出力アナログ信号を選択して出力ゲイン切り換え手段に入力させ、測定時は基準信号を選択して出力ゲイン切り換え手段に入力させる選択手段と、測定時、出力ゲイン切り換え手段から出力されるアナログ信号が入力されるA/D変換手段と、測定時、基準信号が選択手段を介して出力ゲイン切り換え手段に印加されているときに、出力ゲイン切り換え手段のゲインを各段階に切り換えたときのA/D変換手段の出力レベルを測定するレベル測定手段と、レベル測定手段で測定した出力レベルに基づき、出力ゲイン切り換え手段の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定する補正係数決定手段と、通常時、選択手段を介して出力ゲイン切り換え手段にD/A変換手段の出力が印加されているときに、出力ゲイン切り換え手段のゲインに応じてD/A変換手段に入力されるディジタル信号に対し、補正係数決定手段で決定された補正係数に基づきレベル補正を行なう補正手段と、を備えたことを特徴としている。
本発明のD/A変換装置の他の1つでは、出力ゲイン切り換え手段の複数段階のゲイン設定値は2の乗数倍または1/2の乗数倍の値としたこと、を特徴としている。
本発明の信号処理装置の1つでは、入力アナログ信号をA/D変換するA/D変換手段と、A/D変換手段から出力された入力ディジタル信号に対し信号処理を行なう信号処理手段と、信号処理手段の出力ディジタル信号をD/A変換して出力するD/A変換手段と、A/D変換手段の前段に設けられて入力アナログ信号に対し複数段階の所定の設定値のゲインに切り換え可能な入力ゲイン切り換え手段と、D/A変換手段の後段に設けられて出力アナログ信号に対し複数段階の所定の設定値のゲインに切り換え可能な出力ゲイン切り換え手段と、を備えた信号処理装置において、入力ゲイン切り換え手段と出力ゲイン切り換え手段のゲイン測定用の基準信号を発生する基準信号発生手段と、通常時は入力アナログ信号を選択して入力ゲイン切り換え手段に入力させ、第1の測定時は基準信号を選択して入力ゲイン切り換え手段に入力させ、第2の測定時は出力ゲイン切り換え手段の出力を選択して入力ゲイン切り換え手段に入力する第1の選択手段と、通常時は出力アナログ信号を選択して出力ゲイン切り換え手段に入力し、第2の測定時は基準信号を選択して出力ゲイン切り換え手段に入力させる第2の選択手段と、第1の測定時、基準信号が第1の選択手段を介して入力ゲイン切り換え手段に印加されているときに、入力ゲイン切り換え手段のゲインを各段階に切り換えたときのA/D変換手段の出力レベルを測定し、第2の測定時、基準信号が第2の選択手段、出力ゲイン切り換え手段、第1の選択手段を介して入力ゲイン切り換え手段に印加されているときに、出力ゲイン切り換え手段のゲインを各段階に切り換えたときのA/D変換手段の出力レベルを測定するレベル測定手段と、レベル測定手段で測定したレベルに基づき、入力ゲイン切り換え手段の各段階のゲインの誤差を打ち消すための各段階別の補正係数と出力ゲイン切り換え手段の各段階のゲインの誤差を打ち消すための各段階別の補正係数とを決定する補正係数決定手段と、通常時、第1の選択手段を介して入力ゲイン切り換え手段に入力アナログ信号が印加され、かつ第2の選択手段を介して出力ゲイン切り換え手段に出力アナログ信号が印加されているときに、入力ゲイン切り換え手段のゲインと出力ゲイン切り換え手段のゲインに応じてA/D変換手段とD/A変換手段の間でディジタル信号に対し、補正係数決定手段で決定された補正係数に基づきレベル補正を行なう補正手段と、を備えたことを特徴としている。
本発明の信号処理装置の他の1つでは、入力ゲイン切り換え手段の複数段階のゲインの設定値は2の乗数倍または1/2の乗数倍の値とし、出力ゲイン切り換え手段の複数段階のゲインの設定値は2の乗数倍または1/2の乗数倍の値としたこと、を特徴としている。
In one of the A / D conversion devices of the present invention, an A / D conversion means for A / D converting an input analog signal, and a predetermined number of stages for the input analog signal are provided in the preceding stage of the A / D conversion means. In an A / D converter comprising an input gain switching means capable of switching to a set value gain, a reference signal generating means for generating a reference signal for gain measurement of the input gain switching means, and an input analog signal in normal times Is selected and input to the input gain switching means, and during measurement, the reference signal is selected and input to the input gain switching means, and during measurement, the reference signal is applied to the input gain switching means via the selection means. The level measurement means for measuring the output level of the A / D conversion means when the gain of the input gain switching means is switched to each stage, and the level measurement means. A correction coefficient determining means for determining a correction coefficient for each stage for canceling the gain error of each stage of the input gain switching means based on the level, and an analog input to the input gain switching means through the selection means in normal times. Correction means for performing level correction on the digital signal output from the A / D conversion means according to the gain of the input gain switching means when a signal is applied, based on the correction coefficient determined by the correction coefficient determination means It is characterized by having.
Another one of the A / D converters of the present invention is characterized in that the gain setting values at a plurality of stages of the input gain switching means are values of a multiplier of 2 or a multiplier of 1/2.
In one of the D / A conversion devices of the present invention, a D / A conversion means for D / A converting and outputting a digital signal, and a plurality of stages for the output analog signal are provided after the D / A conversion means. An output gain switching means capable of switching to a gain of a predetermined set value, a reference signal generating means for generating a reference signal for gain measurement of the output gain switching means, and an output in normal times Selects an analog signal and inputs it to the output gain switching means, selects a reference signal for measurement and inputs it to the output gain switching means, and inputs an analog signal output from the output gain switching means for measurement A / D conversion means, and at the time of measurement, when the reference signal is applied to the output gain switching means via the selection means, the gain of the output gain switching means is set to each stage. Level measuring means for measuring the output level of the A / D conversion means at the time of switching to each level, and for each stage for canceling the gain error at each stage of the output gain switching means based on the output level measured by the level measuring means A correction coefficient determining means for determining the correction coefficient of the D / A conversion means, and when the output of the D / A conversion means is applied to the output gain switching means via the selection means in the normal state, D is determined according to the gain of the output gain switching means. Correction means for performing level correction on the digital signal input to the / A conversion means based on the correction coefficient determined by the correction coefficient determination means.
Another one of the D / A converters according to the present invention is characterized in that the gain setting values at a plurality of stages of the output gain switching means are values of multipliers of 2 or multipliers of 1/2.
In one of the signal processing devices of the present invention, A / D conversion means for A / D converting an input analog signal, signal processing means for performing signal processing on an input digital signal output from the A / D conversion means, D / A conversion means for D / A converting and outputting the output digital signal of the signal processing means, and switching to a predetermined setting gain in a plurality of stages with respect to the input analog signal provided in the preceding stage of the A / D conversion means In a signal processing apparatus comprising: a possible input gain switching means; and an output gain switching means provided at a subsequent stage of the D / A conversion means and capable of switching to a predetermined set value gain in a plurality of stages for an output analog signal , A reference signal generating means for generating a reference signal for measuring the gain of the input gain switching means and the output gain switching means; In the first measurement, the reference signal is selected and input to the input gain switching means, and in the second measurement, the output of the output gain switching means is selected and input to the input gain switching means. A first selection means; and a second selection means for selecting an output analog signal during normal operation and inputting it to the output gain switching means, and during a second measurement, selecting a reference signal and inputting it to the output gain switching means. During the first measurement, when the reference signal is applied to the input gain switching means via the first selection means, the A / D conversion means when the gain of the input gain switching means is switched to each stage. When the output level is measured and the reference signal is applied to the input gain switching means via the second selection means, the output gain switching means, and the first selection means during the second measurement, the output gain is measured. The level measurement means for measuring the output level of the A / D conversion means when the gain of the switching means is switched to each stage, and the gain error at each stage of the input gain switching means based on the level measured by the level measurement means. Correction coefficient determining means for determining the correction coefficient for each stage for canceling and the correction coefficient for each stage for canceling the gain error of each stage of the output gain switching means; When the input analog signal is applied to the input gain switching means via the second input means and the output analog signal is applied to the output gain switching means via the second selection means, the gain of the input gain switching means and the output gain switching means Correction coefficient determined by the correction coefficient determination means for the digital signal between the A / D conversion means and the D / A conversion means in accordance with the gain of And a correcting means for performing level correction based on the above.
In another one of the signal processing devices of the present invention, the set values of the gains of the plurality of stages of the input gain switching means are values of a multiplier of 2 or a multiplier of 1/2, and the gains of the plurality of stages of the output gain switching means The set value is a value that is a multiplier of 2 or a multiplier of 1/2.

本発明のA/D変換装置によれば、基準信号を用いて入力ゲイン切り換え手段の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定し、入力ゲイン切り換え手段にA/D変換対象の入力アナログ信号が印加されているときに、入力ゲイン切り換え手段のゲインに応じてA/D変換手段から出力されたディジタル信号に対し、レベル補正を行なうようにしたので、アナログ回路で構成される入力ゲイン切り換え手段の各段階のゲインに誤差があっても、信号に対するゲインを正確に切り換えることができる。
また、A/D変換後のディジタル信号をディジタル信号処理する場合、入力ゲイン切り換え手段のゲイン切り換えと連動してディジタル信号処理手段に保持された過去のサンプルデータのレベルを切り換える必要があるが、入力ゲイン切り換え手段の複数段階のゲイン設定値は2の乗数倍または1/2の乗数倍で切り換えるようにしておけば、過去のサンプルデータのレベルの切り換えをビットシフト動作で簡単に実行することができる。
また本発明のD/A変換装置によれば、基準信号を用いて出力ゲイン切り換え手段の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定し、D/A変換対象のディジタル信号をD/A変換した出力アナログ信号が出力ゲイン切り換え手段に印加されているときに、出力ゲイン切り換え手段のゲインに応じてD/A変換対象のディジタル信号に対し、レベル補正を行なうようにしたので、アナログ回路で構成される出力ゲイン切り換え手段の各段階のゲインに誤差があっても、信号に対するゲインを正確に切り換えることができる。
また、D/A変換手段に入力されるディジタル信号に対するゲインを出力ゲイン切り換え手段のゲインと相殺的に可変する場合に、出力ゲイン切り換え手段の複数段階のゲイン設定値は2の乗数倍または2の乗数倍で切り換えるようにしておけば、D/A変換手段に入力されるディジタル信号に対するゲインの切り換えをビットシフト動作で簡単に実行することができる。
また本発明の信号処理装置によれば、基準信号を用いて入力ゲイン切り換え手段と出力ゲイン切り換え手段の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定し、入力ゲイン切り換え手段にA/D変換対象のアナログ信号が印加され、かつD/A変換対象のディジタル信号をD/A変換した出力アナログ信号が出力ゲイン切り換え手段に印加されているときに、入力ゲイン切り換え手段と出力ゲイン切り換え手段のゲインに応じてA/D変換手段とD/A変換手段の間でディジタル信号に対し、レベル補正を行なうようにしたので、アナログ回路で構成される入力ゲイン切り換え手段と出力ゲイン切り換え手段の各段階のゲインに誤差があっても、信号に対するゲインを正確に切り換えることができる。
また、A/D変換後のディジタル信号をディジタル信号処理する場合、入力ゲイン切り換え手段のゲイン切り換えと連動してディジタル信号処理手段に保持された過去のサンプルデータのレベルを切り換える必要があるが、入力ゲイン切り換え手段の複数段階のゲイン設定値は2の乗数倍または1/2の乗数倍で切り換えるようにしておけば、過去のサンプルデータのレベルの切り換えをビットシフト動作で簡単に実行することができ、同様にして、D/A変換手段に入力されるディジタル信号に対するゲインを出力ゲイン切り換え手段のゲインとを相殺的に可変する場合に、出力ゲイン切り換え手段の複数段階のゲイン設定値は2の乗数倍または2の乗数倍で切り換えるようにしておけば、D/A変換手段に入力されるディジタル信号に対するゲインの切り換えをビットシフト動作で簡単に実行することができる。
According to the A / D conversion device of the present invention, the correction coefficient for each step for canceling the gain error of each step of the input gain switching means is determined using the reference signal, and the A / D is supplied to the input gain switching means. Since the level correction is performed on the digital signal output from the A / D conversion means according to the gain of the input gain switching means when the input analog signal to be converted is applied, the analog circuit is configured. Even if there is an error in the gain of each stage of the input gain switching means, the gain for the signal can be switched accurately.
When digital signals after A / D conversion are processed, it is necessary to switch the level of past sample data held in the digital signal processing means in conjunction with the gain switching of the input gain switching means. If the gain setting values in a plurality of stages of the gain switching means are switched at a multiplier factor of 2 or a multiplier factor of 1/2, the level of past sample data can be easily switched by a bit shift operation. .
According to the D / A conversion device of the present invention, the correction coefficient for each step for canceling the gain error of each step of the output gain switching means is determined using the reference signal, and the D / A conversion target digital signal is determined. When an output analog signal obtained by D / A converting the signal is applied to the output gain switching means, level correction is performed on the digital signal to be D / A converted in accordance with the gain of the output gain switching means. Therefore, even if there is an error in the gain at each stage of the output gain switching means constituted by the analog circuit, the gain for the signal can be switched accurately.
Further, when the gain for the digital signal input to the D / A conversion means is varied in an offset manner with the gain of the output gain switching means, the gain setting values at a plurality of stages of the output gain switching means are a multiplier of 2 or 2 If the switching is performed by a multiplier, the switching of the gain for the digital signal input to the D / A conversion means can be easily executed by the bit shift operation.
According to the signal processing device of the present invention, the input gain switching means determines the correction coefficient for each stage for canceling the gain error of each stage of the input gain switching means and the output gain switching means using the reference signal. When an analog signal subject to A / D conversion is applied to and an output analog signal obtained by D / A converting the digital signal subject to D / A conversion is applied to the output gain switching means, the input gain switching means and the output Since level correction is performed on the digital signal between the A / D conversion means and the D / A conversion means in accordance with the gain of the gain switching means, the input gain switching means and the output gain switching configured by analog circuits are performed. Even if there is an error in the gain of each stage of the means, the gain for the signal can be switched accurately.
When digital signals after A / D conversion are processed, it is necessary to switch the level of past sample data held in the digital signal processing means in conjunction with the gain switching of the input gain switching means. If the gain setting values in multiple stages of the gain switching means are switched at a multiplier factor of 2 or a multiplier factor of 1/2, the level of past sample data can be easily switched by a bit shift operation. Similarly, when the gain for the digital signal input to the D / A conversion means is varied in an offset manner with respect to the gain of the output gain switching means, the gain setting values at a plurality of stages of the output gain switching means are multipliers of 2. If the signal is switched by a factor of 2 or a multiplier of 2, the digital signal input to the D / A conversion means is not affected. Gain switching can be easily performed by bit shift operation that.

以下、本発明の最良の形態を実施例に基づき説明する。   Hereinafter, the best mode of the present invention will be described based on examples.

図5を参照して本発明の第1実施例を説明する。図5は本発明に係る帯域制限用信号処理装置の構成を示すブロック図である。
図5において、20はスイッチ部であり、通常モード時は音量調整後の入力アナログオーディオ信号Ainを選択して出力し、測定モード時は後述するアナログ基準信号STを選択して出力する。21はスイッチ部から出力されたアナログ信号に対するゲインを切り換え可能な入力ゲイン切り換え部である。この入力ゲイン切り換え部21はここでは図2と同一に構成されており、ゲインを第1乃至第6の6段階に2の乗数倍に切り換え可能とする。第1段階は×1、第2段階は×2、第3段階は×4、第4段階は×8、第5段階は×16、第6段階は×32のゲインに設定されている。但し、素子部品の回路定数の選択の制限と回路定数のバラツキから各段階の実際のゲインは設定値と一致せず誤差がある。この誤差は後述するように、ディジタル領域で補正される。22はA/D変換部であり、入力ゲイン切り換え部21でゲイン調整後のアナログオーディオ信号をA/D変換する。23はレベル補正部であり、A/D変換後のディジタルオーディオ信号に対し、入力ゲイン切り換え部21のゲイン誤差を打ち消すようにレベル補正を行う。24はディジタル信号処理部であり、ここでは一例として図6に示す3次FIRフィルタのシグナルフローに従い、所定のカットオフ周波数以下の成分だけ通過させる低域通過フィルタとしての信号処理を実行するものとする。ディジタルオーディオ信号のサンプル周期T、離散時間nT(但し、n=1、2、3、・・)、ディジタル信号処理部24の時刻nTの入力x(nT)、出力y(nT)とすると、
y(nT)=a0・x(nT)+a1・x((n−1)T)+a2・x((n−2)T)+a3・x((n−3)T)
a0、a1、a2、a3;演算係数
である。ここで、x((n−1)T)、x((n−2)T)、x((n−3)T)は過去のサンプルデータである。
A first embodiment of the present invention will be described with reference to FIG. FIG. 5 is a block diagram showing the configuration of the band-limiting signal processing apparatus according to the present invention.
In FIG. 5, reference numeral 20 denotes a switch unit that selects and outputs an input analog audio signal Ain after volume adjustment in the normal mode, and selects and outputs an analog reference signal ST described later in the measurement mode. Reference numeral 21 denotes an input gain switching unit capable of switching the gain for the analog signal output from the switch unit. The input gain switching unit 21 is configured in the same way as in FIG. 2 here, and the gain can be switched to a multiplier of 2 in the first to sixth stages. The first stage is set to a gain of x1, the second stage is set to x2, the third stage is set to x4, the fourth stage is set to x8, the fifth stage is set to x16, and the sixth stage is set to a gain of x32. However, the actual gain at each stage does not match the set value due to the limitation of the selection of the circuit constants of the element parts and the variation of the circuit constants, and there is an error. This error is corrected in the digital domain as will be described later. Reference numeral 22 denotes an A / D converter, which performs A / D conversion on the analog audio signal after gain adjustment by the input gain switching unit 21. A level correction unit 23 performs level correction on the digital audio signal after A / D conversion so as to cancel the gain error of the input gain switching unit 21. Reference numeral 24 denotes a digital signal processing unit which, as an example, executes signal processing as a low-pass filter that passes only a component having a frequency equal to or lower than a predetermined cutoff frequency in accordance with the signal flow of the third-order FIR filter shown in FIG. To do. Sampling period T of digital audio signal, discrete time nT (where n = 1, 2, 3,...), Input x (nT) and output y (nT) at time nT of digital signal processing unit 24,
y (nT) = a0.x (nT) + a1.x ((n-1) T) + a2.x ((n-2) T) + a3.x ((n-3) T)
a0, a1, a2, a3; calculation coefficients. Here, x ((n-1) T), x ((n-2) T), and x ((n-3) T) are past sample data.

25は入力ゲイン切り換え部21のゲイン測定用のディジタル基準信号を生成する基準信号生成部、26は通常時はディジタル信号処理部24から入力されたディジタル信号処理後のディジタルオーディオ信号を選択して出力し、測定時は基準信号生成部25から入力されたディジタル基準信号を選択して出力するスイッチ部、27はスイッチ部26から入力するディジタル信号をD/A変換するD/A変換部、28はD/A変換後のアナログ信号に対するゲインを切り換え可能な出力ゲイン切り換え部であり、この出力ゲイン切り換え部28から出力アナログ信号Aoutが出力される。出力ゲイン切り換え部28はゲインを第1乃至第6の6段階に1/2の乗数倍に切り換え可能とする。第1段階は×1/32、第2段階は×1/16、第3段階は×1/8、第4段階は×1/4、第5段階は×1/2、第6段階は×1/1のゲインに設定されている。D/A変換部27の出力はスイッチ部20の測定モード側入力端子と接続されている。29はレベル測定部であり、A/D変換部22から出力されるディジタル信号の信号レベルを測定する。ここでは信号レベルはピーク値で測定するものとするが、実効値(RMS)で測定するようにしてもよい。30は補正係数記憶部であり、入力ゲイン切り換え部21の各段階の補正係数を記憶する。   Reference numeral 25 is a reference signal generation section for generating a digital reference signal for gain measurement of the input gain switching section 21, and 26 is for selecting and outputting a digital audio signal after digital signal processing input from the digital signal processing section 24 in normal times. At the time of measurement, a switch unit for selecting and outputting the digital reference signal input from the reference signal generation unit 25, 27 a D / A conversion unit for D / A converting the digital signal input from the switch unit 26, and 28 This is an output gain switching unit that can switch the gain for the analog signal after D / A conversion, and an output analog signal Aout is output from the output gain switching unit 28. The output gain switching unit 28 enables the gain to be switched to a multiplier factor of 1/2 in the first to sixth stages. The first stage is x 1/32, the second stage is x 1/16, the third stage is x 1/8, the fourth stage is x 1/4, the fifth stage is x 1/2, the sixth stage is x The gain is set to 1/1. The output of the D / A conversion unit 27 is connected to the measurement mode side input terminal of the switch unit 20. A level measurement unit 29 measures the signal level of the digital signal output from the A / D conversion unit 22. Here, the signal level is measured by a peak value, but may be measured by an effective value (RMS). Reference numeral 30 denotes a correction coefficient storage unit that stores correction coefficients at each stage of the input gain switching unit 21.

31は制御部であり、測定時は1kHzの正弦波からなる基準信号を入力ゲイン切り換え部21に印加させ、入力ゲイン切り換え部21のゲインを第1乃至第6段階に順に切り換えながら、各段階でのレベル測定部29で測定した信号レベルを用いて入力ゲイン切り換え部21の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定し、補正係数記憶部30に記憶させる。通常時は、入力ゲイン切り換え部21を介してA/D変換部22に入力された入力アナログオーディオ信号の信号レベルを監視し、所定の第1の基準レベルを下回った小レベル状態が一定時間継続したとき、A/D変換部22の入力レベルを最適化して量子化歪が顕著にならないようにするため、入力ゲイン切り換え部21のゲインを1段階上げ、その分出力ゲイン切り換え部28のゲインを1段階下げる。この際、入力ゲイン切り換え部21のゲインに対応する補正係数をレベル補正部23にセットし、A/D変換後のディジタルオーディオ信号に補正係数を乗じて、入力ゲイン切り換え部21のゲイン誤差を補正させるとともに、ディジタル信号処理部24に対し過去のサンプルデータを算術シフト演算(1ビット左シフト)により2倍の大きさに補正させて、ゲイン切り換え前後で外部に出力される出力アナログオーディオ信号Aoutが不連続とならないようにする。
また、入力アナログオーディオ信号の信号レベルを監視しているときに、所定の第2の基準レベル(>第1の基準レベル)を越えて過大となったとき、A/D変換部22の入力レベルを最適化し、過大入力によるクリップが生じないようにするため、入力ゲイン切り換え部21のゲインを1段階下げ、その分出力ゲイン切り換え部28のゲインを1段階上げる。この際、入力ゲイン切り換え部21のゲインに対応する補正係数をレベル補正部23にセットし、A/D変換後のディジタルオーディオ信号に補正係数を乗じて、入力ゲイン切り換え部21のゲイン誤差を補正させるとともに、ディジタル信号処理部24に対し過去のサンプルデータを算術シフト演算(1ビット右シフト)により1/2倍の大きさに補正させて、ゲイン切り換え前後で外部に出力される出力アナログオーディオ信号Aoutが不連続とならないようにする。図5のA/D変換部22からD/A変換部27までがディジタル領域である。なお、ディジタル領域ではサンプルデータがnビット長で表現されるものとし、MSBが±の符号を表すものとする。但し、ディジタル信号処理部24は下位側に5ビット拡張して(n+5)ビット長で演算を行い、出力時にnビットに丸めるものとする。
Reference numeral 31 denotes a control unit, which applies a reference signal composed of a 1 kHz sine wave to the input gain switching unit 21 during measurement and switches the gain of the input gain switching unit 21 in order from the first to sixth stages. Using the signal level measured by the level measuring unit 29, the correction coefficient for each step for canceling the gain error of each step of the input gain switching unit 21 is determined and stored in the correction coefficient storage unit 30. During normal times, the signal level of the input analog audio signal input to the A / D conversion unit 22 via the input gain switching unit 21 is monitored, and a small level state below a predetermined first reference level continues for a certain period of time. Then, in order to optimize the input level of the A / D conversion unit 22 so that the quantization distortion does not become remarkable, the gain of the input gain switching unit 21 is increased by one step, and the gain of the output gain switching unit 28 is increased accordingly. Move down one step. At this time, a correction coefficient corresponding to the gain of the input gain switching unit 21 is set in the level correction unit 23, and the gain error of the input gain switching unit 21 is corrected by multiplying the digital audio signal after A / D conversion by the correction coefficient. At the same time, the digital signal processing unit 24 corrects the past sample data to a double size by arithmetic shift operation (1 bit left shift), and the output analog audio signal Aout output to the outside before and after the gain switching is obtained. Avoid discontinuities.
Further, when the signal level of the input analog audio signal is monitored, if the signal level exceeds a predetermined second reference level (> first reference level), the input level of the A / D conversion unit 22 is exceeded. In order to prevent clipping due to excessive input, the gain of the input gain switching unit 21 is decreased by one step, and the gain of the output gain switching unit 28 is increased by one step accordingly. At this time, a correction coefficient corresponding to the gain of the input gain switching unit 21 is set in the level correction unit 23, and the gain error of the input gain switching unit 21 is corrected by multiplying the digital audio signal after A / D conversion by the correction coefficient. In addition, the digital signal processing unit 24 corrects the past sample data to 1/2 times larger by arithmetic shift operation (1 bit right shift), and outputs an analog audio signal output to the outside before and after the gain switching. Aout should not be discontinuous. The digital domain is from A / D converter 22 to D / A converter 27 in FIG. In the digital domain, sample data is represented by an n-bit length, and MSB represents a sign of ±. However, it is assumed that the digital signal processing unit 24 expands to the lower side by 5 bits, performs an operation with a length of (n + 5) bits, and rounds to n bits at the time of output.

図7と図8は制御部31による測定時と通常時の制御処理を示すフローチャートであり、以下、これらの図を参照して上記した実施例の動作を説明する。
なお、ここでは、入力ゲイン切り換え部21の×1のゲインを基準とし(補正はしない)、他の段階のゲインの相対誤差を打ち消すように補正するものとする。
(1)測定時
装置の電源がオンすると、制御部31はスイッチ部20と26を測定モード側に切り換えさせ、基準信号生成部25に振幅がディジタル領域のフルスケールの半分より2割程度小さく、1kHz正弦波からなるディジタル基準信号を生成させ、更に入力ゲイン切り換え部21のゲインを第1段階の×1に切り換えさせる(図7のステップS10〜S12)。ディジタル基準信号の生成は正弦波の1周期分の波形のサンプルデータを繰り返し出力することで行なう。ディジタル基準信号はスイッチ部26を介してD/A変換部27に入力され、アナログ基準信号STに変換されたのち、スイッチ部20を介して入力ゲイン切り換え部21に入力される。ここで、ゲインが×1されたあと、A/D変換部22によりディジタル信号に変換される。そして、レベル測定部29によりピーク値が測定されて制御部31に入力される。制御部31は、入力したピーク値を基準レベルSPとして補正係数記憶部30に記憶し、かつ、第1段階のゲインの補正係数P1を1として記憶する(ステップS13〜S15)。
FIG. 7 and FIG. 8 are flowcharts showing control processing at the time of measurement and normal time by the control unit 31, and the operation of the above-described embodiment will be described below with reference to these drawings.
Here, the gain of x1 of the input gain switching unit 21 is used as a reference (not corrected), and correction is performed so as to cancel the relative error of gain at other stages.
(1) During measurement When the apparatus is turned on, the control unit 31 switches the switch units 20 and 26 to the measurement mode side, and the reference signal generation unit 25 has an amplitude that is about 20% smaller than half of the full scale of the digital domain. A digital reference signal composed of a 1 kHz sine wave is generated, and the gain of the input gain switching unit 21 is further switched to x1 in the first stage (steps S10 to S12 in FIG. 7). The digital reference signal is generated by repeatedly outputting sample data having a waveform of one sine wave. The digital reference signal is input to the D / A conversion unit 27 via the switch unit 26, converted into the analog reference signal ST, and then input to the input gain switching unit 21 via the switch unit 20. Here, after the gain is multiplied by 1, it is converted into a digital signal by the A / D converter 22. Then, the peak value is measured by the level measuring unit 29 and input to the control unit 31. The control unit 31 stores the input peak value in the correction coefficient storage unit 30 as the reference level SP, and stores the first-stage gain correction coefficient P1 as 1 (steps S13 to S15).

次に、入力ゲイン切り換え部21のゲインを1段階上げて×2に切り換えさせるとともに、基準信号生成部25に算術シフト演算によりディジタル基準信号の1周期分の波形の各サンプルデータを1ビット右シフトして振幅をそれまでの1/2倍とする(ステップS16〜S18)。この結果、アナログの基準信号STは振幅が1/2倍となって入力ゲイン切り換え部21に入力され、ゲインが×2とされる。制御部31は、レベル測定部29から入力したピーク値で基準レベルSPを除して×2の補正係数P2を計算し、補正係数記憶部30に記憶する(ステップS19、S20)。次に、入力ゲイン切り換え部21のゲインを1段階上げて×4に切り換えさせるとともに、基準信号生成部25に算術シフト演算によりディジタル基準信号の1周期分の波形の各サンプルデータを更に1ビット右シフトして振幅を更に1/2倍とし、レベル測定部29から入力したピーク値を基準レベルSPで除して×4の補正係数P3を計算し、補正係数記憶部30に記憶する(ステップS21でNO、S22、S17〜S20)。以下、第6段階の×32まで同様の処理を繰り返す。これにより、電源がオンされる度に、入力ゲイン切り換え部21の各段階のゲインの補正係数P1〜P6が決定されて補正係数記憶部30に記憶される。   Next, the gain of the input gain switching unit 21 is increased by one step and switched to x2, and the reference signal generating unit 25 shifts each sample data of the waveform of one cycle of the digital reference signal by one bit by arithmetic shift calculation. Then, the amplitude is set to ½ times the current amplitude (steps S16 to S18). As a result, the analog reference signal ST is halved in amplitude and input to the input gain switching unit 21, and the gain is set to x2. The control unit 31 calculates the correction coefficient P2 of x2 by dividing the reference level SP by the peak value input from the level measurement unit 29, and stores it in the correction coefficient storage unit 30 (steps S19 and S20). Next, the gain of the input gain switching unit 21 is increased by one step and switched to x4, and the reference signal generation unit 25 further shifts each sample data of the waveform of one cycle of the digital reference signal by one bit to the right by arithmetic shift calculation. By shifting, the amplitude is further halved, the peak value input from the level measuring unit 29 is divided by the reference level SP, and a correction coefficient P3 of x4 is calculated and stored in the correction coefficient storage unit 30 (step S21). NO, S22, S17 to S20). Thereafter, the same processing is repeated up to the sixth stage x32. Thus, every time the power is turned on, the gain correction coefficients P1 to P6 of each stage of the input gain switching unit 21 are determined and stored in the correction coefficient storage unit 30.

(2)通常時
補正係数の決定が終ると、制御部31は、スイッチ部20と26を通常モード側に切り換えさせるとともに入力ゲイン切り換え部21のゲインを第1段階の×1、出力ゲイン切り換え部28のゲインを第6段階の×1/1に切り換えさせる(図7のステップS21でYES、図8のステップS30、S31)。またレベル補正部23に×1に対応する補正係数P1=1をセットする(ステップS32)。音量調整後の入力アナログオーディオ信号Ainはスイッチ部20を介して入力ゲイン切り換え部21に入力され、ゲインが×1されたあとA/D変換部22によりディジタルオーディオ信号に変換される。そして、レベル補正部23で補正係数1が乗じられたあと、ディジタル信号処理部24で3次FIRフィルタにより低域成分が抽出される。そして、スイッチ部26を介してD/A変換部27に入力され、アナログオーディオ信号に変換されたあと、出力ゲイン切り換え部28でゲインが×1/1されて後段へ出力される。制御部31は常時、レベル測定部29で測定されたディジタルオーディオ信号のレベル(ここではピーク値)を監視しており(ステップS33)、一定時間以上、第1の基準レベルを下回る小レベル状態が続いているかの判断と、所定の一定レベル(=第2の基準レベル)を越えて過大になったかの判断を繰り返している(ステップS34、S35の繰り返し)。
(2) Normal time When the correction coefficient is determined, the control unit 31 switches the switch units 20 and 26 to the normal mode side and sets the gain of the input gain switching unit 21 to x1 in the first stage, and the output gain switching unit. The gain of 28 is switched to x1 / 1 in the sixth stage (YES in step S21 in FIG. 7, steps S30 and S31 in FIG. 8). Further, the correction coefficient P1 = 1 corresponding to x1 is set in the level correction unit 23 (step S32). The input analog audio signal Ain after the volume adjustment is input to the input gain switching unit 21 via the switch unit 20, and after being gained by × 1, it is converted into a digital audio signal by the A / D conversion unit 22. Then, after the level correction unit 23 multiplies the correction coefficient 1, the digital signal processing unit 24 extracts a low frequency component by a third-order FIR filter. Then, the signal is input to the D / A conversion unit 27 via the switch unit 26 and converted into an analog audio signal, and then the gain is multiplied by 1/1 and output to the subsequent stage by the output gain switching unit 28. The control unit 31 constantly monitors the level (here, the peak value) of the digital audio signal measured by the level measurement unit 29 (step S33), and a small level state below the first reference level is maintained for a certain time or longer. The determination of whether or not it has continued and the determination of whether or not it has exceeded a predetermined constant level (= second reference level) are repeated (repetition of steps S34 and S35).

若し、一定時間以上小レベル状態が続き、ステップS34でYESとなったとき、現在入力ゲイン切り換え部21がまだ第6段階でないので、入力ゲイン切り換え部21を第2段階の×2に切り換えてA/D変換部22のダイナミックレンジに対し最適化し、その分出力ゲイン切り換え部28を第5段階の×1/2に切り換える(ステップS36〜S38)。続いて、補正係数記憶部30から第2段階用の補正係数P2を読み出してレベル補正部23にセットし、入力ゲイン切り換え部21からレベル補正部23までのゲインが第1段階に対し正確に2倍となるようにし、かつ、ディジタル信号処理部24に対しFIRフィルタの過去のサンプルデータを算術シフト演算で1ビット左シフトして2倍の大きさとする(ステップS39、S40)。これにより、出力ゲイン切り換え部28から出力されるアナログオーディオ信号がゲイン切り換え前後で不連続となるのが防止される。   If the low level state continues for a certain time or more and the answer is YES in step S34, the current input gain switching unit 21 is not yet in the sixth stage, so the input gain switching unit 21 is switched to x2 in the second stage. The dynamic range of the A / D conversion unit 22 is optimized, and the output gain switching unit 28 is switched to x1 / 2 of the fifth stage accordingly (steps S36 to S38). Subsequently, the correction coefficient P2 for the second stage is read from the correction coefficient storage section 30 and set in the level correction section 23, and the gain from the input gain switching section 21 to the level correction section 23 is accurately 2 with respect to the first stage. In addition, the past sample data of the FIR filter is shifted left by 1 bit by arithmetic shift operation with respect to the digital signal processing unit 24 so as to be doubled (steps S39 and S40). This prevents the analog audio signal output from the output gain switching unit 28 from becoming discontinuous before and after the gain switching.

その後、再び一定時間以上の小レベル状態が続いたとき、ステップS34でYESと判断し、入力ゲイン切り換え部21を第3段階の×4に切り換えてA/D変換部22のダイナミックレンジに対し最適化し、その分入力ゲイン切り換え部21を第4段階の×1/4に切り換える(ステップS36〜S38)。続いて、補正係数記憶部30から第3段階用の補正係数P3を読み出してレベル補正部23にセットし、入力ゲイン切り換え部21からレベル補正部23までのゲインが第1段階に対し正確に4倍となるようにし、かつ、ディジタル信号処理部24に対しFIRフィルタの過去のサンプルデータを算術シフト演算で1ビット左シフトして2倍の大きさとする(ステップS39、S40)。   Thereafter, when the low level state continues for a certain time or more again, it is determined as YES in step S34, and the input gain switching unit 21 is switched to x4 in the third stage to optimize the dynamic range of the A / D conversion unit 22. Accordingly, the input gain switching unit 21 is switched to x1 / 4 of the fourth stage (steps S36 to S38). Subsequently, the correction coefficient P3 for the third stage is read from the correction coefficient storage section 30 and set in the level correction section 23, and the gain from the input gain switching section 21 to the level correction section 23 is accurately 4 with respect to the first stage. In addition, the past sample data of the FIR filter is shifted left by 1 bit by arithmetic shift operation with respect to the digital signal processing unit 24 so as to be doubled (steps S39 and S40).

その後、測定レベルが所定の一定レベルを越える過大になったとき、ステップS35でYESと判断し、現在入力ゲイン切り換え部21がまだ第1段階でないので、入力ゲイン切り換え部21を第2段階の×2に戻してA/D変換部22のダイナミックレンジに対し過大入力とならないように最適化し、その分出力ゲイン切り換え部28を第5段階の×1/2に切り換える(ステップS41〜S43)。続いて、補正係数記憶部30から第2段階用の補正係数P2を読み出してレベル補正部23にセットし、入力ゲイン切り換え部21からレベル補正部23までのゲインが第1段階に対し正確に2倍となるようにし、かつ、ディジタル信号処理部24に対しFIRフィルタの過去のサンプルデータを算術シフト演算で1ビット右シフトして1/2倍の大きさとする(ステップS44、S45)。これにより、ゲイン切り換えの前後で出力ゲイン切り換え部28から出力されるアナログオーディオ信号が不連続となるのが防止される。   After that, when the measurement level becomes excessive exceeding a predetermined constant level, it is determined YES in step S35, and the current input gain switching unit 21 is not yet in the first stage. Returning to 2, the dynamic range of the A / D conversion unit 22 is optimized so as not to become an excessive input, and the output gain switching unit 28 is switched to x1 / 2 of the fifth stage accordingly (steps S41 to S43). Subsequently, the correction coefficient P2 for the second stage is read from the correction coefficient storage section 30 and set in the level correction section 23, and the gain from the input gain switching section 21 to the level correction section 23 is accurately 2 with respect to the first stage. In addition, the past sample data of the FIR filter is shifted by one bit to the digital signal processing unit 24 by an arithmetic shift operation so as to be ½ times larger (steps S44 and S45). This prevents the analog audio signal output from the output gain switching unit 28 before and after gain switching from becoming discontinuous.

この実施例によれば、A/D変換対象の入力アナログオーディオ信号のレベルに応じて入力ゲイン切り換え部21のゲインを切り換え、レベルを最適化してA/D変換部22に入力することで、A/D変換で生じる量子化歪を低減することができる。また、基準信号を用いて入力ゲイン切り換え部21の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定し、入力ゲイン切り換え部21にA/D変換対象のアナログオーディオ信号が印加されているときに、入力ゲイン切り換え部21のゲインに応じてA/D変換部22から出力されたディジタルオーディオ信号に対しレベル補正を行なうようにしたので、アナログ回路で構成される入力ゲイン切り換え部21の各段階のゲインに誤差があっても、信号に対するゲインを正確に切り換えることができる。
また、A/D変換後のディジタルオーディオ信号をディジタル信号処理する場合、入力ゲイン切り換え部21のゲイン切り換えと連動してディジタル信号処理部24に保持された過去のサンプルデータのレベルを切り換える必要があるが、入力ゲイン切り換え部21の複数段階のゲイン設定値を2の乗数倍で切り換えるようにしたので、過去のサンプルデータのレベルの切り換えを算術シフト演算(右シフトまたは左シフト)で簡単に実行することができる。
According to this embodiment, the gain of the input gain switching unit 21 is switched according to the level of the input analog audio signal to be A / D converted, and the level is optimized and input to the A / D conversion unit 22. Quantization distortion caused by / D conversion can be reduced. Further, a correction coefficient for each step for canceling the gain error of each step of the input gain switching unit 21 is determined using the reference signal, and an analog audio signal to be A / D converted is applied to the input gain switching unit 21. Since the level correction is performed on the digital audio signal output from the A / D conversion unit 22 in accordance with the gain of the input gain switching unit 21, the input gain switching unit configured by an analog circuit is used. Even if there is an error in the gain at each stage of 21, the gain for the signal can be switched accurately.
When digital signal processing is performed on the digital audio signal after A / D conversion, it is necessary to switch the level of past sample data held in the digital signal processing unit 24 in conjunction with the gain switching of the input gain switching unit 21. However, since the gain setting values in a plurality of stages of the input gain switching unit 21 are switched by a multiplier of 2, the level of the past sample data can be easily switched by arithmetic shift calculation (right shift or left shift). be able to.

なお、上記した実施例では、第1段階のゲインを基準にしたときの第2段階乃至第6段階のゲインの相対誤差を打ち消すように補正したが、各段階のゲインの絶対誤差を打ち消すように補正しても良い。この場合、振幅Wが既知のディジタル基準信号STをD/A変換後、第3段階のゲインに切り換えられた入力ゲイン切り換え部21に入力させた状態でレベル測定部29でピーク値wが測定されたとき、補正係数P3は、
W×4=w×P3
P3=(W/w)×4
となる。他の段階の補正係数も同様にして求めることができる。
また、上記した実施例では、通常時に、D/A変換部27から出力されたアナログ信号を出力ゲイン切り換え部28によりレベルを可変したのち外部へ出力するようにしたが、とくにレベル可変が必要でなければD/A変換部27の出力をそのまま外部へ出力するようにしても良い(符号Aout’参照)。更に、アナログ形式への変換も必要なければ、スイッチ部26から出力されたディジタル信号をそのまま外部へ出力するようにしても良い(符号Dout参照)。
In the above-described embodiment, the correction is performed so as to cancel the relative error of the gains of the second to sixth stages when the gain of the first stage is used as a reference. However, the absolute error of the gain of each stage is canceled. It may be corrected. In this case, the peak value w is measured by the level measuring unit 29 in a state in which the digital reference signal ST having a known amplitude W is D / A converted and then input to the input gain switching unit 21 switched to the third stage gain. When the correction coefficient P3 is
W × 4 = w × P3
P3 = (W / w) × 4
It becomes. Correction coefficients at other stages can be obtained in the same manner.
In the above-described embodiment, the analog signal output from the D / A converter 27 is output to the outside after the level is changed by the output gain switching unit 28 in the normal state. If not, the output of the D / A converter 27 may be output to the outside as it is (see reference Aout ′). Furthermore, if conversion to an analog format is not necessary, the digital signal output from the switch unit 26 may be output to the outside as it is (see reference sign Dout).

図9を参照して本発明の第2実施例を説明する。図9は本発明に係る帯域制限用信号処理装置の構成を示すブロック図であり、図5と同一の構成部分には同一の符号が付してある。
図5の第1実施例では、A/D変換部の前段に、A/D変換対象の入力アナログオーディオ信号のレベルに応じてゲインを切り換え、A/D変換部の入力レベルを最適化する入力ゲイン切り換え部を設け、この入力ゲイン切り換え部のゲイン誤差を補正するようにしたのに対し、図9ではD/A変換部の前段に、D/A変換対象のディジタルオーディオ信号のレベルに応じてゲインを切り換え、D/A変換部の入力レベルを最適化するゲイン切り換え部を設けるとともに、D/A変換部の後段に前記ゲイン切り換え部のゲインを相殺するようにゲインが切り換えられる出力ゲイン切り換え部を設け、さらにD/A変換部の前段にレベル補正部を装入し、出力ゲイン切り換え部のゲイン誤差を補正するようにしたものである。
図9において、32はスイッチ部であり、通常モード時は入力アナログオーディオ信号Ainを選択して出力し、測定モード時は後述する出力ゲイン切り換え部28から出力されたアナログの基準信号ST’を選択して出力する。24Aはディジタル信号処理部であり、図6に示す3次FIRフィルタのシグナルフローに従い、所定のカットオフ周波数以下の成分だけ通過させる低域通過フィルタとしての信号処理を実行する。33はディジタル信号処理部24Aから出力された帯域制限後のディジタルオーディオ信号に対するゲインを切り換えるゲイン切り換え部であり、算術シフト演算によりゲインを第1乃至第6の6段階に2の乗数倍に切り換え可能とする。第1段階は×1、第2段階は×2、第3段階は×4、第4段階は×8、第5段階は×16、第6段階は×32のゲインに設定されている。ゲイン切り換え部33はゲインを×1とするとき、ディジタル信号処理部24Aから出力されたディジタルオーディオ信号のサンプルデータをそのまま出力させ、ゲインを×2k (但し、k=1、2、3、4、5)とするとき、サンプルデータを算術シフト演算によりkビット左シフトして信号レベルを可変する。
A second embodiment of the present invention will be described with reference to FIG. FIG. 9 is a block diagram showing the configuration of the band-limiting signal processing apparatus according to the present invention. The same components as those in FIG.
In the first embodiment shown in FIG. 5, the input is switched before the A / D converter in accordance with the level of the input analog audio signal to be A / D converted to optimize the input level of the A / D converter. A gain switching unit is provided to correct the gain error of the input gain switching unit. On the other hand, in FIG. 9, the D / A conversion unit is preceded by a D / A conversion target digital audio signal level. Provided with a gain switching unit that switches the gain and optimizes the input level of the D / A conversion unit, and an output gain switching unit that switches the gain so as to cancel the gain of the gain switching unit after the D / A conversion unit And a level correction unit is inserted before the D / A conversion unit to correct the gain error of the output gain switching unit.
In FIG. 9, reference numeral 32 denotes a switch unit which selects and outputs an input analog audio signal Ain in the normal mode, and selects an analog reference signal ST ′ output from an output gain switching unit 28 described later in the measurement mode. And output. Reference numeral 24A denotes a digital signal processing unit that executes signal processing as a low-pass filter that passes only components having a frequency equal to or lower than a predetermined cutoff frequency in accordance with the signal flow of the third-order FIR filter shown in FIG. A gain switching unit 33 switches the gain for the band-limited digital audio signal output from the digital signal processing unit 24A. The gain can be switched to a multiplier of 2 in the first to sixth stages by arithmetic shift calculation. And The first stage is set to a gain of x1, the second stage is set to x2, the third stage is set to x4, the fourth stage is set to x8, the fifth stage is set to x16, and the sixth stage is set to a gain of x32. When the gain switching unit 33 sets the gain to x1, the sample data of the digital audio signal output from the digital signal processing unit 24A is output as it is, and the gain is set to x2 k (where k = 1, 2, 3, 4 5), the signal level is varied by shifting the sample data to the left by k bits by an arithmetic shift operation.

28はD/A変換後のアナログオーディオ信号に対するゲインを切り換え可能な出力ゲイン切り換え部である。この出力ゲイン切り換え部28はゲインを第1乃至第6の6段階に1/2の乗数倍に切り換え可能とする。第1段階は×1/32、第2段階は×1/16、第3段階は×1/8、第4段階は×1/4、第5段階は×1/2、第6段階は×1/1のゲインに設定されている。但し、素子部品の回路定数の選択の制限と回路定数のバラツキから各段階の実際のゲインは設定値と一致せず誤差がある。この誤差は後述するように、ディジタル領域で補正される。34はレベル補正部であり、D/A変換対象のディジタルオーディオ信号に対し、出力ゲイン切り換え部28のゲイン誤差を打ち消すようにレベル補正を行う。25は出力ゲイン切り換え部28のゲイン測定用のディジタル基準信号を生成する基準信号生成部、26は通常時はレベル補正部34を介して入力されたディジタル信号処理後のディジタルオーディオ信号を選択して出力し、測定時は基準信号生成部25から入力されたディジタル基準信号を選択して出力するスイッチ部、30Aは補正係数記憶部であり、出力ゲイン切り換え部28の各段階の補正係数を記憶する。35はスイッチ部であり、通常モード時はレベル補正部34の出力を選択してレベル測定部29へ出力し、測定モード時はA/D変換部22の出力を選択して出力する。   An output gain switching unit 28 can switch the gain for the analog audio signal after D / A conversion. The output gain switching unit 28 can switch the gain to a multiplier factor of 1/2 in the first to sixth stages. The first stage is x 1/32, the second stage is x 1/16, the third stage is x 1/8, the fourth stage is x 1/4, the fifth stage is x 1/2, the sixth stage is x The gain is set to 1/1. However, the actual gain at each stage does not match the set value due to the limitation of the selection of the circuit constants of the element parts and the variation of the circuit constants, and there is an error. This error is corrected in the digital domain as will be described later. A level correction unit 34 performs level correction on the digital audio signal to be D / A converted so as to cancel the gain error of the output gain switching unit 28. Reference numeral 25 is a reference signal generation section for generating a digital reference signal for gain measurement of the output gain switching section 28, and 26 is for selecting a digital audio signal after processing the digital signal input via the level correction section 34 in normal times. A switch unit that outputs and selects and outputs the digital reference signal input from the reference signal generation unit 25 at the time of measurement, and 30A is a correction coefficient storage unit that stores correction coefficients at each stage of the output gain switching unit 28. . Reference numeral 35 denotes a switch unit that selects and outputs the output of the level correction unit 34 to the level measurement unit 29 in the normal mode, and selects and outputs the output of the A / D conversion unit 22 in the measurement mode.

31Aは制御部であり、測定時は1kHzの正弦波からなる基準信号を出力ゲイン切り換え部28に印加させ、スイッチ部32、A/D変換部22、スイッチ部35を介してレベル測定部29に入力し、出力ゲイン切り換え部28のゲインを第6乃至第1段階に順に切り換えながら、各段階でのレベル測定部29で測定した信号レベルを用いて出力ゲイン切り換え部28の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定し、補正係数記憶部30Aに記憶させる。通常時は、レベル補正部34からスイッチ部26を介してD/A変換部27に入力されるディジタルオーディオ信号の信号レベルを監視し、所定の第1の基準レベルを下回った小レベル状態が一定時間継続したとき、D/A変換部27の入力レベルを最適化して量子化歪が顕著にならないようにするため、ゲイン切り換え部33のゲインを1段階増大させ、その分出力ゲイン切り換え部28のゲインを1段階下げる。この際、出力ゲイン切り換え部28のゲインに対応する補正係数をレベル補正部34にセットし、D/A変換対象のディジタルオーディオ信号に補正係数を乗じて、出力ゲイン切り換え部28のゲイン誤差を補正させて、ゲイン切り換え前後で出力アナログオーディオ信号Aoutが不連続とならないようにする。
また、D/A変換部27に入力されるディジタルオーディオ信号の信号レベルを監視しているときに、所定の第2の基準レベル(>第1の基準レベル)を越えて過大となったとき、D/A変換部27の入力レベルを最適化し、過大入力によるクリップが生じないようにするため、ゲイン切り換え部33のゲインを1段階下げ、その分出力ゲイン切り換え部28のゲインを1段階上げる。この際、出力ゲイン切り換え部28のゲインに対応する補正係数をレベル補正部34にセットし、D/A変換対象のディジタルオーディオ信号に補正係数を乗じて、出力ゲイン切り換え部28のゲイン誤差を補正させて、ゲイン切り換え前後で出力アナログオーディオ信号Aoutが不連続とならないようにする。図9のA/D変換部22からD/A変換部27までがディジタル領域である。なお、ディジタル領域ではサンプルデータがnビット長で表現されるものとし、MSBが±の符号を表すものとする。但し、ディジタル信号処理部24Aは下位側に5ビット拡張して(n+5)ビット長で演算を行い、ゲイン切り換え部33への出力も(n+5)ビット長で行い、ゲイン切り換え部33は算術シフト演算後、出力する際にnビットに丸めるものとする。
他の構成部分は図5と同様に構成されている。
Reference numeral 31A denotes a control unit, which applies a reference signal composed of a 1 kHz sine wave to the output gain switching unit 28 during measurement and causes the level measurement unit 29 to pass through the switch unit 32, the A / D conversion unit 22, and the switch unit 35. Input, the gain error at each stage of the output gain switching unit 28 using the signal level measured by the level measurement unit 29 at each stage while sequentially switching the gain of the output gain switching unit 28 from the sixth to the first stage. The correction coefficient for each step for canceling is determined and stored in the correction coefficient storage unit 30A. During normal times, the signal level of the digital audio signal input from the level correction unit 34 to the D / A conversion unit 27 via the switch unit 26 is monitored, and the small level state below the predetermined first reference level is constant. When the time continues, in order to optimize the input level of the D / A conversion unit 27 so that the quantization distortion does not become significant, the gain of the gain switching unit 33 is increased by one step, and the output gain switching unit 28 Decrease gain by one level. At this time, a correction coefficient corresponding to the gain of the output gain switching unit 28 is set in the level correction unit 34, and the gain error of the output gain switching unit 28 is corrected by multiplying the digital audio signal to be D / A converted by the correction coefficient. Thus, the output analog audio signal Aout is prevented from becoming discontinuous before and after the gain switching.
Further, when the signal level of the digital audio signal input to the D / A converter 27 is monitored, when the signal level exceeds a predetermined second reference level (> first reference level), In order to optimize the input level of the D / A conversion unit 27 and prevent clipping due to excessive input, the gain of the gain switching unit 33 is decreased by one step, and the gain of the output gain switching unit 28 is increased by one step accordingly. At this time, a correction coefficient corresponding to the gain of the output gain switching unit 28 is set in the level correction unit 34, and the gain error of the output gain switching unit 28 is corrected by multiplying the digital audio signal to be D / A converted by the correction coefficient. Thus, the output analog audio signal Aout is prevented from becoming discontinuous before and after the gain switching. The A / D converter 22 to the D / A converter 27 in FIG. In the digital domain, sample data is represented by an n-bit length, and MSB represents a sign of ±. However, the digital signal processing unit 24A expands to the lower side by 5 bits and performs calculation with (n + 5) bit length, and outputs to the gain switching unit 33 with (n + 5) bit length. The gain switching unit 33 performs arithmetic shift calculation. Later, when outputting, it shall round to n bits.
The other components are configured in the same manner as in FIG.

図10と図11は制御部31Aによる測定時と通常時の制御処理を示すフローチャートであり、以下、これらの図を参照して上記した第2実施例の動作を説明する。
なお、ここでは、出力ゲイン切り換え部28の×1/1のゲインを基準とし(補正はしない)、他の段階のゲインの相対誤差を打ち消すように補正するものとする。
(1)測定時
装置の電源がオンすると、制御部31Aはスイッチ部32、26、35を測定モード側に切り換えさせ、基準信号生成部25に振幅がディジタル領域のフルスケールの1/2より2割程度小さく、1kHz正弦波からなるディジタル基準信号を生成させ、更に出力ゲイン切り換え部28のゲインを第6段階の×1/1に切り換えさせる(図10のステップS50〜S52)。ディジタル基準信号の生成は正弦波の1周期分の波形のサンプルデータを繰り返し出力することで行なう。ディジタル基準信号はスイッチ部26を介してD/A変換部27に入力され、アナログ基準信号に変換されたのち、出力ゲイン切り換え部28に入力される。ここで、ゲインが×1されたあと、アナログ基準信号ST’としてスイッチ部32を介してA/D変換部22に入力され、ディジタル信号に変換される。そして、レベル測定部29によりピーク値が測定されて制御部31Aに入力される。制御部31Aは、入力したピーク値を基準レベルSQとして補正係数記憶部30Aに記憶し、かつ、第6段階のゲインの補正係数Q6を1として記憶する(ステップS53〜S55)。
FIG. 10 and FIG. 11 are flowcharts showing control processing at the time of measurement and normal time by the control unit 31A, and the operation of the second embodiment will be described below with reference to these drawings.
Here, it is assumed that correction is performed so as to cancel the relative error of gains at other stages, with the gain of 1/11 of the output gain switching unit 28 as a reference (not corrected).
(1) During measurement When the power of the apparatus is turned on, the control unit 31A switches the switch units 32, 26, and 35 to the measurement mode side, and the reference signal generation unit 25 has an amplitude 2 from 1/2 of the full scale of the digital domain. A digital reference signal composed of a 1 kHz sine wave is generated that is relatively small, and the gain of the output gain switching unit 28 is switched to x1 / 1 of the sixth stage (steps S50 to S52 in FIG. 10). The digital reference signal is generated by repeatedly outputting sample data having a waveform of one sine wave. The digital reference signal is input to the D / A conversion unit 27 via the switch unit 26, converted into an analog reference signal, and then input to the output gain switching unit 28. Here, after the gain is multiplied by 1, it is input as an analog reference signal ST ′ to the A / D conversion unit 22 via the switch unit 32 and converted into a digital signal. Then, the peak value is measured by the level measuring unit 29 and input to the control unit 31A. The control unit 31A stores the input peak value in the correction coefficient storage unit 30A as the reference level SQ, and stores the sixth-stage gain correction coefficient Q6 as 1 (steps S53 to S55).

次に、出力ゲイン切り換え部28のゲインを1段階下げて×1/2に切り換えさせ(ステップS56、S57)、レベル測定部29から入力したピーク値で基準レベルSQの1/2のレベルを除して×1/2の補正係数Q5を計算し、補正係数記憶部30Aに記憶する(ステップS58、S59)。次に、出力ゲイン切り換え部28のゲインを1段階下げて×1/4に切り換えさせ、レベル測定部29から入力したピーク値を基準レベルSQの1/4のレベルで除して×1/4の補正係数Q4を計算し、補正係数記憶部30Aに記憶する(ステップS60でNO、S61、S57〜S59)。以下、第1段階の×1/32まで同様の処理を繰り返す。これにより、電源がオンされる度に、出力ゲイン切り換え部28の各段階のゲインの補正係数Q1〜Q6が決定されて補正係数記憶部30Aに記憶される。   Next, the gain of the output gain switching unit 28 is lowered by one step and switched to x1 / 2 (steps S56, S57), and the peak value input from the level measuring unit 29 is used to remove a level that is 1/2 of the reference level SQ. Then, a correction coefficient Q5 of x1 / 2 is calculated and stored in the correction coefficient storage unit 30A (steps S58 and S59). Next, the gain of the output gain switching unit 28 is lowered by one step to be switched to × 1/4, and the peak value input from the level measuring unit 29 is divided by the level of 1/4 of the reference level SQ × 1/4. Correction coefficient Q4 is calculated and stored in the correction coefficient storage unit 30A (NO in step S60, S61, S57 to S59). Thereafter, the same processing is repeated up to × 1/32 in the first stage. Thus, each time the power is turned on, the gain correction coefficients Q1 to Q6 of each stage of the output gain switching unit 28 are determined and stored in the correction coefficient storage unit 30A.

(2)通常時
補正係数の決定が終ると、制御部31Aは、スイッチ部32、26、35を通常モード側に切り換えさせるとともにゲイン切り換え部33のゲインを第1段階の×1、出力ゲイン切り換え部28のゲインを第6段階の×1/1に切り換えさせる(図10のステップS61でYES、図11のステップS80、S81)。またレベル補正部34に×1/1に対応する補正係数Q6=1をセットする(ステップS82)。音量調整後の入力アナログオーディオ信号Ainはスイッチ部32を介してA/D変換部22に入力され、ディジタルオーディオ信号に変換される。そして、ディジタル信号処理部24Aで3次FIRフィルタにより低域成分が抽出される。ディジタル信号処理後のディジタルオーディオ信号はゲイン切り換え部33によりゲインが×1(シフト無し)とされ、更にレベル補正部34で補正係数1が乗じられたあと、スイッチ部26を介してD/A変換部27に入力され、アナログオーディオ信号に変換されたあと、出力ゲイン切り換え部28でゲインが×1/1されて後段へ出力される。制御部31Aは常時、レベル測定部29で測定されたディジタルオーディオ信号のレベル(ここではピーク値)を監視しており(ステップS83)、一定時間以上小レベル状態が続いているかの判断と、一定レベルを越えて過大になったかの判断を繰り返している(ステップS84、S85の繰り返し)。
(2) Normal time When the correction coefficient is determined, the control unit 31A switches the switch units 32, 26, and 35 to the normal mode side and switches the gain of the gain switching unit 33 to the first stage x1 and the output gain. The gain of the unit 28 is switched to x1 / 1 in the sixth stage (YES in step S61 in FIG. 10, steps S80 and S81 in FIG. 11). Further, the correction coefficient Q6 = 1 corresponding to x1 / 1 is set in the level correction unit 34 (step S82). The input analog audio signal Ain after volume adjustment is input to the A / D conversion unit 22 via the switch unit 32 and converted into a digital audio signal. Then, a low-frequency component is extracted by the third-order FIR filter in the digital signal processing unit 24A. The digital audio signal after the digital signal processing is set to a gain of x1 (no shift) by the gain switching unit 33, further multiplied by the correction coefficient 1 by the level correction unit 34, and then D / A converted via the switch unit 26. After being input to the unit 27 and converted into an analog audio signal, the output gain switching unit 28 gains × 1/1 and is output to the subsequent stage. The control unit 31A constantly monitors the level (here, the peak value) of the digital audio signal measured by the level measurement unit 29 (step S83), and determines whether or not the low level state continues for a certain period of time. The determination of whether the level has exceeded the level is repeated (repetition of steps S84 and S85).

若し、一定時間以上小レベル状態が続き、ステップS84でYESとなったとき、現在ゲイン切り換え部33がまだ第6段階でないので、ゲイン切り換え部21を第2段階の×2に切り換え(入力したサンプルデータに対し算術シフト演算により、1ビット左シフトさせる)、D/A変換部27のダイナミックレンジに対し最適化し、その分出力ゲイン切り換え部28を第5段階の×1/2に切り換える(ステップS86〜S88)。続いて、補正係数記憶部30Aから第5段階用の補正係数Q5を読み出してレベル補正部34にセットし、レベル補正部34から出力ゲイン切り換え部28までのゲインが第6段階に対し正確に1/2倍となるようにする(ステップS89)。これにより、ゲイン切り換え前後で出力ゲイン切り換え部28から出力されるアナログオーディオ信号Aoutが不連続となるのが防止される。   If the low level state continues for a certain time or more and the answer is YES in step S84, the current gain switching unit 33 is not yet in the sixth stage, so the gain switching unit 21 is switched (input) to the second stage x2. The sample data is shifted to the left by 1 bit by an arithmetic shift operation), and the dynamic range of the D / A converter 27 is optimized, and the output gain switching unit 28 is switched to x1 / 2 of the fifth stage accordingly (step) S86-S88). Subsequently, the correction coefficient Q5 for the fifth stage is read from the correction coefficient storage section 30A and set in the level correction section 34, and the gain from the level correction section 34 to the output gain switching section 28 is exactly 1 with respect to the sixth stage. / 2 times (step S89). This prevents the analog audio signal Aout output from the output gain switching unit 28 before and after gain switching from becoming discontinuous.

その後、再び一定時間以上の小レベル状態が続いたとき、ステップS84でYESと判断し、ゲイン切り換え部33を第3段階の×4に切り換え(入力したサンプルデータに対し算術シフト演算により、2ビット左シフトさせる)、D/A変換部27のダイナミックレンジに対し最適化し、その分出力ゲイン切り換え部28を第4段階の×1/4に切り換える(ステップS86〜S88)。続いて、補正係数記憶部30Aから第4段階用の補正係数Q4を読み出してレベル補正部34にセットし、レベル補正部34から出力ゲイン切り換え部28までのゲインが第6段階に対し正確に1/4倍となるようにする(ステップS89)。   Thereafter, when the low level state continues for a certain time or more again, it is determined YES in step S84, and the gain switching unit 33 is switched to the third stage x4 (2 bits are obtained by arithmetic shift operation on the input sample data). Left-shifted), the dynamic range of the D / A converter 27 is optimized, and the output gain switching unit 28 is switched to x1 / 4 of the fourth stage accordingly (steps S86 to S88). Subsequently, the correction coefficient Q4 for the fourth stage is read from the correction coefficient storage section 30A and set in the level correction section 34, and the gain from the level correction section 34 to the output gain switching section 28 is exactly 1 with respect to the sixth stage. / 4 times (step S89).

その後、測定レベルが一定レベルを越える過大になったとき、ステップS85でYESと判断し、現在ゲイン切り換え部33がまだ第1段階でないので、ゲイン切り換え部33を第2段階の×2に切り換え(入力したサンプルデータに対し算術シフト演算により、1ビット左シフトさせる)、D/A変換部27のダイナミックレンジに対し過大入力とならないように最適化し、その分出力ゲイン切り換え部28を第5段階の×1/2に切り換える(ステップS90〜S92)。続いて、補正係数記憶部30Aから第5段階用の補正係数Q5を読み出してレベル補正部34にセットし、レベル補正部34から出力ゲイン切り換え部28までのゲインが第6段階に対し正確に1/2倍となるようにする(ステップS93、S94)。これにより、ゲイン切り換え前後で出力ゲイン切り換え部28Aから出力されるアナログオーディオ信号Aoutが不連続となるのが防止される。   Thereafter, when the measurement level becomes excessive exceeding a certain level, YES is determined in step S85, and the current gain switching unit 33 is not yet in the first stage, so the gain switching unit 33 is switched to x2 in the second stage ( The input sample data is shifted to the left by 1 bit by an arithmetic shift operation), and is optimized so that the dynamic range of the D / A converter 27 does not become an excessive input. Switching to × 1/2 (steps S90 to S92). Subsequently, the correction coefficient Q5 for the fifth stage is read from the correction coefficient storage section 30A and set in the level correction section 34, and the gain from the level correction section 34 to the output gain switching section 28 is exactly 1 with respect to the sixth stage. / 2 times (steps S93 and S94). This prevents the analog audio signal Aout output from the output gain switching unit 28A before and after gain switching from becoming discontinuous.

この実施例によれば、D/A変換対象のディジタルオーディオ信号のレベルに応じてゲイン切り換え部33のゲインを切り換え、レベルを最適化してD/A変換部27に入力することで、D/A変換で生じる量子化歪を低減することができる。また、基準信号を用いて出力ゲイン切り換え部28の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定し、出力ゲイン切り換え部28にD/A変換されたアナログオーディオ信号が印加されているときに、出力ゲイン切り換え部28のゲインに応じてD/A変換対象のディジタルオーディオ信号に対しレベル補正を行なうようにしたので、アナログ回路で構成される出力ゲイン切り換え部28の各段階のゲインに誤差があっても、信号に対するゲインを正確に切り換えることができる。
また、ゲイン切り換え部33は信号処理部24Aの出力に対するゲインを2の乗数倍で切り換えるようにしたので、ゲイン切り換えのための演算をビットシフト動作で簡単に実行することができる。
According to this embodiment, the gain of the gain switching unit 33 is switched according to the level of the digital audio signal to be D / A converted, and the level is optimized and input to the D / A conversion unit 27. The quantization distortion caused by the conversion can be reduced. Further, a correction coefficient for each step for canceling the gain error of each step of the output gain switching unit 28 is determined using the reference signal, and the D / A converted analog audio signal is applied to the output gain switching unit 28. Since the level correction is performed on the digital audio signal to be D / A converted in accordance with the gain of the output gain switching unit 28, each stage of the output gain switching unit 28 composed of an analog circuit is performed. Even if there is an error in the gain, the gain for the signal can be switched accurately.
Further, since the gain switching unit 33 switches the gain with respect to the output of the signal processing unit 24A by a multiplier factor of 2, the calculation for gain switching can be easily executed by the bit shift operation.

なお、上記した第2実施例では、第6段階のゲインを基準にしたときの第2段階乃至第5段階のゲインの相対誤差を打ち消すように補正したが、各段階のゲインの絶対誤差を打ち消すように補正しても良い。この場合、例えば振幅Yが既知のディジタル基準信号をD/A変換し第3段階の×1/8のゲインに切り換えられた出力ゲイン切り換え部28に入力させた状態でレベル測定部29でピーク値yが測定されたとき、補正係数Q3は、
Y×(1/8)=y×Q3
Q3=(X/y)×(1/8)
となる。他の段階の補正係数も同様にして求めることができる。
また、上記した第2実施例では、通常時に、アナログオーディオ信号Ainをスイッチ部32を介してA/D変換部22に入力するようにしたが、前段機器がディジタル出力の場合、図12に示す如く、ディジタルオーディオ信号Dinを直接、ディジタル信号処理部24Aに入力させるようにしても良い。この場合、アナログ基準信号ST’は直接、A/D変換部22に入力すれば良い。
In the second embodiment described above, the correction is made so as to cancel the relative error of the gains of the second to fifth stages when the gain of the sixth stage is used as a reference. However, the absolute error of the gain of each stage is canceled. You may correct | amend as follows. In this case, for example, a digital reference signal having a known amplitude Y is D / A converted and input to the output gain switching unit 28 that has been switched to the third stage × 1/8 gain. When y is measured, the correction factor Q3 is
Y × (1/8) = y × Q3
Q3 = (X / y) × (1/8)
It becomes. Correction coefficients at other stages can be obtained in the same manner.
In the second embodiment described above, the analog audio signal Ain is input to the A / D conversion unit 22 through the switch unit 32 at normal times. However, when the preceding device is a digital output, it is shown in FIG. As described above, the digital audio signal Din may be directly input to the digital signal processing unit 24A. In this case, the analog reference signal ST ′ may be directly input to the A / D converter 22.

図13を参照して本発明の第3実施例を説明する。図13は本発明に係る音量調整装置の構成を示すブロック図であり、図9と同一の構成部分には同一の符号が付してある。この第3実施例の音量調整装置は、ディジタル領域で0〜−5dBまで1dBステップで減衰を行い、アナログ領域で0〜−30dBまで6dBステップで減衰を行い、全体で0〜−35dBの範囲を1dBステップで音量調整可能としたものである。
図13において、32はスイッチ部であり、通常モード時は音量調整対象の入力アナログオーディオ信号Ainを選択して出力し、測定モード時は後述する出力ゲイン切り換え部28Bから出力されたアナログの基準信号ST’を選択して出力する。24Bはディジタル信号処理部であり、ディジタルオーディオ信号に対し0dB〜−5dBの範囲で1dBのステップ幅でゲインを切り換えるための演算処理(0dB、−1dB、−2dB、−3dB、−4dB、−5dBに相当するゲイン係数の乗算処理)を実行する。28BはD/A変換後のアナログオーディオ信号に対するゲインを切り換え可能な出力ゲイン切り換え部である。この出力ゲイン切り換え部28Bはゲイン(ここでは0dB以下の減衰)を第1乃至第6の6段階に切り換え可能とする。第1段階は0dB、第2段階は−6dB、第3段階は−12dB、第4段階は−18dB、第5段階は−24dB、第6段階は−30dBのゲインに設定されている。但し、素子部品の回路定数の選択の制限と回路定数のバラツキから各段階の実際のゲインは設定値と一致せず誤差がある。この誤差は後述するように、ディジタル領域で補正される。34はレベル補正部であり、D/A変換対象のディジタルオーディオ信号に対し、出力ゲイン切り換え部28Bのゲイン誤差を打ち消すようにレベル補正を行う。25は出力ゲイン切り換え部28のゲイン測定用のディジタル基準信号を生成する基準信号生成部、26は通常時はレベル補正部34を介して入力されたディジタル信号処理後のディジタルオーディオ信号を選択して出力し、測定時は基準信号生成部25から入力されたディジタル基準信号を選択して出力するスイッチ部、30Bは記憶部であり、出力ゲイン切り換え部28Bの各段階の補正係数を記憶する。記憶部30Bには目標音量に対して、ディジタル信号処理部24Bと出力ゲイン切り換え部28Bにセットするゲインの組合せを表した図14の如く制御テーブルが記憶されている。29はレベル測定部であり、測定モード時にA/D変換部22から出力されるディジタル信号の信号レベルを測定する。
A third embodiment of the present invention will be described with reference to FIG. FIG. 13 is a block diagram showing the configuration of the volume control device according to the present invention, and the same components as those in FIG. 9 are given the same reference numerals. The volume adjusting device of the third embodiment attenuates in a 1 dB step from 0 to −5 dB in the digital domain, attenuates in a 6 dB step from 0 to −30 dB in the analog domain, and has a total range of 0 to −35 dB. The volume can be adjusted in 1 dB steps.
In FIG. 13, reference numeral 32 denotes a switch unit that selects and outputs an input analog audio signal Ain to be adjusted in the normal mode, and outputs an analog reference signal output from an output gain switching unit 28B described later in the measurement mode. Select ST 'and output. Reference numeral 24B denotes a digital signal processing unit, which performs arithmetic processing (0 dB, -1 dB, -2 dB, -3 dB, -4 dB, -5 dB) for switching the gain with a step width of 1 dB in the range of 0 dB to -5 dB with respect to the digital audio signal. Is executed). Reference numeral 28B denotes an output gain switching unit capable of switching the gain for the analog audio signal after D / A conversion. The output gain switching unit 28B allows the gain (here, attenuation of 0 dB or less) to be switched between the first to sixth steps. The first stage is set to 0 dB, the second stage is set to -6 dB, the third stage is set to -12 dB, the fourth stage is set to -18 dB, the fifth stage is set to -24 dB, and the sixth stage is set to -30 dB. However, the actual gain at each stage does not match the set value due to the limitation of the selection of the circuit constants of the element parts and the variation of the circuit constants, and there is an error. This error is corrected in the digital domain as will be described later. A level correction unit 34 performs level correction on the digital audio signal to be D / A converted so as to cancel the gain error of the output gain switching unit 28B. Reference numeral 25 is a reference signal generation section for generating a digital reference signal for gain measurement of the output gain switching section 28, and 26 is for selecting a digital audio signal after processing the digital signal input via the level correction section 34 in normal times. A switch unit 30B for selecting and outputting the digital reference signal input from the reference signal generation unit 25 during output and 30B is a storage unit, and stores the correction coefficients at each stage of the output gain switching unit 28B. The storage unit 30B stores a control table as shown in FIG. 14 showing combinations of gains set in the digital signal processing unit 24B and the output gain switching unit 28B with respect to the target volume. A level measuring unit 29 measures the signal level of the digital signal output from the A / D conversion unit 22 in the measurement mode.

31Bは制御部であり、測定時は1kHzの正弦波からなる基準信号を出力ゲイン切り換え部28Bに印加させ、スイッチ部32、A/D変換部22を介してレベル測定部29に入力し、出力ゲイン切り換え部28Bのゲインを第6乃至第1段階に順に切り換えながら、各段階でのレベル測定部29で測定した信号レベルを用いて出力ゲイン切り換え部28Bの各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定し、記憶部30Bに記憶させる。通常時は、外部の図示しない音量可変操作部から入力した目標音量に基づき、記憶部30Bの制御テーブルを参照してディジタル信号処理部24Bと出力ゲイン切り換え部28Bに対するゲイン切り換え制御を行なうとともに、出力ゲイン切り換え部28Bのゲイン誤差を補正させて、目標音量の変化に対する出力信号レベルの直線性を改善する。図13のA/D変換部22からD/A変換部27までがディジタル領域、D/A変換部27から出力ゲイン切り換え部28Bまでがアナログ領域である。なお、ディジタル領域ではサンプルデータがnビット長で表現されるものとし、MSBが±の符号を表すものとする。ディジタル信号処理部24Bは下位側に5ビット拡張して(n+5)ビット長で演算を行い、出力する際にnビットに丸めるものとする。
他の構成部分は図9と同様に構成されている。
Reference numeral 31B denotes a control unit, which applies a reference signal composed of a 1 kHz sine wave to the output gain switching unit 28B and inputs it to the level measurement unit 29 via the switch unit 32 and the A / D conversion unit 22 during measurement. While sequentially switching the gain of the gain switching section 28B from the sixth to the first stage, the signal level measured by the level measuring section 29 at each stage is used to cancel the gain error at each stage of the output gain switching section 28B. A correction coefficient for each stage is determined and stored in the storage unit 30B. In normal times, gain switching control is performed on the digital signal processing unit 24B and the output gain switching unit 28B with reference to a control table in the storage unit 30B based on a target volume input from an external volume changing operation unit (not shown) and output. The gain error of the gain switching unit 28B is corrected to improve the linearity of the output signal level with respect to the change in the target volume. The A / D converter 22 to the D / A converter 27 in FIG. 13 are the digital domain, and the D / A converter 27 to the output gain switching unit 28B are the analog domain. In the digital domain, sample data is represented by an n-bit length, and MSB represents a sign of ±. It is assumed that the digital signal processing unit 24B expands to the lower side by 5 bits, performs an operation with a length of (n + 5) bits, and rounds to n bits when outputting.
Other components are configured in the same manner as in FIG.

図15と図16は制御部31Bによる測定時と通常時の制御処理を示すフローチャートであり、以下、これらの図を参照して上記した第3実施例の動作を説明する。
なお、ここでは、出力ゲイン切り換え部28Bの0dBのゲインを基準とし(補正はしない)、他の段階のゲインの相対誤差を打ち消すように補正するものとする。
(1)測定時
装置の電源がオンすると、制御部31Bはスイッチ部32、26を測定モード側に切り換えさせ、基準信号生成部25に振幅がディジタル領域のフルスケールの1/2より2割程度小さく、1kHz正弦波からなるディジタル基準信号を生成させ、更に出力ゲイン切り換え部28Bのゲインを第6段階の0dBに切り換えさせる(図15のステップS200〜S202)。ディジタル基準信号の生成は正弦波の1周期分の波形のサンプルデータを繰り返し出力することで行なう。ディジタル基準信号はスイッチ部26を介してD/A変換部27に入力され、アナログ基準信号に変換されたのち、出力ゲイン切り換え部28Bに入力される。ここで、ゲインが0dBとされたあと、アナログ基準信号ST’としてスイッチ部32を介してA/D変換部22に入力され、ディジタル信号に変換される。そして、レベル測定部29によりピーク値が測定されて制御部31Bに入力される。制御部31Bは、入力したピーク値を基準レベルSQ’として記憶部30Bに記憶し、かつ、第6段階のゲインの補正係数Q6’を1として記憶する(ステップS203〜S205)。
FIG. 15 and FIG. 16 are flowcharts showing control processing at the time of measurement and normal time by the control unit 31B, and the operation of the third embodiment will be described below with reference to these drawings.
Here, the gain of 0 dB of the output gain switching unit 28B is used as a reference (not corrected), and correction is performed so as to cancel the relative error of gain at other stages.
(1) During measurement When the power supply of the apparatus is turned on, the control unit 31B switches the switch units 32 and 26 to the measurement mode side, and the reference signal generation unit 25 has an amplitude of about 20% from 1/2 of the full scale of the digital domain. A small digital reference signal composed of a 1 kHz sine wave is generated, and the gain of the output gain switching unit 28B is switched to 0 dB in the sixth stage (steps S200 to S202 in FIG. 15). The digital reference signal is generated by repeatedly outputting sample data having a waveform of one sine wave. The digital reference signal is input to the D / A conversion unit 27 via the switch unit 26, converted into an analog reference signal, and then input to the output gain switching unit 28B. Here, after the gain is set to 0 dB, the analog reference signal ST ′ is input to the A / D conversion unit 22 via the switch unit 32 and converted into a digital signal. Then, the peak value is measured by the level measuring unit 29 and input to the control unit 31B. The control unit 31B stores the input peak value in the storage unit 30B as the reference level SQ ′, and stores the sixth-stage gain correction coefficient Q6 ′ as 1 (steps S203 to S205).

次に、出力ゲイン切り換え部28Bのゲインを1段階下げて−6dBに切り換えさせ(ステップS206、S207)、レベル測定部29から入力したピーク値で基準レベルSQ’より−6dB落としたレベルを除して−6dBの補正係数Q5’を計算し、記憶部30Bに記憶する(ステップS208、S209)。次に、出力ゲイン切り換え部28Bのゲインを1段階下げて−12dBに切り換えさせ、レベル測定部29から入力したピーク値を基準レベルSQ’より−12dB落としたレベルで除して−12dBの補正係数Q4’を計算し、記憶部30Bに記憶する(ステップS2100でNO、S211、S207〜S208)。以下、第1段階の−30dBまで同様の処理を繰り返す。これにより、電源がオンされる度に、出力ゲイン切り換え部28Bの各段階のゲインの補正係数Q1’〜Q6’が決定されて記憶部30Bに記憶される。   Next, the gain of the output gain switching unit 28B is lowered by one step and switched to −6 dB (steps S206 and S207), and the peak value input from the level measurement unit 29 is divided by the level that is −6 dB lower than the reference level SQ ′. The -6 dB correction coefficient Q5 ′ is calculated and stored in the storage unit 30B (steps S208 and S209). Next, the gain of the output gain switching unit 28B is lowered by one step to switch to −12 dB, and the peak value input from the level measuring unit 29 is divided by a level that is −12 dB lower than the reference level SQ ′ to obtain a correction coefficient of −12 dB Q4 ′ is calculated and stored in the storage unit 30B (NO in step S2100, S211, S207 to S208). Thereafter, the same processing is repeated up to −30 dB in the first stage. Thus, every time the power is turned on, the gain correction coefficients Q1 'to Q6' of the respective steps of the output gain switching unit 28B are determined and stored in the storage unit 30B.

(2)通常時
補正係数の決定が終ると、制御部31Bは、スイッチ部32、26を通常モード側に切り換えさせる(図15のステップS210でYES、図16のステップS220)。そして、目標音量を入力し、制御テーブルを参照してディジタル信号処理部24Bのゲインと出力ゲイン切り換え部28Bのゲインを決定し、ディジタル信号処理部24Bのゲインと出力ゲイン切り換え部28Bのゲインの切り換え制御を行なう(ステップS222)。続いて、出力ゲイン切り換え部28Bのゲインに対する補正係数をレベル補正部34にセットする(ステップS223)。音量調整対象の入力アナログオーディオ信号Ainはスイッチ部32を介してA/D変換部22に入力され、ディジタルオーディオ信号に変換される。そして、ディジタル信号処理部24Bで制御部31Bにより設定されたゲイン分だけ信号レベルの可変演算を行なう。ディジタル信号処理後のディジタルオーディオ信号はレベル補正部34で補正係数が乗じられたあと、スイッチ部26を介してD/A変換部27に入力され、アナログオーディオ信号に変換されたあと、更に出力ゲイン切り換え部28Bで制御部31Bにより設定されたゲイン分だけ信号レベルが可変される。
(2) Normal time When the correction coefficient is determined, the control unit 31B switches the switch units 32 and 26 to the normal mode side (YES in step S210 of FIG. 15, step S220 of FIG. 16). Then, the target volume is input, the gain of the digital signal processing unit 24B and the gain of the output gain switching unit 28B are determined by referring to the control table, and the gain of the digital signal processing unit 24B and the gain of the output gain switching unit 28B are switched. Control is performed (step S222). Subsequently, the correction coefficient for the gain of the output gain switching unit 28B is set in the level correction unit 34 (step S223). The input analog audio signal Ain whose volume is to be adjusted is input to the A / D conversion unit 22 via the switch unit 32 and converted into a digital audio signal. Then, the digital signal processing unit 24B performs variable calculation of the signal level by the gain set by the control unit 31B. The digital audio signal after the digital signal processing is multiplied by a correction coefficient in the level correction unit 34, then input to the D / A conversion unit 27 via the switch unit 26, converted into an analog audio signal, and further output gain. The signal level is varied by the gain set by the control unit 31B in the switching unit 28B.

例えば、目標音量が−20dBであったとき、ディジタル信号処理部24Bで−2dB、出力ゲイン切り換え部28Bで−18dBに減衰されるとともに、出力ゲイン切り換え部28Bの−18dBのゲイン誤差を打ち消す補正係数Q4’がレベル補正部34にセットされるので、全体として、出力オーディオ信号Aoutの音量は正確に−20dBとなる。
制御部31Bは目標音量の変化を監視しており、変化があれば、前述と同様にして、制御テーブルを参照してディジタル信号処理部24Bのゲインと出力ゲイン切り換え部28Bのゲインを決定し、ディジタル信号処理部24Bのゲインと出力ゲイン切り換え部28Bのゲインの切り換え制御を行なう(ステップS225、S226でYES、S222、S223)。続いて、出力ゲイン切り換え部28Bのゲインに対する補正係数をレベル補正部34にセットする(ステップS224)。
For example, when the target sound volume is -20 dB, the digital signal processing unit 24B attenuates to -2 dB, the output gain switching unit 28B attenuates to -18 dB, and cancels the gain error of -18 dB of the output gain switching unit 28B. Since Q4 ′ is set in the level correction unit 34, the volume of the output audio signal Aout is accurately −20 dB as a whole.
The control unit 31B monitors the change in the target volume. If there is a change, the control unit 31B determines the gain of the digital signal processing unit 24B and the gain of the output gain switching unit 28B by referring to the control table in the same manner as described above. Switching control of the gain of the digital signal processing unit 24B and the gain of the output gain switching unit 28B is performed (YES in steps S225 and S226, S222 and S223). Subsequently, the correction coefficient for the gain of the output gain switching unit 28B is set in the level correction unit 34 (step S224).

この実施例によれば、出力ゲイン切り換え部28Bのゲイン切り換えは6段階で良いので構成が簡単で済み、また、ディジタル信号処理部24Bは0〜5dBの範囲で減衰させるだけなので、小音量時でも量子化歪が大きくならない。そして、また、基準信号を用いて出力ゲイン切り換え部28Bの各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定し、出力ゲイン切り換え部28にD/A変換されたアナログオーディオ信号が印加されているときに、出力ゲイン切り換え部28Bのゲインに応じてD/A変換対象のディジタルオーディオ信号に対しレベル補正を行なうようにしたので、アナログ回路で構成される出力ゲイン切り換え部28Bの各段階のゲインに誤差があっても、信号に対するゲインを正確に切り換えることができ、目標音量に対する出力信号レベルの直線性が良好となる。   According to this embodiment, the gain switching of the output gain switching unit 28B can be performed in six steps, so that the configuration is simple, and the digital signal processing unit 24B only attenuates in the range of 0 to 5 dB. Quantization distortion does not increase. Further, a correction coefficient for each step for canceling the gain error of each step of the output gain switching unit 28B is determined using the reference signal, and the analog audio signal D / A converted by the output gain switching unit 28 is determined. Is applied, the level of the D / A conversion target digital audio signal is corrected according to the gain of the output gain switching unit 28B. Even if there is an error in the gain at each stage, the gain for the signal can be switched accurately, and the linearity of the output signal level with respect to the target sound volume becomes good.

なお、上記した第3実施例では、第6段階のゲインを基準にしたときの第2段階乃至第5段階のゲインの相対誤差を打ち消すように補正したが、各段階のゲインの絶対誤差を打ち消すように補正しても良い。
また、上記した第3実施例では、通常時に、アナログオーディオ信号Ainをスイッチ部32を介してA/D変換部22に入力するようにしたが、前段機器がディシダル出力の場合、ディジタルオーディオ信号を直接、ディジタル信号処理部24Bに入力させるようにしても良い。この場合、アナログ基準信号ST’は直接、A/D変換部22に入力すれば良い。
In the third embodiment described above, correction is made so as to cancel the relative error of the gains in the second to fifth stages when the gain in the sixth stage is used as a reference. However, the absolute error of the gain in each stage is canceled out. You may correct | amend as follows.
In the third embodiment described above, the analog audio signal Ain is normally input to the A / D converter 22 via the switch unit 32 in the normal case. It may be directly input to the digital signal processing unit 24B. In this case, the analog reference signal ST ′ may be directly input to the A / D converter 22.

図17を参照して本発明の第4実施例を説明する。図17は本発明に係る帯域制限用信号処理装置の構成を示すブロック図であり、図5、図9と同一の構成部分には同一の符号が付してある。
図17は図5と図9を合わせた構成を有し、A/D変換部の前段に入力ゲイン切り換え部、D/A変換部の前段にゲイン切り換え部、D/A変換部の後段に出力ゲイン切り換え部を設け、入力ゲイン切り換え部のゲイン誤差と出力ゲイン切り換え部のゲイン誤差を補正するようにしたものである。
図17において、20は通常モード時、入力アナログオーディオ信号Ainを選択し、第1測定モード時、基準信号STを選択するスイッチ部、21は入力ゲイン切り換え部であり、音量調整後の入力アナログオーディオ信号Ainに対するゲインを第1段階は×1、第2段階は×2、第3段階は×4、第4段階は×8、第5段階は×16、第6段階は×32のゲインに切り換え可能である。32は通常モード時と第1測定モード時、入力ゲイン切り換え部21の出力を選択し、第2測定モード時、基準信号ST´を選択する。23Cは入力レベル切り換え部21のゲイン誤差を打ち消すためのレベル補正を行なう第1レベル補正部、33はゲイン切り換え部であり、信号処理後のディジタルオーディオ信号に対するゲインを算術シフト演算により第1段階は×1、第2段階は×2、第3段階は×4、第4段階は×8、第5段階は×16、第6段階は×32のゲインに切り換え可能である。28は出力ゲイン切り換え部であり、D/A変換後のアナログオーディオ信号に対するゲインを第1段階は×1/32、第2段階は×1/16、第3段階は×1/8、第4段階は×1/4、第5段階は×1/2、第6段階は×1/1のゲインに切り換え可能である。34Cは第2レベル補正部であり、D/A変換対象のディジタルオーディオ信号に対し、出力ゲイン切り換え部28のゲイン誤差を打ち消すようにレベル補正を行う。
A fourth embodiment of the present invention will be described with reference to FIG. FIG. 17 is a block diagram showing the configuration of the band-limiting signal processing apparatus according to the present invention. The same components as those in FIGS. 5 and 9 are given the same reference numerals.
FIG. 17 has a configuration in which FIG. 5 and FIG. 9 are combined. The input gain switching unit is upstream of the A / D conversion unit, the gain switching unit is upstream of the D / A conversion unit, and the output is downstream of the D / A conversion unit. A gain switching unit is provided to correct the gain error of the input gain switching unit and the gain error of the output gain switching unit.
In FIG. 17, 20 is a switch unit for selecting the input analog audio signal Ain in the normal mode and for selecting the reference signal ST in the first measurement mode, and 21 is an input gain switching unit, and the input analog audio after volume adjustment. The gain for the signal Ain is switched to a gain of x1 in the first stage, x2 in the second stage, x4 in the third stage, x8 in the fourth stage, x16 in the fifth stage, and x32 in the sixth stage. Is possible. 32 selects the output of the input gain switching unit 21 in the normal mode and the first measurement mode, and selects the reference signal ST ′ in the second measurement mode. Reference numeral 23C denotes a first level correction unit that performs level correction for canceling the gain error of the input level switching unit 21, and reference numeral 33 denotes a gain switching unit. The first stage is obtained by performing an arithmetic shift operation on the gain of the digital audio signal after the signal processing. The gain can be switched to a gain of x1, the second stage is x2, the third stage is x4, the fourth stage is x8, the fifth stage is x16, and the sixth stage is x32. Reference numeral 28 denotes an output gain switching unit, and the gain for the analog audio signal after D / A conversion is x 1/32 in the first stage, x 1/16 in the second stage, x 1/8 in the third stage, The stage can be switched to a gain of x1 / 4, the fifth stage can be switched to a gain of x1 / 2, and the sixth stage can be switched to a gain of x1 / 1. Reference numeral 34C denotes a second level correction unit that performs level correction on the digital audio signal to be D / A converted so as to cancel the gain error of the output gain switching unit 28.

25は入力ゲイン切り換え部21と出力ゲイン切り換え部28のゲイン測定用のディジタル基準信号を生成する基準信号生成部、29CはA/D変換部22から出力されたディジタル信号のレベルをピーク値から測定する第1レベル測定部、36はD/A変換部27に入力されるディジタル信号のレベルをピーク値から測定する第2レベル測定部、30Cは補正係数記憶部であり、入力ゲイン切り換え部21と出力ゲイン切り換え部28の各段階の補正係数を記憶する。   Reference numeral 25 denotes a reference signal generator for generating a digital reference signal for gain measurement of the input gain switching unit 21 and the output gain switching unit 28, and 29C measures the level of the digital signal output from the A / D converter 22 from the peak value. The first level measuring unit 36, a second level measuring unit 36 that measures the level of the digital signal input to the D / A converting unit 27 from the peak value, and 30C is a correction coefficient storage unit. The correction coefficient at each stage of the output gain switching unit 28 is stored.

31Cは制御部であり、第1測定時は1kHzの正弦波からなる基準信号をスイッチ部20を介して入力ゲイン切り換え部21に印加させ、スイッチ部32、A/D変換部22を介して第1レベル測定部29Cに入力し、入力ゲイン切り換え部21のゲインを第1乃至第6段階に順に切り換えながら、各段階での第1レベル測定部29Cで測定した信号レベルを用いて入力ゲイン切り換え部21の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定し、補正係数記憶部30Cに記憶させる。第2測定時は1kHzの正弦波からなる基準信号を出力ゲイン切り換え部28に印加させ、スイッチ部32、A/D変換部22を介して第1レベル測定部29Cに入力し、出力ゲイン切り換え部28のゲインを第6乃至第1段階に順に切り換えながら、各段階での第1レベル測定部29Cで測定した信号レベルを用いて出力ゲイン切り換え部28の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定し、補正係数記憶部30Cに記憶させる。   Reference numeral 31C denotes a control unit. During the first measurement, a reference signal composed of a 1 kHz sine wave is applied to the input gain switching unit 21 through the switch unit 20, and the first signal is input through the switch unit 32 and the A / D conversion unit 22. The input gain switching unit uses the signal level measured by the first level measuring unit 29C at each stage while sequentially switching the gain of the input gain switching unit 21 to the first to sixth stages. The correction coefficient for each stage for canceling the gain error of each stage of 21 is determined and stored in the correction coefficient storage unit 30C. At the time of the second measurement, a reference signal composed of a 1 kHz sine wave is applied to the output gain switching unit 28 and input to the first level measuring unit 29C via the switch unit 32 and the A / D conversion unit 22, and the output gain switching unit. Each of the steps for canceling the gain error at each stage of the output gain switching section 28 using the signal level measured by the first level measuring section 29C at each stage while switching the gain of 28 from the sixth to the first stage in order. The correction coefficient for each stage is determined and stored in the correction coefficient storage unit 30C.

通常時、制御部31Cは入力ゲイン切り換え部21を介してA/D変換部22に入力された入力アナログオーディオ信号の信号レベルを監視し、所定の第1の基準レベルを下回った小レベル状態が一定時間継続したとき、A/D変換部22の入力レベルを最適化して量子化歪が顕著にならないようにするため、入力ゲイン切り換え部21のゲインを1段階上げ、その分出力ゲイン切り換え部28のゲインを1段階下げる。また、入力アナログオーディオ信号の信号レベルを監視しているときに、所定の第2の基準レベル(>第1の基準レベル)を越えて過大となったとき、A/D変換部22の入力レベルを最適化し、過大入力によるクリップが生じないようにするため、入力ゲイン切り換え部21のゲインを1段階下げ、その分出力ゲイン切り換え部28のゲインを1段階上げる。そして、入力ゲイン切り換え部21のゲインに対応する補正係数を第1レベル補正部23Cにセットし、A/D変換部22から出力されたディジタルオーディオ信号に補正係数を乗じて、入力ゲイン切り換え部21のゲイン誤差を補正させるとともに、出力ゲイン切り換え部28のゲインに対応する補正係数を第2レベル補正部34Cにセットし、D/A変換対象のディジタルオーディオ信号に補正係数を乗じて、出力ゲイン切り換え部28のゲイン誤差を補正させる。また、ディジタル信号処理部24Aに対し過去のサンプルデータを算術シフト演算(1ビット左シフトまたは1ビット右シフト)により2倍または1/2倍の大きさに補正させて、ゲイン切り換え前後で出力アナログオーディオ信号Aoutが不連続とならないようにする。   In normal times, the control unit 31C monitors the signal level of the input analog audio signal input to the A / D conversion unit 22 via the input gain switching unit 21, and a small level state below a predetermined first reference level is detected. In order to optimize the input level of the A / D conversion unit 22 and prevent the quantization distortion from becoming noticeable when it continues for a certain time, the gain of the input gain switching unit 21 is increased by one step, and the output gain switching unit 28 is correspondingly increased. Decrease the gain by one step. Further, when the signal level of the input analog audio signal is monitored, if the signal level exceeds a predetermined second reference level (> first reference level), the input level of the A / D conversion unit 22 is exceeded. In order to prevent clipping due to excessive input, the gain of the input gain switching unit 21 is decreased by one step, and the gain of the output gain switching unit 28 is increased by one step accordingly. Then, the correction coefficient corresponding to the gain of the input gain switching unit 21 is set in the first level correction unit 23C, the digital audio signal output from the A / D conversion unit 22 is multiplied by the correction coefficient, and the input gain switching unit 21 The gain coefficient of the output gain switching section 28 is set in the second level correction section 34C, and the digital audio signal to be D / A converted is multiplied by the correction coefficient to switch the output gain. The gain error of the unit 28 is corrected. The digital signal processor 24A corrects the past sample data to double or 1/2 times by arithmetic shift operation (1-bit left shift or 1-bit right shift), and outputs analog data before and after gain switching. The audio signal Aout is prevented from becoming discontinuous.

また通常時、制御部31Cは第2レベル補正部34Cからスイッチ部26を介してD/A変換部27に入力されるディジタルオーディオ信号の信号レベルを監視し、所定の第1の基準レベルを下回った小レベル状態が一定時間継続したとき、D/A変換部27の入力レベルを最適化して量子化歪が顕著にならないようにするため、ゲイン切り換え部33のゲインを1段階増大させ、その分出力ゲイン切り換え部28のゲインを1段階下げる。また、D/A変換部27に入力されるディジタルオーディオ信号の信号レベルを監視しているときに、所定の第2の基準レベル(>第1の基準レベル)を越えて過大となったとき、D/A変換部27の入力レベルを最適化し、過大入力によるクリップが生じないようにするため、ゲイン切り換え部33のゲインを1段階下げ、その分出力ゲイン切り換え部28のゲインを1段階上げる。そして、出力ゲイン切り換え部28のゲインに対応する補正係数を第2レベル補正部34Cにセットし、D/A変換対象のディジタルオーディオ信号に補正係数を乗じて、出力ゲイン切り換え部28のゲイン誤差を補正させて、ゲイン切り換え前後で出力アナログオーディオ信号Aoutが不連続とならないようにする。図17のA/D変換部22からD/A変換部27までがディジタル領域である。なお、ディジタル領域ではサンプルデータがnビット長で表現されるものとし、MSBが±の符号を表すものとする。但し、ディジタル信号処理部24Aは下位側に5ビット拡張して(n+5)ビット長で演算を行い、ゲイン切り換え部33への出力も(n+5)ビット長で行い、ゲイン切り換え部33は算術シフト演算後、出力する際にnビットに丸めるものとする。
他の構成部分は図5、図9と同様に構成されている。
Further, at the normal time, the control unit 31C monitors the signal level of the digital audio signal input from the second level correction unit 34C to the D / A conversion unit 27 via the switch unit 26, and falls below a predetermined first reference level. When the small level state continues for a certain time, in order to optimize the input level of the D / A converter 27 and prevent the quantization distortion from becoming noticeable, the gain of the gain switching unit 33 is increased by one step. The gain of the output gain switching unit 28 is lowered by one step. Further, when the signal level of the digital audio signal input to the D / A converter 27 is monitored, when the signal level exceeds a predetermined second reference level (> first reference level), In order to optimize the input level of the D / A conversion unit 27 and prevent clipping due to excessive input, the gain of the gain switching unit 33 is decreased by one step, and the gain of the output gain switching unit 28 is increased by one step accordingly. Then, the correction coefficient corresponding to the gain of the output gain switching unit 28 is set in the second level correction unit 34C, the digital audio signal to be D / A converted is multiplied by the correction coefficient, and the gain error of the output gain switching unit 28 is set. The correction is made so that the output analog audio signal Aout does not become discontinuous before and after the gain switching. The A / D converter 22 to the D / A converter 27 in FIG. In the digital domain, sample data is represented by an n-bit length, and MSB represents a sign of ±. However, the digital signal processing unit 24A expands to the lower side by 5 bits and performs calculation with (n + 5) bit length, and outputs to the gain switching unit 33 with (n + 5) bit length. The gain switching unit 33 performs arithmetic shift calculation. Later, when outputting, it shall round to n bits.
Other components are configured in the same manner as in FIGS.

図18乃至図21は制御部31Cによる測定時と通常時の制御処理を示すフローチャートであり、以下、これらの図を参照して上記した第4実施例の動作を説明する。
なお、ここでは、入力ゲイン切り換え部21の×1/1のゲインを基準とし(補正はしない)、他の段階のゲインの相対誤差を打ち消すように補正するものとし、同様に、出力ゲイン切り換え部28の×1/1のゲインを基準とし(補正はしない)、他の段階のゲインの相対誤差を打ち消すように補正するものとする。
(1)第1測定時
装置の電源がオンすると、制御部31Cはスイッチ部20、32、26を第1測定モード側に切り換えさせ、基準信号生成部25に振幅Wがディジタル領域のフルスケールの1/2より2割程度小さく、1kHz正弦波からなるディジタル基準信号を生成させ、更に入力ゲイン切り換え部21のゲインを第1段階の×1に切り換えさせる(図18のステップS100〜S102)。ディジタル基準信号はスイッチ部26を介してD/A変換部27に入力され、アナログ基準信号STに変換されたのち、スイッチ部20を介して入力ゲイン切り換え部21に入力される。ここで、ゲインが×1されたあと、スイッチ部32を介してA/D変換部22によりディジタル信号に変換される。そして、第1レベル測定部29Cによりピーク値が測定されて制御部31Cに入力される。制御部31Cは、入力したピーク値を基準レベルSPとして補正係数記憶部30Cに記憶し、かつ、入力ゲイン切り換え部21の第1段階のゲインの補正係数P1を1として記憶する(ステップS103〜S105)。
FIG. 18 to FIG. 21 are flowcharts showing control processing at the time of measurement and normal time by the control unit 31C, and the operation of the above-described fourth embodiment will be described below with reference to these drawings.
Here, the gain of x1 / 1 of the input gain switching unit 21 is used as a reference (not corrected), and correction is performed so as to cancel the relative error of gains at other stages. Similarly, the output gain switching unit It is assumed that 28 × 1/1 gain is used as a reference (no correction is made), and correction is performed so as to cancel the relative error of gain at other stages.
(1) At the time of first measurement When the apparatus is turned on, the control unit 31C switches the switch units 20, 32, and 26 to the first measurement mode side, and the reference signal generation unit 25 has an amplitude W of full scale in the digital domain. A digital reference signal composed of a 1 kHz sine wave smaller than 1/2 is generated, and the gain of the input gain switching unit 21 is switched to the first stage x1 (steps S100 to S102 in FIG. 18). The digital reference signal is input to the D / A conversion unit 27 via the switch unit 26, converted into the analog reference signal ST, and then input to the input gain switching unit 21 via the switch unit 20. Here, after the gain is multiplied by 1, it is converted into a digital signal by the A / D converter 22 via the switch 32. Then, the peak value is measured by the first level measurement unit 29C and input to the control unit 31C. The control unit 31C stores the input peak value as the reference level SP in the correction coefficient storage unit 30C, and stores the first stage gain correction coefficient P1 of the input gain switching unit 21 as 1 (steps S103 to S105). ).

次に、入力ゲイン切り換え部21のゲインを1段階上げて×2に切り換えさせるとともに、基準信号生成部25の出力振幅をそれまでの1/2倍とする(ステップS106〜S108)。この結果、アナログの基準信号STは振幅が1/2倍となって入力ゲイン切り換え部21に入力され、ゲインが×2とされる。制御部31Cは、第1レベル測定部29Cから入力したピーク値で基準レベルSPを除して×2の補正係数P2を計算し、補正係数記憶部30Cに記憶する(ステップS109、S110)。以下、第6段階の×32まで同様の処理を繰り返す(ステップS111、S112、S107〜S110の繰り返し)。これにより、電源がオンされる度に、入力ゲイン切り換え部21の各段階のゲインの補正係数P1〜P6が決定されて補正係数記憶部30Cに記憶される。   Next, the gain of the input gain switching unit 21 is increased by one level and switched to x2, and the output amplitude of the reference signal generation unit 25 is halved from that (steps S106 to S108). As a result, the analog reference signal ST is halved in amplitude and input to the input gain switching unit 21, and the gain is set to x2. The control unit 31C calculates the correction coefficient P2 of x2 by dividing the reference level SP by the peak value input from the first level measurement unit 29C, and stores it in the correction coefficient storage unit 30C (steps S109 and S110). Thereafter, the same processing is repeated until the sixth stage x32 (repetition of steps S111, S112, and S107 to S110). Thus, every time the power is turned on, the gain correction coefficients P1 to P6 of each stage of the input gain switching unit 21 are determined and stored in the correction coefficient storage unit 30C.

(2)第2測定時
入力ゲイン切り換え部21の補正係数の決定が終ると、制御部31Cはスイッチ部20、32、26を第2測定モード側に切り換えさせ、基準信号生成部25に振幅Yがディジタル領域のフルスケールの1/2より2割程度小さく、1kHz正弦波からなるディジタル基準信号を生成させ、更に出力ゲイン切り換え部28のゲインを第6段階の×1/1に切り換えさせる(図18のステップS111でYES、図19のステップS120〜S122)。ディジタル基準信号はスイッチ部26を介してD/A変換部27に入力され、アナログ基準信号に変換されたのち、出力ゲイン切り換え部28でゲインが×1されたあと、アナログ基準信号ST’としてスイッチ部32を介してA/D変換部22に入力され、ディジタル信号に変換される。そして、第1レベル測定部29Cによりピーク値が測定されて制御部31Cに入力される。制御部31Cは、入力したピーク値を基準レベルSQとして補正係数記憶部30Cに記憶し、かつ、出力ゲイン切り換え部28の第6段階のゲインの補正係数Q6を1として記憶する(ステップS123〜S125)。
(2) Second measurement When the correction coefficient of the input gain switching unit 21 is determined, the control unit 31C switches the switch units 20, 32, and 26 to the second measurement mode side, and causes the reference signal generation unit 25 to detect the amplitude Y. Is about 20% smaller than 1/2 of the full scale of the digital domain, and a digital reference signal composed of a 1 kHz sine wave is generated, and the gain of the output gain switching unit 28 is switched to × 1/1 of the sixth stage (FIG. YES in step S111 of 18, and steps S120 to S122 of FIG. 19). The digital reference signal is input to the D / A conversion unit 27 via the switch unit 26 and converted into an analog reference signal. After the gain is set to 1 by the output gain switching unit 28, the digital reference signal is switched as the analog reference signal ST '. The signal is input to the A / D converter 22 via the unit 32 and converted into a digital signal. Then, the peak value is measured by the first level measurement unit 29C and input to the control unit 31C. The control unit 31C stores the input peak value in the correction coefficient storage unit 30C as the reference level SQ, and stores the gain correction coefficient Q6 of the sixth stage of the output gain switching unit 28 as 1 (steps S123 to S125). ).

次に、出力ゲイン切り換え部28のゲインを1段階下げて×1/2とする(ステップS126、S127)。D/A変換部27から出力されたアナログの基準信号は出力ゲイン切り換え部28に入力され、ゲインが×1/2とされる。制御部31Cは、第1レベル測定部29Cから入力したピーク値で基準レベルSQの1/2を除して出力ゲイン切り換え部28の第5段階のゲインの補正係数Q5を計算し、補正係数記憶部30Cに記憶する(ステップS128、S129)。以下、第1段階の×1/32まで同様の処理を繰り返す(ステップS130、S131、S127〜S129の繰り返し)。これにより、電源がオンされる度に、出力ゲイン切り換え部28の各段階のゲインの補正係数Q1〜Q6が決定されて補正係数記憶部30Cに記憶される。   Next, the gain of the output gain switching unit 28 is lowered by one step to x1 / 2 (steps S126 and S127). The analog reference signal output from the D / A converter 27 is input to the output gain switching unit 28, and the gain is set to x1 / 2. The control unit 31C calculates the fifth-stage gain correction coefficient Q5 of the output gain switching unit 28 by dividing 1/2 of the reference level SQ by the peak value input from the first level measurement unit 29C, and stores the correction coefficient storage Store in the unit 30C (steps S128, S129). Thereafter, the same processing is repeated up to × 1/32 in the first stage (repetition of steps S130, S131, S127 to S129). Thus, each time the power is turned on, the gain correction coefficients Q1 to Q6 of each stage of the output gain switching section 28 are determined and stored in the correction coefficient storage section 30C.

(3)通常時
補正係数の決定が終ると、制御部31Cは、スイッチ部20、32、26を通常モード側に切り換えさせるとともに入力ゲイン切り換え部21のゲインを第1段階の×1、ゲイン切り換え部のゲインを×1、出力ゲイン切り換え部28のゲインを第6段階の×1/1に切り換えさせる(図19のステップS130でYES、図20のステップS140、S141)。また第1レベル補正部23Cに入力ゲイン切り換え部21の×1に対応する補正係数P1=1をセットし、第2レベル補正部34Cに出力ゲイン切り換え部28の×1に対応する補正係数Q6=1をセットする(ステップS142)。音量調整後の入力アナログオーディオ信号Ainはスイッチ部20を介して入力ゲイン切り換え部21に入力され、ゲインが×1されたあとスイッチ部32を介してA/D変換部22によりディジタルオーディオ信号に変換される。そして、第1レベル補正部23Cで補正係数1が乗じられたあと、ディジタル信号処理部24Aで3次FIRフィルタにより低域成分が抽出される。そして、ゲイン切り換え部33によりゲインが×1され、第2レベル補正部34Cで補正係数1が乗じられたあとスイッチ部26を介してD/A変換部27に入力され、アナログオーディオ信号に変換される。そして、出力ゲイン切り換え部28でゲインが×1/1されて後段へ出力される。制御部31Cは常時、第1レベル測定部29Cと第2レベル測定部36で測定されたディジタルオーディオ信号のレベル(ここではピーク値)を監視しており(ステップS143、図21のステップS160)、一定時間以上小レベル状態が続いているかの判断と、所定の一定レベルを越えて過大になったかの判断を繰り返している(図20のステップS144、S145、図21のステップS161、S162)。
(3) Normal time When the correction coefficient is determined, the control unit 31C switches the switch units 20, 32, and 26 to the normal mode side, and changes the gain of the input gain switching unit 21 to the first stage × 1, gain switching. The gain of the unit is switched to × 1, and the gain of the output gain switching unit 28 is switched to the sixth stage of × 1/1 (YES in step S130 of FIG. 19, steps S140 and S141 of FIG. 20). Further, the correction coefficient P1 = 1 corresponding to x1 of the input gain switching unit 21 is set in the first level correction unit 23C, and the correction coefficient Q6 = corresponding to x1 of the output gain switching unit 28 is set in the second level correction unit 34C. 1 is set (step S142). The input analog audio signal Ain after the volume adjustment is input to the input gain switching unit 21 via the switch unit 20, and after the gain is set to × 1, it is converted into a digital audio signal by the A / D conversion unit 22 via the switch unit 32. Is done. Then, after the first level correction unit 23C multiplies the correction coefficient 1, the digital signal processing unit 24A extracts a low frequency component by a third-order FIR filter. Then, the gain switching unit 33 multiplies the gain by 1, and the second level correction unit 34C multiplies the correction coefficient 1. Then, the gain is input to the D / A conversion unit 27 via the switch unit 26 and converted into an analog audio signal. The Then, the output gain switching unit 28 decrements the gain by 1/1 and outputs it to the subsequent stage. The control unit 31C constantly monitors the level (here, peak value) of the digital audio signal measured by the first level measurement unit 29C and the second level measurement unit 36 (step S143, step S160 in FIG. 21). The determination as to whether or not the low level state continues for a certain time or more and the determination as to whether or not the predetermined level exceeds the predetermined level are repeated (steps S144 and S145 in FIG. 20 and steps S161 and S162 in FIG. 21).

若し、第1レベル測定部29Cの測定の結果、一定時間以上小レベル状態が続き、ステップS144でYESとなったとき、現在入力ゲイン切り換え部21がまだ第6段階でなく、出力ゲイン切り換え部28がまだ第1段階でないので、入力ゲイン切り換え部21を第2段階の×2に切り換えてA/D変換部22のダイナミックレンジに対し最適化し、その分出力ゲイン切り換え部28を第5段階の×1/2に切り換える(ステップS146〜S148)。続いて、補正係数記憶部30Cから入力ゲイン切り換え部21の第2段階用の補正係数P2を読み出して第1レベル補正部23Cにセットし、入力ゲイン切り換え部21から第1レベル補正部23Cまでのゲインが入力ゲイン切り換え部21の第1段階に対し正確に2倍となるようにし、補正係数記憶部30Cから出力ゲイン切り換え部28の第5段階用の補正係数Q5を読み出して第2レベル補正部34Cにセットし、第2レベル補正部34Cから出力ゲイン切り換え部28までのゲインが出力ゲイン切り換え部28の第6段階に対し正確に1/2倍となるようにする。更に、ディジタル信号処理部24Aに対しFIRフィルタの過去のサンプルデータを算術シフト演算で1ビット左シフトして2倍の大きさとする(ステップS149、S150)。これにより、出力ゲイン切り換え部28から出力されるアナログオーディオ信号Aoutがゲイン切り換え前後で不連続となるのが防止される。   As a result of the measurement by the first level measurement unit 29C, when the low level state continues for a certain time or more and the answer is YES in step S144, the current input gain switching unit 21 is not yet in the sixth stage, but the output gain switching unit. Since 28 is not yet in the first stage, the input gain switching unit 21 is switched to × 2 in the second stage to optimize the dynamic range of the A / D conversion unit 22, and the output gain switching unit 28 is correspondingly changed in the fifth stage. Switching to × 1/2 (steps S146 to S148). Subsequently, the correction coefficient P2 for the second stage of the input gain switching unit 21 is read from the correction coefficient storage unit 30C and set in the first level correction unit 23C, and from the input gain switching unit 21 to the first level correction unit 23C. The gain is accurately doubled with respect to the first stage of the input gain switching unit 21, and the correction coefficient Q5 for the fifth stage of the output gain switching unit 28 is read from the correction coefficient storage unit 30C to obtain the second level correction unit. 34C so that the gain from the second level correction unit 34C to the output gain switching unit 28 is exactly ½ times the sixth stage of the output gain switching unit 28. Further, the past sample data of the FIR filter is shifted by 1 bit to the digital signal processing unit 24A by an arithmetic shift operation to double the size (steps S149 and S150). This prevents the analog audio signal Aout output from the output gain switching unit 28 from becoming discontinuous before and after the gain switching.

その後、再び第1レベル測定部29Cで測定した信号レベルが一定時間以上の小レベル状態が続いたとき、ステップS144でYESと判断し、入力ゲイン切り換え部21を第3段階の×4に切り換えてA/D変換部22のダイナミックレンジに対し最適化し、その分出力ゲイン切り換え部28を第4段階の×1/4に切り換える(ステップS146〜S148)。続いて、補正係数記憶部30Cから入力ゲイン切り換え部21の第3段階用の補正係数P3を読み出して第1レベル補正部23Cにセットし、入力ゲイン切り換え部21から第1レベル補正部23Cまでのゲインが第1段階に対し正確に4倍となるようにし、補正係数記憶部30Cから出力ゲイン切り換え部28の第4段階用の補正係数Q4を読み出して第2レベル補正部34Cにセットし、第2レベル補正部34Cから出力ゲイン切り換え部28までのゲインが出力ゲイン切り換え部28の第6段階に対し正確に1/4倍となるようにする。そして、ディジタル信号処理部24Aに対しFIRフィルタの過去のサンプルデータを算術シフト演算で1ビット左シフトして2倍の大きさとする(ステップS149、S150)。   After that, when the signal level measured by the first level measurement unit 29C continues to be in a low level state for a certain time or more, it is determined YES in step S144, and the input gain switching unit 21 is switched to x4 in the third stage. The dynamic range of the A / D conversion unit 22 is optimized, and the output gain switching unit 28 is switched to x¼ of the fourth stage accordingly (steps S146 to S148). Subsequently, the third-stage correction coefficient P3 of the input gain switching unit 21 is read from the correction coefficient storage unit 30C and set in the first level correction unit 23C, and from the input gain switching unit 21 to the first level correction unit 23C. The gain is accurately quadrupled with respect to the first stage, the fourth stage correction coefficient Q4 of the output gain switching section 28 is read from the correction coefficient storage section 30C, set in the second level correction section 34C, The gain from the two-level correction unit 34C to the output gain switching unit 28 is accurately set to 1/4 times the sixth level of the output gain switching unit 28. Then, the past sample data of the FIR filter is shifted by 1 bit to the digital signal processing unit 24A by an arithmetic shift operation to double the size (steps S149 and S150).

その後、第1レベル測定部29Cでの測定レベルが所定の一定レベルを越える過大になったとき、ステップS145でYESと判断し、現在入力ゲイン切り換え部21がまだ第1段階でなく、出力ゲイン切り換え部28がまだ第6段階でないので、入力ゲイン切り換え部21を第2段階の×2に戻してA/D変換部22のダイナミックレンジに対し過大入力とならないように最適化し、その分出力ゲイン切り換え部28を第5段階の×1/2に切り換える(ステップS151〜S153)。続いて、補正係数記憶部30Cから入力ゲイン切り換え部21の第2段階用の補正係数P2を読み出して第1レベル補正部23Cにセットし、補正係数記憶部30Cから出力ゲイン切り換え部28の第5段階用の補正係数Q5を読み出して第2レベル補正部34Cにセットし、ディジタル信号処理部24Aに対しFIRフィルタの過去のサンプルデータを算術シフト演算で1ビット右シフトして1/2倍の大きさとする(ステップS154、S155)。これにより、ゲイン切り換えの前後で出力ゲイン切り換え部28から出力されるアナログオーディオ信号Aoutが不連続となるのが防止される。   Thereafter, when the measurement level at the first level measurement unit 29C becomes excessive exceeding a predetermined constant level, YES is determined in step S145, and the current input gain switching unit 21 is not yet in the first stage, but the output gain is switched. Since the unit 28 is not yet in the sixth stage, the input gain switching unit 21 is returned to × 2 in the second stage and optimized so as not to become an excessive input with respect to the dynamic range of the A / D conversion unit 22, and the output gain is switched accordingly. The unit 28 is switched to x1 / 2 of the fifth stage (steps S151 to S153). Subsequently, the correction coefficient P2 for the second stage of the input gain switching unit 21 is read from the correction coefficient storage unit 30C and set in the first level correction unit 23C, and the fifth of the output gain switching unit 28 from the correction coefficient storage unit 30C. The correction coefficient Q5 for the stage is read and set in the second level correction unit 34C, and the past sample data of the FIR filter is shifted to the right by one bit by arithmetic shift operation with respect to the digital signal processing unit 24A, and is ½ times larger. (Steps S154 and S155). This prevents the analog audio signal Aout output from the output gain switching unit 28 before and after gain switching from becoming discontinuous.

その後、第2レベル測定部36の測定の結果、一定時間以上小レベル状態が続き、図21のステップS161でYESとなったとき、制御部31Cは現在ゲイン切り換え部33がまだ第6段階でなく、出力ゲイン切り換え部28がまだ第1段階でないので、ゲイン切り換え部33を第2段階の×2に切り換えてD/A変換部27のダイナミックレンジに対し最適化し、その分出力ゲイン切り換え部28を1段階下げ第4段階の×1/4に切り換える(ステップS163〜S165)。続いて、補正係数記憶部30Cから出力ゲイン切り換え部28の第4段階用の補正係数Q4を読み出して第2レベル補正部34Cにセットし、第2レベル補正部34Cから出力ゲイン切り換え部28までのゲインが出力ゲイン切り換え部28の第6段階に対し正確に1/4倍となるようにする(ステップS166)。これにより、出力ゲイン切り換え部28から出力されるアナログオーディオ信号Aoutがゲイン切り換え前後で不連続となるのが防止される。   After that, as a result of the measurement of the second level measurement unit 36, the low level state continues for a certain time or more, and when YES is obtained in step S161 in FIG. 21, the control unit 31C has not yet reached the sixth stage in the current gain switching unit 33. Since the output gain switching unit 28 is not yet in the first stage, the gain switching unit 33 is switched to × 2 in the second stage to optimize the dynamic range of the D / A conversion unit 27, and the output gain switching unit 28 is correspondingly changed. Decrease by one level and switch to × 1/4 of the fourth level (steps S163 to S165). Subsequently, the correction coefficient Q4 for the fourth stage of the output gain switching unit 28 is read from the correction coefficient storage unit 30C and set in the second level correction unit 34C, and from the second level correction unit 34C to the output gain switching unit 28. The gain is accurately set to 1/4 times the sixth level of the output gain switching unit 28 (step S166). This prevents the analog audio signal Aout output from the output gain switching unit 28 from becoming discontinuous before and after the gain switching.

その後、再び第2レベル測定部36で測定した信号レベルが一定時間以上の小レベル状態が続いたとき、ステップS161でYESと判断し、ゲイン切り換え部33を第3段階の×4に切り換えてD/A変換部27のダイナミックレンジに対し最適化し、その分出力ゲイン切り換え部28を1段階下げて第3段階の×1/8に切り換える(ステップS163〜S165)。続いて、補正係数記憶部30Cから出力ゲイン切り換え部28の第3段階用の補正係数Q3を読み出して第2レベル補正部34Cにセットし、第2レベル補正部34Cから出力ゲイン切り換え部28までのゲインが出力ゲイン切り換え部28の第6段階に対し正確に1/8倍となるようにする。(ステップS166)。   Thereafter, when the signal level measured by the second level measurement unit 36 continues to be in a small level state for a certain time or more, it is determined YES in step S161, and the gain switching unit 33 is switched to x4 in the third stage. The dynamic range of the / A conversion unit 27 is optimized, and the output gain switching unit 28 is lowered by one step and switched to x1 / 8 of the third step (steps S163 to S165). Subsequently, the third-stage correction coefficient Q3 of the output gain switching section 28 is read from the correction coefficient storage section 30C and set in the second level correction section 34C, and from the second level correction section 34C to the output gain switching section 28. The gain is set to exactly 8 times the sixth stage of the output gain switching unit 28. (Step S166).

その後、第2レベル測定部36での測定レベルが所定の一定レベルを越える過大になったとき、ステップS162でYESと判断し、現在ゲイン切り換え部33がまだ第1段階でなく、出力ゲイン切り換え部28がまだ第6段階でないので、ゲイン切り換え部33を第2段階の×2に戻してD/A変換部27のダイナミックレンジに対し過大入力とならないように最適化し、その分出力ゲイン切り換え部28を第4段階の×1/4に切り換える(ステップS167〜S169)。続いて、補正係数記憶部30Cから出力ゲイン切り換え部28の第3段階用の補正係数Q3を読み出して第2レベル補正部34Cにセットする(ステップS170)。これにより、ゲイン切り換えの前後で出力ゲイン切り換え部28から出力されるアナログオーディオ信号Aoutが不連続となるのが防止される。   After that, when the measurement level in the second level measurement unit 36 becomes excessive exceeding a predetermined constant level, it is determined YES in step S162, and the current gain switching unit 33 is not yet in the first stage, but the output gain switching unit. 28 is not yet in the sixth stage, the gain switching unit 33 is returned to x2 in the second stage to optimize the dynamic range of the D / A conversion unit 27 so that it does not become an excessive input, and the output gain switching unit 28 correspondingly. Is switched to × 1/4 of the fourth stage (steps S167 to S169). Subsequently, the third-stage correction coefficient Q3 of the output gain switching section 28 is read from the correction coefficient storage section 30C and set in the second level correction section 34C (step S170). This prevents the analog audio signal Aout output from the output gain switching unit 28 before and after gain switching from becoming discontinuous.

この実施例によれば、A/D変換対象の入力アナログオーディオ信号のレベルに応じて入力ゲイン切り換え部21のゲインを切り換え、レベルを最適化してA/D変換部22に入力することで、A/D変換で生じる量子化歪を低減することができ、D/A変換対象のディジタルオーディオ信号のレベルに応じてゲイン切り換え部33のゲインを切り換え、レベルを最適化してD/A変換部27に入力することで、D/A変換で生じる量子化歪を低減することができる。
また、基準信号を用いて入力ゲイン切り換え部21の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定し、入力ゲイン切り換え部21にA/D変換対象のアナログオーディオ信号が印加されているときに、入力ゲイン切り換え部21のゲインに応じてA/D変換部22から出力されたディジタルオーディオ信号に対しレベル補正を行なうようにしたので、アナログ回路で構成される入力ゲイン切り換え部21の各段階のゲインに誤差があっても、信号に対するゲインを正確に切り換えることができる。同様に、基準信号を用いて出力ゲイン切り換え部28の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定し、出力ゲイン切り換え部28にD/A変換されたアナログオーディオ信号が印加されているときに、出力ゲイン切り換え部28のゲインに応じてD/A変換対象のディジタルオーディオ信号に対しレベル補正を行なうようにしたので、アナログ回路で構成される出力ゲイン切り換え部28の各段階のゲインに誤差があっても、信号に対するゲインを正確に切り換えることができる。
また、A/D変換後のディジタルオーディオ信号をディジタル信号処理する場合、入力ゲイン切り換え部21のゲイン切り換えと連動してディジタル信号処理部24Aに保持された過去のサンプルデータのレベルを切り換える必要があるが、入力ゲイン切り換え部21の複数段階のゲイン設定値を2の乗数倍で切り換えるようにしたので、過去のサンプルデータのレベルの切り換えを算術シフト演算(右シフトまたは左シフト)で簡単に実行することができる。
また、ゲイン切り換え部33は信号処理部24Aの出力に対するゲインを2の乗数倍で切り換えるようにしたので、ゲイン切り換えのための演算をビットシフト動作で簡単に実行することができる。
According to this embodiment, the gain of the input gain switching unit 21 is switched according to the level of the input analog audio signal to be A / D converted, and the level is optimized and input to the A / D conversion unit 22. Quantization distortion caused by the / D conversion can be reduced, the gain of the gain switching unit 33 is switched according to the level of the digital audio signal to be D / A converted, and the level is optimized to the D / A conversion unit 27. By inputting, quantization distortion caused by D / A conversion can be reduced.
Further, a correction coefficient for each step for canceling the gain error of each step of the input gain switching unit 21 is determined using the reference signal, and an analog audio signal to be A / D converted is applied to the input gain switching unit 21. Since the level correction is performed on the digital audio signal output from the A / D conversion unit 22 in accordance with the gain of the input gain switching unit 21, the input gain switching unit configured by an analog circuit is used. Even if there is an error in the gain at each stage of 21, the gain for the signal can be switched accurately. Similarly, a correction coefficient for each step for canceling the gain error of each step of the output gain switching unit 28 is determined using the reference signal, and the analog audio signal D / A converted by the output gain switching unit 28 Since the level correction is performed on the digital audio signal to be D / A converted in accordance with the gain of the output gain switching unit 28 when it is applied, each of the output gain switching unit 28 configured by an analog circuit is performed. Even if there is an error in the gain of the stage, the gain for the signal can be switched accurately.
Further, when digital signal processing is performed on the digital audio signal after A / D conversion, it is necessary to switch the level of past sample data held in the digital signal processing unit 24A in conjunction with the gain switching of the input gain switching unit 21. However, since the gain setting values in a plurality of stages of the input gain switching unit 21 are switched by a multiplier of 2, the level of the past sample data can be easily switched by arithmetic shift calculation (right shift or left shift). be able to.
Further, since the gain switching unit 33 switches the gain with respect to the output of the signal processing unit 24A by a multiplier factor of 2, the calculation for gain switching can be easily executed by the bit shift operation.

なお、上記した第4実施例では、入力ゲイン切り換え部は第1段階のゲインを基準にしたときの第2段階乃至第6段階のゲインの相対誤差を打ち消すように補正したが、各段階のゲインの絶対誤差を打ち消すように補正しても良い。同様に、出力ゲイン切り換え部は第6段階のゲインを基準にしたときの第2段階乃至第5段階のゲインの相対誤差を打ち消すように補正したが、各段階のゲインの絶対誤差を打ち消すように補正しても良い。   In the fourth embodiment described above, the input gain switching unit is corrected so as to cancel the relative error of the second to sixth stage gains when the first stage gain is used as a reference. The absolute error may be corrected so as to cancel out. Similarly, the output gain switching unit has been corrected so as to cancel the relative error of the gains of the second stage to the fifth stage when the gain of the sixth stage is used as a reference, but so as to cancel the absolute error of the gain of each stage. It may be corrected.

本発明は、オーディオ信号以外にも、映像信号など他の種類の信号をA/D変換またはD/A変換する場合にも同様に適用できる。   The present invention is similarly applicable to A / D conversion or D / A conversion of other types of signals such as video signals in addition to audio signals.

従来の信号処理システムの一例を示すブロック図である。It is a block diagram which shows an example of the conventional signal processing system. アナログゲイン切り換え回路の一例を示す回路図である。It is a circuit diagram which shows an example of an analog gain switching circuit. 図2の回路特性の説明図である。It is explanatory drawing of the circuit characteristic of FIG. 従来の音量調整回路の一例を示すブロック図である。It is a block diagram which shows an example of the conventional volume control circuit. 本発明の第1実施例に係る帯域制限用信号処理装置のブロック図である(実施例1)。1 is a block diagram of a signal processing device for band limitation according to a first embodiment of the present invention (first embodiment). FIG. 図5中のディジタル信号処理部のシグナルフローを示す説明図である。It is explanatory drawing which shows the signal flow of the digital signal processing part in FIG. 図5の制御部の制御処理を示すフローチャートである。It is a flowchart which shows the control processing of the control part of FIG. 図5の制御部の制御処理を示すフローチャートである。It is a flowchart which shows the control processing of the control part of FIG. 本発明の第2実施例に係る帯域制限用信号処理装置のブロック図である(実施例2)。It is a block diagram of the signal processing apparatus for band limitation which concerns on 2nd Example of this invention (Example 2). 図9の制御部の制御処理を示すフローチャートである。It is a flowchart which shows the control processing of the control part of FIG. 図9の制御部の制御処理を示すフローチャートである。It is a flowchart which shows the control processing of the control part of FIG. 図9の変形例の構成を示すブロック図である。It is a block diagram which shows the structure of the modification of FIG. 本発明の第3実施例に係る音量調整装置のブロック図である(実施例3)。It is a block diagram of the volume control apparatus which concerns on 3rd Example of this invention (Example 3). 図13の記憶部に記憶された制御テーブルの説明図である。It is explanatory drawing of the control table memorize | stored in the memory | storage part of FIG. 図13の制御部の制御処理を示すフローチャートである。It is a flowchart which shows the control processing of the control part of FIG. 図13の制御部の制御処理を示すフローチャートである。It is a flowchart which shows the control processing of the control part of FIG. 本発明の第4実施例に係る帯域制限用信号処理装置のブロック図である(実施例4)。FIG. 10 is a block diagram of a signal processing device for band limitation according to a fourth embodiment of the present invention (fourth embodiment). 図17の制御部の制御処理を示すフローチャートである。It is a flowchart which shows the control processing of the control part of FIG. 図17の制御部の制御処理を示すフローチャートである。It is a flowchart which shows the control processing of the control part of FIG. 図17の制御部の制御処理を示すフローチャートである。It is a flowchart which shows the control processing of the control part of FIG. 図17の制御部の制御処理を示すフローチャートである。It is a flowchart which shows the control processing of the control part of FIG.

符号の説明Explanation of symbols

20、26、32、35 スイッチ部
21 入力ゲイン切り換え部
22 A/D変換部
23、34 レベル補正部
23C 第1レベル補正部
24、24A、24B ディジタル信号処理部
25 基準信号生成部
27 D/A変換部
28、28B 出力ゲイン切り換え部
29 レベル測定部
29C 第1レベル測定部
30、30A、30C 補正係数記憶部
30B 記憶部
31、31A、31B、31C 制御部
33 ゲイン切換部
34C 第2レベル補正部
36 第2レベル測定部
20, 26, 32, 35 Switch unit 21 Input gain switching unit 22 A / D conversion unit 23, 34 Level correction unit 23C First level correction unit 24, 24A, 24B Digital signal processing unit 25 Reference signal generation unit 27 D / A Conversion unit 28, 28B Output gain switching unit 29 Level measurement unit 29C First level measurement unit 30, 30A, 30C Correction coefficient storage unit 30B Storage unit 31, 31A, 31B, 31C Control unit 33 Gain switching unit 34C Second level correction unit 36 Second Level Measurement Unit

Claims (6)

入力アナログ信号をA/D変換するA/D変換手段と、A/D変換手段の前段に設けられて入力アナログ信号に対し複数段階の所定の設定値のゲインに切り換え可能な入力ゲイン切り換え手段と、を備えたA/D変換装置において、
入力ゲイン切り換え手段のゲイン測定用の基準信号を発生する基準信号発生手段と、
通常時は入力アナログ信号を選択して入力ゲイン切り換え手段に入力させ、測定時は基準信号を選択して入力ゲイン切り換え手段に入力させる選択手段と、
測定時、基準信号が選択手段を介して入力ゲイン切り換え手段に印加されているときに、入力ゲイン切り換え手段のゲインを各段階に切り換えたときのA/D変換手段の出力レベルを測定するレベル測定手段と、
レベル測定手段で測定したレベルに基づき、入力ゲイン切り換え手段の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定する補正係数決定手段と、
通常時、選択手段を介して入力ゲイン切り換え手段に入力アナログ信号が印加されているときに、入力ゲイン切り換え手段のゲインに応じてA/D変換手段から出力されたディジタル信号に対し、補正係数決定手段で決定された補正係数に基づきレベル補正を行なう補正手段と、
を備えたことを特徴とするA/D変換装置。
A / D conversion means for A / D converting an input analog signal, and input gain switching means provided in a preceding stage of the A / D conversion means and capable of switching to a predetermined set value gain in a plurality of stages for the input analog signal In an A / D conversion device comprising:
Reference signal generating means for generating a reference signal for gain measurement of the input gain switching means;
A selection means for selecting an input analog signal for normal input and inputting it to the input gain switching means, and for selecting a reference signal for input to the input gain switching means for measurement,
Level measurement that measures the output level of the A / D conversion means when the gain of the input gain switching means is switched to each stage when the reference signal is applied to the input gain switching means via the selection means during measurement. Means,
Correction coefficient determining means for determining a correction coefficient for each stage for canceling the gain error of each stage of the input gain switching means based on the level measured by the level measuring means;
Normally, when an input analog signal is applied to the input gain switching means via the selection means, the correction coefficient is determined for the digital signal output from the A / D conversion means according to the gain of the input gain switching means. Correction means for performing level correction based on the correction coefficient determined by the means;
An A / D conversion device comprising:
入力ゲイン切り換え手段の複数段階のゲインの設定値は2の乗数倍または1/2の乗数倍の値としたこと、
を特徴とする請求項1記載のA/D変換装置。
The gain setting value of the multiple steps of the input gain switching means is a value that is a multiplier of 2 or a multiplier of 1/2.
The A / D converter according to claim 1.
ディジタル信号をD/A変換して出力するD/A変換手段と、D/A変換手段の後段に設けられて出力アナログ信号に対し複数段階の所定の設定値のゲインに切り換え可能な出力ゲイン切り換え手段と、を備えたD/A変換装置において、
出力ゲイン切り換え手段のゲイン測定用の基準信号を発生する基準信号発生手段と、
通常時は出力アナログ信号を選択して出力ゲイン切り換え手段に入力させ、測定時は基準信号を選択して出力ゲイン切り換え手段に入力させる選択手段と、
測定時、出力ゲイン切り換え手段から出力されるアナログ信号が入力されるA/D変換手段と、
測定時、基準信号が選択手段を介して出力ゲイン切り換え手段に印加されているときに、出力ゲイン切り換え手段のゲインを各段階に切り換えたときのA/D変換手段の出力レベルを測定するレベル測定手段と、
レベル測定手段で測定した出力レベルに基づき、出力ゲイン切り換え手段の各段階のゲインの誤差を打ち消すための各段階別の補正係数を決定する補正係数決定手段と、
通常時、選択手段を介して出力ゲイン切り換え手段にD/A変換手段の出力が印加されているときに、出力ゲイン切り換え手段のゲインに応じてD/A変換手段に入力されるディジタル信号に対し、補正係数決定手段で決定された補正係数に基づきレベル補正を行なう補正手段と、
を備えたことを特徴とするD/A変換装置。
D / A conversion means for D / A converting and outputting a digital signal, and output gain switching provided at a subsequent stage of the D / A conversion means and capable of switching to a predetermined set value gain for the output analog signal And a D / A conversion device comprising:
Reference signal generating means for generating a reference signal for gain measurement of the output gain switching means;
A selection means for selecting an output analog signal for normal operation and inputting it to the output gain switching means, and for selecting a reference signal for input to the output gain switching means for measurement,
A / D conversion means to which an analog signal output from the output gain switching means is input during measurement;
Level measurement that measures the output level of the A / D conversion means when the gain of the output gain switching means is switched to each stage when the reference signal is applied to the output gain switching means via the selection means during measurement. Means,
Correction coefficient determining means for determining a correction coefficient for each stage for canceling the gain error of each stage of the output gain switching means based on the output level measured by the level measuring means;
Normally, when the output of the D / A conversion means is applied to the output gain switching means via the selection means, the digital signal input to the D / A conversion means according to the gain of the output gain switching means Correction means for performing level correction based on the correction coefficient determined by the correction coefficient determination means;
A D / A conversion device comprising:
出力ゲイン切り換え手段の複数段階のゲイン設定値は2の乗数倍または1/2の乗数倍の値としたこと、
を特徴とする請求項3記載のD/A変換装置。
The gain setting value of the plurality of stages of the output gain switching means is a value that is a multiplier of 2 or a multiplier of 1/2.
The D / A converter according to claim 3.
入力アナログ信号をA/D変換するA/D変換手段と、A/D変換手段から出力された入力ディジタル信号に対し信号処理を行なう信号処理手段と、信号処理手段の出力ディジタル信号をD/A変換して出力するD/A変換手段と、A/D変換手段の前段に設けられて入力アナログ信号に対し複数段階の所定の設定値のゲインに切り換え可能な入力ゲイン切り換え手段と、D/A変換手段の後段に設けられて出力アナログ信号に対し複数段階の所定の設定値のゲインに切り換え可能な出力ゲイン切り換え手段と、を備えた信号処理装置において、
入力ゲイン切り換え手段と出力ゲイン切り換え手段のゲイン測定用の基準信号を発生する基準信号発生手段と、
通常時は入力アナログ信号を選択して入力ゲイン切り換え手段に入力させ、第1の測定時は基準信号を選択して入力ゲイン切り換え手段に入力させ、第2の測定時は出力ゲイン切り換え手段の出力を選択して入力ゲイン切り換え手段に入力する第1の選択手段と、
通常時は出力アナログ信号を選択して出力ゲイン切り換え手段に入力し、第2の測定時は基準信号を選択して出力ゲイン切り換え手段に入力させる第2の選択手段と、
第1の測定時、基準信号が第1の選択手段を介して入力ゲイン切り換え手段に印加されているときに、入力ゲイン切り換え手段のゲインを各段階に切り換えたときのA/D変換手段の出力レベルを測定し、第2の測定時、基準信号が第2の選択手段、出力ゲイン切り換え手段、第1の選択手段を介して入力ゲイン切り換え手段に印加されているときに、出力ゲイン切り換え手段のゲインを各段階に切り換えたときのA/D変換手段の出力レベルを測定するレベル測定手段と、
レベル測定手段で測定したレベルに基づき、入力ゲイン切り換え手段の各段階のゲインの誤差を打ち消すための各段階別の補正係数と出力ゲイン切り換え手段の各段階のゲインの誤差を打ち消すための各段階別の補正係数とを決定する補正係数決定手段と、
通常時、第1の選択手段を介して入力ゲイン切り換え手段に入力アナログ信号が印加され、かつ第2の選択手段を介して出力ゲイン切り換え手段に出力アナログ信号が印加されているときに、入力ゲイン切り換え手段のゲインと出力ゲイン切り換え手段のゲインに応じてA/D変換手段とD/A変換手段の間でディジタル信号に対し、補正係数決定手段で決定された補正係数に基づきレベル補正を行なう補正手段と、
を備えたことを特徴とする信号処理装置。
A / D conversion means for A / D converting the input analog signal, signal processing means for performing signal processing on the input digital signal output from the A / D conversion means, and D / A for the output digital signal of the signal processing means D / A conversion means for converting and outputting; input gain switching means provided in the preceding stage of the A / D conversion means and capable of switching to a predetermined set value gain in a plurality of stages for the input analog signal; and D / A An output gain switching means provided at a subsequent stage of the conversion means and capable of switching to a predetermined set value gain of a plurality of stages for the output analog signal;
Reference signal generating means for generating a reference signal for gain measurement of the input gain switching means and the output gain switching means;
During normal measurement, the input analog signal is selected and input to the input gain switching means. During the first measurement, the reference signal is selected and input to the input gain switching means. During the second measurement, the output of the output gain switching means is output. First selection means for selecting and inputting to the input gain switching means;
An output analog signal is selected and input to the output gain switching means at normal time, and a reference signal is selected and input to the output gain switching means at the time of the second measurement;
During the first measurement, when the reference signal is applied to the input gain switching means via the first selection means, the output of the A / D conversion means when the gain of the input gain switching means is switched to each stage. When the level is measured and the reference signal is applied to the input gain switching means via the second selection means, the output gain switching means, and the first selection means during the second measurement, the output gain switching means Level measuring means for measuring the output level of the A / D conversion means when the gain is switched to each stage;
Based on the level measured by the level measuring means, the correction coefficient for each stage for canceling the gain error of each stage of the input gain switching means and for each stage for canceling the gain error of each stage of the output gain switching means Correction coefficient determining means for determining the correction coefficient of
Normally, when the input analog signal is applied to the input gain switching means via the first selection means and the output analog signal is applied to the output gain switching means via the second selection means, the input gain Correction for performing level correction on the digital signal between the A / D conversion means and the D / A conversion means according to the gain of the switching means and the gain of the output gain switching means based on the correction coefficient determined by the correction coefficient determination means Means,
A signal processing apparatus comprising:
入力ゲイン切り換え手段の複数段階のゲインの設定値は2の乗数倍または1/2の乗数倍の値とし、出力ゲイン切り換え手段の複数段階のゲインの設定値は2の乗数倍または1/2の乗数倍の値としたこと、
を特徴とする請求項5記載の信号処理装置。
The multi-stage gain setting value of the input gain switching means is a multiple of 2 or a multiplier value of 1/2, and the multi-stage gain setting value of the output gain switching means is a multiplier of 2 or 1/2. A multiplier value,
The signal processing device according to claim 5.
JP2008296180A 2008-11-19 2008-11-19 A/d conversion apparatus, d/a conversion apparatus, and signal processing apparatus Pending JP2010124250A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008296180A JP2010124250A (en) 2008-11-19 2008-11-19 A/d conversion apparatus, d/a conversion apparatus, and signal processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008296180A JP2010124250A (en) 2008-11-19 2008-11-19 A/d conversion apparatus, d/a conversion apparatus, and signal processing apparatus

Publications (1)

Publication Number Publication Date
JP2010124250A true JP2010124250A (en) 2010-06-03

Family

ID=42325184

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008296180A Pending JP2010124250A (en) 2008-11-19 2008-11-19 A/d conversion apparatus, d/a conversion apparatus, and signal processing apparatus

Country Status (1)

Country Link
JP (1) JP2010124250A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291139A (en) * 2011-03-22 2011-12-21 北京时代民芯科技有限公司 Automatic maladjustment elimination circuit for folding and interpolating analog-digital converter
JP2013005389A (en) * 2011-06-21 2013-01-07 Rohm Co Ltd Audio signal processing circuit and audio apparatus using the same
JP2013005390A (en) * 2011-06-21 2013-01-07 Rohm Co Ltd Audio signal processing circuit and audio apparatus using the same
JP2013046129A (en) * 2011-08-23 2013-03-04 Renesas Electronics Corp Data processing device, data processing system, and watt-hour meter
WO2015198599A1 (en) * 2014-06-26 2015-12-30 日本電気株式会社 Measuring device, measuring system, measuring method, and computer readable recording medium
WO2019069439A1 (en) * 2017-10-06 2019-04-11 ヤマハ株式会社 Acoustic signal processing device and acoustic signal processing method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61163721A (en) * 1985-01-14 1986-07-24 Fuji Electric Co Ltd Analog input system
JPH05122075A (en) * 1991-10-24 1993-05-18 Sharp Corp Analog/digital converter

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61163721A (en) * 1985-01-14 1986-07-24 Fuji Electric Co Ltd Analog input system
JPH05122075A (en) * 1991-10-24 1993-05-18 Sharp Corp Analog/digital converter

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291139A (en) * 2011-03-22 2011-12-21 北京时代民芯科技有限公司 Automatic maladjustment elimination circuit for folding and interpolating analog-digital converter
JP2013005389A (en) * 2011-06-21 2013-01-07 Rohm Co Ltd Audio signal processing circuit and audio apparatus using the same
JP2013005390A (en) * 2011-06-21 2013-01-07 Rohm Co Ltd Audio signal processing circuit and audio apparatus using the same
JP2013046129A (en) * 2011-08-23 2013-03-04 Renesas Electronics Corp Data processing device, data processing system, and watt-hour meter
WO2015198599A1 (en) * 2014-06-26 2015-12-30 日本電気株式会社 Measuring device, measuring system, measuring method, and computer readable recording medium
US9876506B2 (en) 2014-06-26 2018-01-23 Nec Corporation Measuring device, measuring system, measuring method, and computer readable recording medium
WO2019069439A1 (en) * 2017-10-06 2019-04-11 ヤマハ株式会社 Acoustic signal processing device and acoustic signal processing method

Similar Documents

Publication Publication Date Title
JP4636926B2 (en) Multi-bit ΔΣ modulation type DA converter
JP2010124250A (en) A/d conversion apparatus, d/a conversion apparatus, and signal processing apparatus
US20120189131A1 (en) Low-pitched sound enhancement processing apparatus, speaker system and sound effects apparatus and processes
US8351619B2 (en) Auditory sense correction device
JP2007166195A (en) Signal processing apparatus, and signal processing method
JP2006524462A (en) Gain compensation
CN112449280B (en) Method of monitoring an electrical load, corresponding circuit, amplifier and audio system
JP2010259035A (en) Data processing device and data processing system
US6362764B1 (en) Digital to analog conversion apparatus and method with cross-fading between new and old data
WO2006132054A1 (en) Apparatus and method for widening audio signal band
JP2010109624A (en) Sound processing circuit, sound processor, and sound processing method
EP3419308B1 (en) Audio reproduction device
JP4877076B2 (en) Resonance sound adding device and resonance sound adding program
TWI425844B (en) Audio volume controlling circuit and method thereof
JP4830343B2 (en) Automatic sound field correction system and automatic sound field correction method
JP2006222701A (en) Output correction circuit for a/d converter
JP3123052B2 (en) Acoustic signal compressor device
JP2004140650A (en) Sound volume control circuit
JP4942755B2 (en) Audio signal processing apparatus and method
US10142756B2 (en) Signal processing device and signal processing method
JPH07307629A (en) Tone control circuit
JP2006114998A (en) Digital signal processing system
JP3304611B2 (en) Audio signal processing equipment
JP2012128370A (en) Compensation filter processor and method therefor
JP4931705B2 (en) Electronic volume circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100922

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110825

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20111012

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120313

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120322

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120712