element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Streaming from the RDA5807SP receiver to Icecast2, via a Raspberry Pi
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: packetgeek
  • Date Created: 19 Jan 2014 11:07 PM Date Created
  • Views 907 views
  • Likes 0 likes
  • Comments 1 comment
Related
Recommended

Streaming from the RDA5807SP receiver to Icecast2, via a Raspberry Pi

packetgeek
packetgeek
19 Jan 2014

Yesterday, I wrote about Controlling the RDA5807SP FM Radio Receiver with the Raspberry Pi.  Today, I've managed to add a SoundBlaster USB sound card (model SB1290) to the mix and get the whole thing to generate a MP3 stream (via Darkice) to an Icecast2 server, elsewhere in my network.  Following are notes on the steps that I took.


1) First, use Steffen Müller's procedure for compiling Darkice with mp3 support.  Because I'm using an external sound card as a source, I had to tweak the darkice.cfg file just a bit.  The file ended up looking like:

 

  [general]
  duration        = 0        # duration of encoding, in seconds. 0 means forever
  bufferSecs      = 5         # size of internal slip buffer, in seconds
  reconnect       = yes       # reconnect to the server(s) if disconnected
  
  [input]
  device          = default:Pro
  sampleRate      = 11025     # sample rate in Hz. try 11025, 22050 or 44100
  bitsPerSample   = 16        # bits per sample. try 16
  channel         = 1         # channels. 1 = mono, 2 = stereo
  
  [icecast2-0]
  bitrateMode     = vbr
  format          = mp3
  quality = 0.6
  server          = jukebox.joat
  port            = 8000      # port of the IceCast2 server, usually 8000
  password        = donthackme    # source password to the IceCast2 server
  mountPoint      = radio
  name            = DarkIce trial
  description     = This is only a trial
  url             = http://jukebox.joat
  genre           = my own    # genre of the stream
  public          = yes       # advertise this stream?
  #localDumpFile   = recording.mp3

 

In the above, only the 16 bitsPerSample setting worked well.  Setting it to 8 caused the audio to be accepted at a much, much lower volume.  Also, uncomment the last line only if you want the Raspberry Pi to record to a local file, as well as sending the stream to Icecast (e.g., for troubleshooting).  It eats up file space quickly.

 

Also in the above, I figured out which device to use by running "aplay -l" and "aplay -L".  The latter showed two default sound cards (default:CARD=ALSA and default:CARD=Pro).  The setting that worked for me is shown (default:Pro) (note: capitalization counts for this).

 

I next had to make sure that the appropriate kernel modules were loaded via:

 

  modprobe snd-seq-oss
  modprobe snd-pcm-oss
  modprobe snd-mixer-oss

 

Update: I've been reminded that the above kernel modules should be loaded before attempting to list cards via the aplay commend (also above).

 

After all that, fire up Icecast2, the radio command, and Darkice (in that order).  If Icecast is configured to accept the stream (mine is configured to accept any source which uses the proper password), you should see the new stream on the admin web page and should be able to listen to the steam by pointing a MP3 client at it.

 

Let me know if you try it?

  • Sign in to reply
  • packetgeek
    packetgeek over 11 years ago

    Note: the hostname in the config file looks strange because it's part of a private domain, hosted internally on the house network.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube