element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
Sci Fi Your Pi
  • Challenges & Projects
  • Design Challenges
  • Sci Fi Your Pi
  • More
  • Cancel
Sci Fi Your Pi
Blog Sci Fi Your Pi: PiDesk - Project Update #19
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fvan
  • Date Created: 19 Aug 2015 12:00 PM Date Created
  • Views 1012 views
  • Likes 2 likes
  • Comments 3 comments
  • design_challenge
  • touch_motion_controls
  • touch_motion_control
  • sci_fi_your_pi
Related
Recommended

Sci Fi Your Pi: PiDesk - Project Update #19

fvan
fvan
19 Aug 2015

Previous posts for this project:

  • Sci Fi Your Pi: PiDesk - Project Description
  • Sci Fi Your Pi: PiDesk - Project Update #1
  • Sci Fi Your Pi: PiDesk - Guide: Setting Up the Raspberry Pi 2
  • Sci Fi Your Pi: PiDesk - Project Update #2
  • Sci Fi Your Pi: PiDesk - Review: Bare Conductive Touch Board
  • Sci Fi Your Pi: PiDesk - Project Update #3
  • Sci Fi Your Pi: PiDesk - Guide: Stepper Motors with Gertbot
  • Sci Fi Your Pi: PiDesk - Project Update #4
  • Sci Fi Your Pi: PiDesk - Project Update #5
  • Sci Fi Your Pi: PiDesk - Guide: Controlling NeoPixels with the Raspberry Pi A+/B+
  • Sci Fi Your Pi: PiDesk - Project Update #6
  • Sci Fi Your Pi: PiDesk - Project Update #7
  • Sci Fi Your Pi: PiDesk - Project Update #8
  • Sci Fi Your Pi: PiDesk - Project Update #9
  • Sci Fi Your Pi: PiDesk - Guide: Capacitive Touch with Atmel's AT42QT1070 Touch Sensor IC
  • Sci Fi Your Pi: PiDesk - Project Update #10
  • Sci Fi Your Pi: PiDesk - Guide: Magic Lamp with wireless charger, Adafruit Trinket & NeoPixels
  • Sci Fi Your Pi: PiDesk - Project Update #11
  • Sci Fi Your Pi: PiDesk - Project Update #12
  • Sci Fi Your Pi: PiDesk - Project Update #13
  • Sci Fi Your Pi: PiDesk - Project Update #14
  • Sci Fi Your Pi: PiDesk - Project Update #15
  • Sci Fi Your Pi: PiDesk - Project Update #16
  • Sci Fi Your Pi: PiDesk - Guide: Endstops with Gertbot
  • Sci Fi Your Pi: PiDesk - Project Update #17
  • Sci Fi Your Pi: PiDesk - Project Update #18

 

  • Project Update
    • Problem!
    • Solution?
    • Video

 

Project Update

 

Problem!

 

I was testing the combination of audio and light effects today, only to find out that they are affecting each other!

 

Playing audio messes up the animations and the LED strip starts blinking randomly. There is also a nasty jitter in the audio output. I don't know the exact cause of the problem, I just hope it won't affect anything else ... There's a video at the bottom of this post, demonstrating the problem.

 

Solution?

 

The current workaround involves a USB sound card. It's a super cheap, low quality sound card I got from eBay for about $2, which I had around. The device is plug an play, and all that is required is to specify it as the output device when playing out sound files.


image

 

Listing the device, ensuring it is detected properly:

 

pi@PiDesk ~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

 

It is the last one in the list, card 1, device 0. These are the two parameters required when playing out, using the "-D" option:

 

pi@PiDesk ~ $ aplay -D hw:1,0 example.wav
Playing WAVE 'example.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

 

The workaround is not that nice, but due to the time constraints, I'll stick with that for now. Another disadvantage of this solution is that it requires an extra USB port on the Pi. As I was planning on using the A+ (with a single USB port), I'll either have to use a USB splitter or move to the B+.

 

Anyway, problem solved for now, let's hope no other surprises pop up ...

 

Video

 

A short video demonstrating the problem using the onboard audio, and the solution with USB audio.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

  • Sign in to reply

Top Comments

  • balearicdynamics
    balearicdynamics over 10 years ago +1
    Hello Frederick, well done and fascinating work !!! Can't wait to see the desk full operational. Then about the problem of the "noisy PI", I have no idea what this can be, the same tic happened to me in…
  • mcb1
    mcb1 over 10 years ago

    Strange how these things can happen....

    I suspect something is happening to the clocking for the signal.

     

    At least you have a workaround to continue.

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 10 years ago

    I can only see available processor time per process as a reason for the two things interfering with each other - or are they both relying on / messing with  the same hardware clock?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 10 years ago

    Hello Frederick, well done and fascinating work !!! Can't wait to see the desk full operational.

     

    Then about the problem of the "noisy PI", I have no idea what this can be, the same tic happened to me in the same way. Definitely the only solution was to use (in my case the Cirrus Logic) and external audio card. Maybe there is something strange or whatever else but I don't know. Take a look to this video and you find the same almost identical issue. http://www.element14.com/community/videos/16822/l/speakers-issue

     

    Enrico

    • Cancel
    • Vote Up +1 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