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 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
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum lxmusic will not play
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 8 replies
  • Subscribers 666 subscribers
  • Views 771 views
  • Users 0 members are here
  • raspberry_pi
Related

lxmusic will not play

jeffbiss
jeffbiss over 13 years ago

Alright, lxmusic is provided on the RPi Debian distro and will not play even after trying sudo apt-get install xmms2-plugin-all, to load codecs I assume, and sudo modprobe snd_bcm2835 prior to entering startx. Can someone provide a nice how-to get it to actually play when the play icon is clicked? It adds mp3 files to the "playlist", but then, well, nothing. I assume that there's something incredibly obvious, or not, that I'm just not getting to not get audio from the audio jack or to get lxmusic to indicate that its playing, such as the play icon changing to the pause icon.

 

Thanks in advance and sorry for my stupidity. I found a few pages that deal with this issue but none solved the no-play problem.

  • Sign in to reply
  • Cancel
  • Former Member
    Former Member over 13 years ago

    I don't know the command offhand, but you need to set ALSA to use the audio out jack from what I understand.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 13 years ago

    Here are a few possible things to check.  You've already loaded the snd_bmc2835 sound module using "modprobe", but better check that it's actually present using "lsmod".  There should be a few sound-related modules showing in the lsmod output (7 on my Pi).

     

    By the way, you might as well add the module name "snd_bmc2835" onto the end of the /etc/modules file too, using your favourite editor.  This will load the module automatically on boot and save you having to modprobe it manually.

     

    If all seems well there, try a clean start or restart of the ALSA system:

     

    • /etc/init.d/alsa-utils start            --- Start ALSA for the first time
    • /etc/init.d/alsa-utils restart         --- Restart the ALSA system

     

    If everything still looks good, then try a simple commandline player, for example mpg123 or my preferred one, moc.  If they're not in the default image (MOC is not) then you'll have to install one with apt-get, eg. "sudo apt-get install moc".  Invoke either of them directly on your .mp3 or .ogg files, for example "mocp foo.mp3".

     

    If there is still no sound then perhaps you're listening to the wrong output, for example the audio might be coming out over HDMI while you're listening on the analogue output, or vice versa.  You can switch between them using amixer:

     

    • amixer cset numid=3 1               --- This routes audio out the analogue port
    • amixer cset numid=3 2               --- This routes audio out the HDMI port

     

    Usually that's all you need to obtain sound, although some find that they also need "hdmi_drive=2" in their /boot/config.txt file if they want audio on HDMI, or "hdmi_drive=1" if their HDMI lead is plugged into a DVI-D input through an adapter.

     

    Morgaine.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jeffbiss
    jeffbiss over 13 years ago in reply to morgaine

    Morgaine,

     

    Thanks for that information but it appears that ALSA is not installed. I looked in /etc/init.d and alsa-utils is not there, so now to install ALSA.

     

    Then, and only then will I be able to use your information .

     

    Jeff

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 13 years ago in reply to jeffbiss

    Easy to fix:

     

    • sudo apt-get install alsa-utils

     

    I'm surprised it's not installed on your system already though.  I have no record of installing it here explicitly, although perhaps it got installed implicitly as a dependency for something else I installed.

     

    That said, the alsa-utils package definitely has problems on Pi, for example alsamixer doesn't work, and nor does speaker-test, unfortunately.  But amixer does work and is used to switch audio output as I described.

     

    Morgaine.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jeffbiss
    jeffbiss over 13 years ago in reply to morgaine

    From reading the RPi posts about lxmusic, I thought that ALSA was part of the Debian distro, but seeing that it's not there, I must be wrong. I'll try to put together a how-to for the community when I get through this. thanks for your help!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jeffbiss
    jeffbiss over 13 years ago in reply to jeffbiss

    Morgaine,

     

    Done! Again, thanks for your help.

     

    Jeff

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jeffbiss
    jeffbiss over 13 years ago

    One more thing, for anyone else having problems with lxmusic, see:

     

    http://elinux.org/R-Pi_Troubleshooting

     

    and look under "Sound does not work at all, or in some applications". I finally found this after Mograine provided information without calling me lazy or clueless.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to morgaine

    Morgaine, I don't think it is the Pi. Alsamixer and speaker-test both work on my Pi (Arch Arm). I had added the cset numid=3 1 to my /etc/rc.local so that my sound would always work properly at bootup (my monitor is HDMI but doesn't have built in speakers so I use the speaker out to connect to some cheap Logitech speakers).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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