WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Sound in piCore  (Read 73113 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Sound in piCore
« on: January 02, 2013, 12:57:44 PM »
You can expect ALSA available in the next few days. It works fine here. Also MOCP consol music player works fine with .mp3 files including id3tag display. Volume control doesn't work, but it's a good startup.

« Last Edit: January 02, 2013, 01:04:04 PM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Sound in piCore
« Reply #1 on: January 05, 2013, 06:09:01 AM »
Hi bmarkus.

Im very interested in this.
So are you able to play mp3 as well as flac files, or do I need to install these codecs as well?
Probably, I can use the import script to instal the libFLAC, libmad, libfaad codecs.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Sound in piCore
« Reply #2 on: January 05, 2013, 06:11:15 AM »
No import needed, extensions are in test phase. There are few players are ready too, including mocp which is the best console player in my view.

BTW, FLAC and libmad as well as libvorbis already in the repo.
« Last Edit: January 05, 2013, 08:30:11 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Sound in piCore
« Reply #3 on: January 06, 2013, 04:05:03 AM »
To get sound working with the on-board hardware, just install alsa.tcz from the repo. It will load and intialize all necessary components, no configuration needed.

At the moment only CLI players are available. Try moc.tcz which is tested with .mp3 and .flac but expected to work wind libvorbis and linsndfile supported files as well as speex. For .wav aplay can be used. Look around in the repo for other players.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Sound in piCore
« Reply #4 on: January 06, 2013, 07:42:08 AM »
Dear bmarkus

Thank you for this, I installed alsa.tcz and it installed fine.

I want to build a small software player to be used for playing music and radiostations from my Squeezebox server. Therefore I also installed "Squeezelite" a cli based audio player (for info see here :http://forums.slimdevices.com/showthread.php?97046-Announce-Squeezelite-a-small-headless-squeezeplay-emulator-for-linux-(alsa-only)
 
I started the player like this: ./squeezellite and it started fine. I could control it from within the squeezebox server (on another computer) and when I directed music (a flac file) to the Tinycore raspberry computer running alsa and the squeezelite player, I could hear music from the audiojack on the raspberry.

But the quality was very low. There is a lot of loud stuttering noise in front and behind this noise I could hear the music.

When looking at the log from the squeezelite player it stated that it could not find:

[12:14:50.735754] load_flac:175 dlerror: libFLAC.so.8: cannot open shared object file: No such file or directory
[12:14:50.736822] register_pcm:191 using pcm
[12:14:50.737577] load_mad:269 dlerror: libmad.so.0: cannot open shared object file: No such file or directory

So I was wondering if my problems is caused by missing flac codec on my raspeberry?

Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Sound in piCore
« Reply #5 on: January 06, 2013, 07:52:42 AM »

When looking at the log from the squeezelite player it stated that it could not find:

[12:14:50.735754] load_flac:175 dlerror: libFLAC.so.8: cannot open shared object file: No such file or directory
[12:14:50.736822] register_pcm:191 using pcm
[12:14:50.737577] load_mad:269 dlerror: libmad.so.0: cannot open shared object file: No such file or directory

So I was wondering if my problems is caused by missing flac codec on my raspeberry?

Steen

Steen

thanks for trying it. Please install flac.tcz and libmad.tcz from the repo to have missing libs.

Bela
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Sound in piCore
« Reply #6 on: January 06, 2013, 08:49:23 AM »
Thank you for the help - no difference after I installed the codec.

I have asked the developer of the player if he can see any other problems in the log file - so hopefully I will get there.

Have you been able to hear audio through the USB and the HDMI?

Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Sound in piCore
« Reply #7 on: January 06, 2013, 09:17:58 AM »
For testing, install moc.tcz and play your .mp3 and .flac files. If they are OK, it is an application issue. If still quality is pure, need further investigation.

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Sound in piCore
« Reply #8 on: January 06, 2013, 09:44:48 AM »
OK

Sound like a good idea.
I just installed MOC.tcz - it went well, However how do I start it??

I read at the MOC homepage in the Faq that the command mocp should start the player - but I get mcop: command not found?

Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Sound in piCore
« Reply #9 on: January 06, 2013, 10:35:32 AM »
OK

Sound like a good idea.
I just installed MOC.tcz - it went well, However how do I start it??

I read at the MOC homepage in the Faq that the command mocp should start the player - but I get mcop: command not found?

Steen

mocp -l <filname>

will start playing in the background.

mocp --help

will list available commands.

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Sound in piCore
« Reply #10 on: January 06, 2013, 10:38:49 AM »

Have you been able to hear audio through the USB and the HDMI?


I have no USB soundcard, so can't test.

It may happen that your TV set recognised Pi as DVI device instead of HDMI and turned off sound. Edit config.txt in /mnt/mmcblk0p1 and uncomment

#hdmi_drive=2

It will force HDMI mode. I had the same issue, doing so HDMI sound works.

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Sound in piCore
« Reply #11 on: January 06, 2013, 01:13:34 PM »
Dear bmarkus

I followed your advice and mcop is playing my flac files very good. There is no distortion at all.

So the Alsa sound you have made for tinycore raspberry is working fine.

I noticed however that it complained about:
Can't load plugin libmp3_decoder: file not found.
So I can't play mp3 files but the flac files played fine anyway.

 

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Sound in piCore
« Reply #12 on: January 06, 2013, 01:27:06 PM »
SUCESS::::::::::

Dear Markus verything is working now. It was simply a matter of increasing the ALSA buffer_time (ms) and period_count, from the default 20:4 to 500:4.
I might reduce it step by step.

But Squeezelite can now be used on Microcore on a Raspberry - thanks to your work.

(NB it plays both MP3 and Flac.

Once again thank you very much.

Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Sound in piCore
« Reply #13 on: January 06, 2013, 03:40:00 PM »
Good to hear it works :)
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Sound in piCore
« Reply #14 on: January 20, 2013, 06:15:56 AM »
Hi bmarcus.

The sound is working fine both via the analog 3.5" jack and also via a USB DAC - so that is good.

However if I try to start the alsa mixer we get this error:

tc@box:~$ alsamixer
alsamixer: error while loading shared libraries: libform.so.5: cannot open shared object file: No such file or directory

Is this because it is not included at this stage, or is there a problem somewhere?

Steen