FYI, and do a record.
This document would give a guide for playbacking flac or music file on Intel Edison with external usb DAC. Please understand that, I wrote this guide after my task done, so you would need make sure you have backup.
I would use Burson Conductor as a target device, it adept with c-media cm6631a usb receiver chip.
- Intel Edison mini breakout board
- otg usb micro b male to type B (usually dac with type b input)
- dc power core (7~15v)
- optional : wifi U.FL connect line
- Linux operation (Ubuntu or Debian is better for operation consistence.)
- other SW would be found in apt-get.
In this guide, if start from “#”, it mean comment on your host. If it start with “$”, it mean commend on Intel Edison. I would suggest operating on Linux. because we finally would compiler kernel for wifi driver support.
Flash ubilinux, debian w/ Wheezy for Edison
I prefer Debian than Yocto
- reference site: https://learn.sparkfun.com/tutorials/loading-debian-ubilinux-on-the-edison
- get image from http://www.emutexlabs.com/ubilinux
- #mkdir download
- #cd download
- #wget http://www.emutexlabs.com/files/ubilinux/ubilinux-edison-141030.tar.gz
- #tar -zxvf ubilinux-edison-141030.tar.gz
- install the flash tool first
# apt-get install dfu-util
- flash image
# cd toFlash
# sudo ./flashall.sh
- after flash done, please wait reboot twice.
- maybe you need do some configure on Intel Edison.
# sudo screen /dev/ttyUSB0 115200
- log on into edison with
- user : edison
- password: edison
- strongly suggest follow sparkfun’s reference site to add/modify the default user.
- sudo, ssh, etc.
- log on into edison with
after flash ubilinux, wifi would be work now. we would let it connect to wifi ap first, to make sure the device is workable.
- reference site: http://ubuntuforums.org/showthread.php?t=202834
- get hex_string
$wpa_passphrase <YOUR_WIFI_SSID> <YOUR_WIFI_PASSWORD>
- got the psk and remember your psk value for later usage.
- $vim /etc/network/interfaces
- commend auto usb0 with “#”
- uncomment wlan0, the line start should not have “#”
- fill your ssid and psk to profile field.
- in my case, I use eap wifi auth, here is a sample
iface wlan0 inet dhcp
post-up iwconfig wlan0 power off # lower the latency
- $ifup wlan0
- if wifi cant work, try iwconfig to check the quality and signal strength
- some like as Link Quality=70/70 Signal level=-36 dBm
Install MPD for a client-server playback server.
Compile new version MPD
this step is for new features of MPD (maybe new bugs..., but some music format with better support)
- the version in ubilinux is old, but we could install it to configure some variable.
$ sudo apt-get install mpd
- now we should compile it by yourself, remove mpd first (without --purge)
$ sudo apt-get remove mpd
- apt-get install some necessary packages
$ sudo apt-get install build-essential libglib2.0-dev git vim
- add the source repository
$ sudo vim /etc/apt/sources.list
- remove “#” from deb-src or add it!
$ sudo apt-get update
- use apt-build to update necessary packages.
$ sudo apt-get build-dep mpd
- compiler mpd from source code tarball
$ wget -O - http://www.musicpd.org/download/mpd/stable/mpd-0.19.7.tar.gz | tar -zxf -
$ cd mpd-0.19.7
$ make clean
- maybe you need to install some build tools here. check the missing dependent package and install them.
$ sudo make install
$ whereis mpd (to check the mpd path)
- base on last command, do a software link for it.
$ sudo ln -s /usr/local/bin/mpd /usr/bin/mpd
- after compile and install, we need some configure let it work for our purpose.
$ sudo aplay -lcard
- 1: Audio [USB2.0 High-Speed True HD Audio], device 0: USB Audio [USB Audio]
- make sure following path exist, and check some values that we care.
$ sudo vim /etc/mpd.conf
name "Burson Conductor" # any you like
device "hw:1,0" #value in aplay -l
$ sudo service mpd restart
but no sound output here. because default configure of Intel ‘s kernel have not build in snd-usb-audio module. we should follow next step.
Build your own kernel
remember back to your Linux workstation.
- reference site: Intel® Edison Boards and Compute Modules — Board Support Package (BSP) User Guide
- now we can build the new kernel for audio support
# mkdir edison
# cd edison
# wget -O - http://downloadmirror.intel.com/24389/eng/edison-src-rel1-maint-rel1-ww42-14.tgz#_ga=1.225557722.1979370645.1410536481 | tar -zxf -
# wget -O - https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.10.17.tar.bz2 | tar -jxf -
# cd ./linux-3.10.17
# patch -p1 < ../edison-src/device-software/meta-edison/recipes-kernel/linux/files/upstream_to_edison.patch
# cp ../edison-src/device-software/meta-edison/recipes-kernel/linux/files/defconfig .config
# cp drivers/tty/serial/mfd_trace.h include/trace/
- add usb sound support
# make menuconfig
- mark module M at device driver -> Sound card support -> Advenced Linux Sound Architecture -> USB sound devices -> USB Audio / MIDI driver
- add for wifi module boardcom 4334x
# cp -rf ../edison-src/broadcom_cws/ .
- Now build it
# make -j16 -p broadcom_cws/wlan/driver_bcm43x/ deb-pkg
- Wait it compil done, you would get three debs at parent folder “edison”
- now copy file into your Intel edison, if you have already set up ssh on edison, you can use scp to transfer file.
# scp *.deb xx.xx.xx.xx:/home/<USER>/
- change to your edison command line
- maybe you want to backup /boot before next step.
$ cp -R /boot/* /home/<USER>/boot_backup
- Install all deb file to complete the kernel installation
$ dpkg -i *.deb
$ cp /boot/vmlinuz-3.10.17-poky-edison /boot/vmlinuz (keep the vmlinuz-3.10.17-poky-edison would help you update package easier)
- after here, you should have a snd-usb-audio workable kernel on Edison or got a brick!!!
- if fail, go to “toFlash”, try again…
- now you should install some alsa packages.
$ apt-get install alsa-utils
$ su alsactrl init
$ aplay -Dhw:1,0 any.mp3
- If you got music from dac, done.
later you could use mpd client now.
訊息由此人編輯：Niise Wu : fix reference document link
訊息由此人編輯：Niise Wu : modify the command