Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: bmarkus 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.
-
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.
-
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.
-
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.
-
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
-
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
-
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
-
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.
-
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
-
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.
-
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.
-
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.
-
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
-
Good to hear it works :)
-
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
-
This means you need an ncurses extension, no?
-
This means you need an ncurses extension, no?
Right, ncurses is a soft dependency. Load ncurses.tcz
-
Thank you both.
I'm really impressed and grateful for your knowledge and continued help you provide.
Installing ncurses solved the problem.
Steen
-
Hello
this is absoluely great...working analogue and hdmi sound on the Pi
thanks a lot
Vince
-
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.
.... Try moc.tcz which is tested with .mp3 and .flac .....
Jinxed times really, but then again ...
tce-load -wi alsa.tcz
tce-load -wi moc.tcz
alsamixer unmute
F6 -> Soundcard ( I tried both, default and 0 bcm2835 ALSA )
mocp
I can see that a *.flac file is being played but no sound can be heard from the analog 3.5" jack ( moc's pcm=00% )
These are the messages I'm getting:
Can't load plugin libmp3_decoder: file not found
Running the server...
Trying ALSA...
I've read that the libmp3_decoder error can be fixed by adjusting the ALSA buffer_time. Can someone shed some light on this (?)
As far as I know, moc has got a config file which can be imported this way:
cd ~/.moc && cp /usr/share/doc/moc/examples/config.example.gz ./ && gunzip config.example.gz && mv config.example config
Is there any similar way to do it on piCore ?
-
tce-load -iw libid3tag
-
tce-load -iw libid3tag
Right, *.mp3 files are now recognized and played. Still no sound from the analog 3.5" jack ( moc's pcm=00% ) though.
-
Just repeated your steps, FLAC and MP3 playback works fine, I can listen music with earphone plugeend into the 3.5mm jack. Still some issue with WAV, will check.
-
Of course not. Your command is invalid. Use -R OR --sound-driver
-
Of course not. Your command is invalid. Use -R OR --sound-driver
My bad, you're right. The command runs well, still no sound though.
-
I would suggest to check your settings. Maybe you have the HDMI sound output configured. Just a thought.
-
I would suggest to check your settings. Maybe you have the HDMI sound output configured. Just a thought.
I already checked that. Neither HDMI nor 3.5mm jack sound. The thing that puzzles me most is that pcm=00% in moc.
What about the config file for moc, isn't there one ? I've used moc on various Linux distros and I have always had a config file.
I don't know if this might be of interest but ...
tc@box:~$ 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
tc@box:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device
sysdefault:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device
tc@box:~$
-
I have it alway 00% but playback is fine, alsamixer does its job.
-
Is it only an mocp issue? Do you get sound from other programs? Try aplay to isolate the issue.
-
Hi did you remember to use:
sudo modprobe snd_bcm2835
-
Hi did you remember to use:
sudo modprobe snd_bcm2835
It is done by the ALSA kernel modules extension automatically, no need to do maually.
-
Is it only an mocp issue? Do you get sound from other programs? Try aplay to isolate the issue.
Yes, aplay works flawlessly. Well, guess what, I really don't know what happened but the 3.5mm jack sound works now! Go figure ....
Thank you so much bmarkus for your assistance and patience.
Now for the config file part:
I'm using an old one from a Debian installation ( the following command doesn't work on piCore )
cd ~/.moc && cp /usr/share/doc/moc/examples/config.example.gz ./ && gunzip config.example.gz && mv config.example config
Here is an example
http://dotfiles.org/~chillu/.moc/config
I changed
SoundDriver = JACK:ALSA:OSS
to
SoundDriver = ALSA
Otherwise moc would complain about the sound driver being invalid.
One can also have a custom keymap, just like the following one
https://github.com/ecthiender/mocp-git/blob/master/keymap.example
Unfortunately, I had to comment a lot of entries in that file in order to make it usable on piCore.
-
I hate to say it but the sound survived a couple of reboots and I had to cobble something up again.
The following has been working so far without any trouble.
1. Create a file called .asoundrc in /home/tc
2. Enter the following
pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}
3. Save and exit.