This document would give a guide for playbacking flac or music file on Intel Edison with external usb DAC. Please understand that, I would not give all commend because i wrote this guide after my task done.
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 i-PEX 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
- get image from http://www.emutexlabs.com/ubilinux
- #mkdir download
- #cd download
- #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.
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
- 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
- $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 is for new features (maybe new bugs...)
- the version in ubilinux is old, but we could install it to configure some variable.
$apt-get install mpd
- now we should compile it by yourself
- remove mpd first
$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
- you would need to install some build tools here. check the missing dependent package and install them.
$ sudo make install
$ whereis mpd
- 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 mod 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 work station.
- reference site: https://communities.intel.com/docs/DOC-23159
- 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/
- change to your edison command line
- maybe you want to backup /boot before next step.
- $ cp -R /boot/* /home/
- $ dpkg -i *.deb
$ mv /boot/vmlinuz-3.10.17-poky-edison /boot/vmlinuz
- 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
- $ sudo su
- $ alsactrl init
- aplay -Dhw:1,0 any.mp3
- If you got music from dac, done.
forgive me, I would not write the mpd client now, maybe later.