半年前に秋月で購入したUSB-DACのキット(AKI.DAC-U2704 Rev.C)を組み立ててみた。
Windows8.1のノートPCに接続し特追加のドライバも不要で音を出す事ができた。
USB-DACのRCA端子から3.5φ3PIN Audioジャックメスの自作変換ケーブルを経由させ、USB-DACでイヤホンを直接駆動させている。
PC側は最大音量とするとイヤホン側はそこそこの音量での音がでている。
音は普通に出るが、ノートPC付属のオーディオのイヤホン出力に比べて特に良くも悪くもないといったところか。
サーという高音域のノイズが乗っているのが気になる。
私は音は出れば良いクチではあるが、せっかくなのでキットに含まれているコンデンサを手持ちのコンデンサの中から比較的よさそうなものと取り換えてみた。
気持ちノイズは減ったような気もするが根本解決はできなかった。


波形等は見ていない。
回路図を見る限り、アナログ電源とデジタル電源が分離されていない。
アナログ系用に別電源を用意しようかと思ったがやっていない。
あと、イヤホンで直接聞くのならライン出力には50KHz程度で切れるLPFが必要だと思われる。
構想を色々膨らませている段階で飽きてしまい3か月ほど放置していたのだが、BBBでDAC-U2704を用いて音を出す事ができないか試したところ 簡単に音が出たので記録を残しておく。
自分の環境ではWi-Fiが必要なのだが、BBBでWi-FiドングルとUSB-DACを共存させるためにはUSBハブが必要となる。
バスパワー対応のELECOM製U2H-EG4SBK を用いた。
alsa-utilsがinstallされているかを確認。
debian@beaglebone:~$ sudo apt-get install alsa-utils Reading package lists... Done Building dependency tree Reading state information... Done alsa-utils is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. debian@beaglebone:~$
既に最新のalsa-ttilsがinstall済。
debian@beaglebone:~$ aplay --help
Usage: aplay [OPTION]... [FILE]...
-h, --help help
--version print current version
-l, --list-devices list all soundcards and digital audio devices
-L, --list-pcms list device names
-D, --device=NAME select PCM by name
-q, --quiet quiet mode
-t, --file-type TYPE file type (voc, wav, raw or au)
-c, --channels=# channels
-f, --format=FORMAT sample format (case insensitive)
-r, --rate=# sample rate
-d, --duration=# interrupt after # seconds
-M, --mmap mmap stream
-N, --nonblock nonblocking mode
-F, --period-time=# distance between interrupts is # microseconds
-B, --buffer-time=# buffer duration is # microseconds
--period-size=# distance between interrupts is # frames
--buffer-size=# buffer duration is # frames
-A, --avail-min=# min available space for wakeup is # microseconds
-R, --start-delay=# delay for automatic PCM start is # microseconds
(relative to buffer size if <= 0)
-T, --stop-delay=# delay for automatic PCM stop is # microseconds from xrun
-v, --verbose show PCM structure and setup (accumulative)
-V, --vumeter=TYPE enable VU meter (TYPE: mono or stereo)
-I, --separate-channels one file for each channel
-i, --interactive allow interactive operation from stdin
--disable-resample disable automatic rate resample
--disable-channels disable automatic channel conversions
--disable-format disable automatic format conversions
--disable-softvol disable software volume control (softvol)
--test-position test ring buffer position
--test-coef=# test coefficient for ring buffer position (default 8)
expression for validation is: coef * (buffer_size / 2)
--test-nowait do not wait for ring buffer - eats whole CPU
--max-file-time=# start another output file when the old file has recorded
for this many seconds
--process-id-file write the process ID here
--use-strftime apply the strftime facility to the output file name
Recognized sample formats are: S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE FLOAT64_BE IEC958_SUBFRAME_LE IEC958_SUBFRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM SPECIAL S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE
Some of these may not be available on selected hardware
The available format shortcuts are:
-f cd (16 bit little endian, 44100, stereo)
-f cdr (16 bit big endian, 44100, stereo)
-f dat (16 bit little endian, 48000, stereo)
debian@beaglebone:~$ aplay --version
aplay: version 1.0.25 by Jaroslav Kysela
debian@beaglebone:~$
サウンドデバイスのリストを取る。
debian@beaglebone:~$ aplay -l **** List of PLAYBACK Hardware Devices **** card 1: DAC [USB Audio DAC], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 debian@beaglebone:~$
現時点使用可能なのがUSB DACのみで、Card 1, device 0にアサインされている。
適当にサンプルwavファイルを用意する。
以下サンプルを有難く拝借した場合の例。
debian@beaglebone:~$ wget http://www.ne.jp/asahi/music/myuu/wave/fanfare.wav
USB DACから鳴らしてみる。
debian@beaglebone:~$ aplay -D hw:1,0 fanfare.wav Playing WAVE 'fanfare.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo debian@beaglebone:~$
特に問題無く音が鳴動した。

