world leader in high performance signal processing
Trace: » network_audio_player

Network Audio Player

Purpose

The netaudio is no longer supported since 2010 release.

This is a uClinux/Blackfin Networked Audio Media Node. This Networked Audio media node, which can play audio files that are mounted on Linux / Windows PCs and which can be selected through a web interface.

Features

  1. Play various audio files, MP3, FLAC, OGG, AAC and WAVE.
  2. Play audio files mounted on Windows / Linux PC.
  3. Web interface for playing and selecting audio files.
  4. Options to Next/Prev audio file play supported.
  5. Status of current playing audio file on demand.
  6. Options to pause songs, repeat play list and random play are provided.

Enable the Audio Node

Kernel Settings

  1. Enable audio in the kernel
  2. Enable Windows Networking in the kernel
  3. Enable SMBFS support in kernel file system

Both the Audio and Windows Networking (SMB) options can be loaded as modules (this is the default). You must either be running the kernel autoloader or you need to insmod them yourself before starting the network audio player.

Application Settings

  1. Enable the following user applications
      Customize Vendor/User Settings  --->
    	Blackfin canned demos  --->
    	  	[*] Netaudio
    	Filesystem Applications  --->	
    		[*] samba
    		[*]   smbmount
    		[*]   smbumount
    	Network Applications  --->
    		[*] boa-new(ver 0.94.14)
    	BusyBox  --->
    		[*] shell
    	Library Configuration  -->
    		[*] Build faad2
    		[*] Build flac
    		[*] Build tremor
    		[*] Build libao-0.8.6
    		[*] Build libaudio
    		[*] Build libmad
    		[*] Build libid3tag
  2. Build the kernel
  3. Load the image onto the Stamp board using uboot:
    1. Copy the images/linux file into the tftp server
    2. Power on the STAMP board
    3. Configure the boot loader to download the image from the tftp server and boot it. Refer to the u-boot release notes for more details.

Testing Server Setup

Before running the Network Audio demo, some songs should be stored in a shared directory on your server machine. This machine can be a Windows or a Linux PC. The Network Audio demo will use samba to map the shared directory and load the songs to play.

For Windows systems:
  1. Create a shared directory, say “MyMusic”. To share a directory, you can right-click your mouse on the directory in Windows and a menu will pop up. Select “Properties” then click on “Sharing” tab. The directory will be shared after you select “share this folder”.
  2. Create a sub-directory named “mp3” under the directory “MyMusic”. The sub-directory name must be “mp3”. If this sub-directory is not named “mp3”, then the Network Audio demo will fail to work.
  3. Copy your mp3 files to this new “mp3” sub-directoy.
For Linux systems:
  1. Make sure samba is installed on your Linux box. This is quite distro-specific so please see the documentation for your distro.
  2. Edit the smb.conf configuration file and create a new samba share. Generally this can be found in /etc/samba/ or /etc/config/ (depending on your distro).
  3. Start the samba server smbd. Generally this can be accomplished by running ”/etc/init.d/smbd start”.
  4. Create a sub-directory named “mp3” under the new samba share. The sub-directory name must be “mp3”. If this sub-directory is not named “mp3”, then the Network Audio demo will fail to work.
  5. Copy your mp3 files to this new “mp3” sub-directory.

Make sure the shared directory is writable, otherwise the Network Audio server will fail to start properly. Also make sure that there is a sub-directory in the share named “mp3” and all your mp3 files are stored in there.

Testing The Node

  1. Configure your board's IP address by typing one of the following commands:
    root:~> ifconfig eth0 my.ip.address
    
    or
    root:~> dhcpcd &
    
    For more information, see the Network Setup Page.
  2. Add some settings to your smb.conf to use smbmount more easily. To edit this file, run the following:
    root:~> vi ./etc/config/smb.conf
    
    If your machine is setup in a workgroup, you can use these settings:
        [global]
           workgroup = WORKGROUP
           encrypt passwords = yes
    
    If your machine is setup in a domain, you can use these settings:
        [global]
           workgroup = [name of domain]
           encrypt passwords = yes
    
  3. Launch the web server. Here we use Boa:
     boa -c /etc &
  4. Open your web browser and browse to the board's ip address, meaning something like http://ipaddress/. If all went well, you should see a welcome page outlining the features of the Network Audio Node.
  5. Click on the “Samba Mount” link on the top of the page to mount the remote share full of mp3 files.
    • In the “Samba Source” textbox, enter: ”//host.server.ip.address/shared.directory”
    • Click the “Next” button
    • Enter a username and password which has write access to the remote share
    • Click the “Mount” button
    • Click the “Check Samba Status” link at the top of the page to verify everything is in order
  6. Click on the “Start NetAudio” link an the top of the page to start the Network Audio server daemon.
  7. Click on the “Direct Play” link an the top of the page to control the Network Audio Node.
  8. Play some music!

Your username and password will be sent in plain text across the network connection from your computer to the board. If your connection is not secure, you may want to set your password to something simple for the duration of this test.

Playing with the Node

  • Playing
    • Click on the name of a song you wish to play from the file list
  • Adding to the Playlist
    • Check the checkbox to select the files you wish to queue
    • Click the “ADD” link to add them to the current playlist
    • The selected files will appear in the current playlist table
    • Click the play button to play the song, or you can simply click on the song in the playlist
  • Deleting from the Playlist
    • To clear the playlist, click “CLEAR”
  • Saving the Playlist
    • Click “SAVE” and you will be prompted for the filename
    • Enter the file name and click OK
    • The saved playlist will be listed in the playlist table
    • You can load or delete the saved playlist

Reference Information

  • Web Functions
    • “Samba Mount” - mount music shared directory
    • “Start NetAudio” - start the Network Audio Media Node
    • “Direct Play” - control the player
    • “Stop NetAudio” - stop the Network Audio Media Node
    • “Samba Unmount” - unmount the music shared directory
    • “Check Samba status” - check samba status
  • Quick Procedure Reference
    1. Mount the music directory
    2. Start NetAudio
    3. Direct Play (To listen songs)
    4. Stop NetAudio
    5. Unmount Samba
  • Samba Status Info
    • To check whether the samba mount is success or failure click on the link “Check Samba Status” found in the top of the page
    • If the samba mount has been successful, then the message “smbmount found” will be displayed
    • Otherwise, the “smbmount not found” will be displayed