Linux Audio the way to go!?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Nothing more to add?

This disussion is off-topic.

You covered quite some points of course.

1. You could run the whole box with just 1.2V and 3.3V batteries and no
regulators. You wouldn't need the 9 V at all. This will also knock out the
5V regulator for the Wolfson.
Seperate the 3.3V for the clock.
2. Cut off the traces after the I2S damping resistors
3. Make sure you don't have the ethernet cable shield connected.
4. Dampen the plastic box
5. Disable the 48khz clock
6. Make sure that most of the processing is done on the PC (flac-decoding, sample rate conversion)

So far so good. As you've seen at AA, John Svensson is heavily reclocking
the I2S. I don't think this is necessary on the SBR.

I am using a Squeezebox Receiver ( Duet without control). Via UDAP you need to do the basic configurations, such as network settings and server setup. This saves me almost 200€ for the control. With the iPod/iPhone remote iPeng I control it. There are also other remote apps for Android phones available - IMO no need for the Logitech control.

Cheers
 
Hi,
I have had the wiki bookmarked for years and now it has disappeared! anyone know how to access it please. I am setting up a new PC with studio 9.10 and want to go through the set up of Alsa fo USB and sampling etc. I also can't remember where to mount the music to play. I think it was on a Ramdisk.
Cheers,
rob


I havn't managed yet to migrate it to the new platform. The oldwiki page is AFAIK also disabled.

For 9.10 a lot has changed. Though I think I'll skip 9.10. I'll get the Wiki fixed for Lucid Lynx latest.

Sorry for that. You can still try my upgrade script though. This way you'll get at least the latest and "potentially" best Alsa installed.

Cheers
 
Hello Soundcheck,

Which linux distro do you recommend for playback. You seemed to have moved from ubuntu studio to mine linux. Anything new and better?

I am still running Linux Mint 8 (Helena) based on Ubuntu Karmic with a 2.6.32 kernel and Alsa 1.0.22.1.

As a matter of fact as long as you stay with Ubuntu it pretty much doesn't matter what u use. With Ubuntu Studio of course you'll have all the audio apps already on board.

However, I prefer to install the main distro and install the packages I need later on.
The main branches seem to be slightly better maintained then the flavors. For sure they
are better tested.

Kernel, Alsa and all the critical sound applications are always on board with the latest revision (build form sources) The newest kernels I pull out of certain Ubuntu repos.

I still recommend Linux Mint ( current release = Helena = 8 ) as a base system.
 
Hi folks.

Anybody interested in a little exercise? ;)

We discussed earlier the cesnet classic radio station with sends its good music out as flacs. They are sending out ogg container with flac inside at 48/16.

I am currently trying to get the best possible command assembled to run that stream. I collected some stuff and added my 2 cents on top and came up with below. (Below result was already quite a challenge to get it working - at least to me.) ;)

Code:
#!/bin/bash
mplayer -really-quiet -vc null -vo null -bandwidth 10000000 -cache 128 -af volume=0,channels=2 -ao pcm:nowaveheader:file=/dev/stdout 'http://radio.cesnet.cz:8000/cro-d-dur.flac' 2>/dev/null | flac -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=48000 --compression-level-0 - | sox -q -tflac -r48000 -esigned -b16 -c2 - -t wavpcm - 2>/dev/null  | aplay -q -Dplughw:0,0 -fdat -

Above script/command anybody should be able to run from command line or as a script. (Enjoy) (mplayer,sox,flac needs to be installed)

Question: Has anybody ( phofman?) any ideas how to make above a bit more efficient? :D Above pipe causes also little underruns once in a while, which I havn't resolved for now.
I also want to use the command for the squeezeboxserver later on. Oggflac is unfortunately not supported.

Cheers
 
Doesn't MPD support ogg/flac? Wouldn't that be easier than the overhead of Mplayer? And do you need sox? Is the stream in an odd sample rate?

Question is what's more overhead MPD of mplayer? :D ( no idea if MPD supports oggflacs at all)

Sox puts a wavpcm header to the stream. This way aplay can read it. Running a decoded flac by the flac command into aplay won't work.

You could also have Sox instead of aplay running the output to Alsa. Or you use ecasound instead of Sox.

The command flac seems to be able to read oggflac streams by using the --ogg parameter.
So, perhaps there is an easier way to stream the cesnet flac url then using mplayer? Mplayer is mainly used for the streaming and to get the flac data out of that ogg container.
I think Sox is not able to decode oggflacs. In case it would be able we could skip the flac command and the mplayer ogg decoding. - I'll check it out.

What we need as functions is a streamparser, an oggflac decoder and a flac decoder and an alsa output. Optional an SRC if 48/16 needs to be changed.



Cheers
 
Mplayer can play the stream directly to alsa.

mplayer http://radio.cesnet.cz:8000/cro-d-dur.flac -ao alsa

Why not go for the most obvious! ;)

The problem though seems to be that if you run the output through a pipe mplayer won't decode the flac stream properly. This would be needed in case of Squeezebox.

Below the complete command with alsa device settings: ;)

mplayer -vc null -vo null -bandwidth 10000000 -cache 32 -af volume=0,channels=2 -ao alsa:noblock:device=plughw=0.0 http://radio.cesnet.cz:8000/cro-d-dur.flac

(My RME hdsp won't like it. The EMU 0404USB works with above. No idea what's going on there. )
 
I do not intend to bore you to death. :D

Here is another solution to get the flac stream out in best quality - mplayer and ecasound

Code:
mplayer -really-quiet -vc null -vo null -bandwidth 10000000 -cache 32 -af volume=0,channels=2 -ao pcm:nowaveheader:file=/dev/stdout 'http://radio.cesnet.cz:8000/cro-d-dur.flac' 2>/dev/null | ecasound -q -b:32 -f:s16_le,2,48000,i -i:stdin -o:alsaplugin,0,0 -f:s16_le,2,48000

Perhaps the best sounding radio streamsetup around!! (Highly recommended with a proper rt-kernel setup)

So far I found out that
a. Sox is not supporting oggflac and
b. that there is probably a bug in Sox that prevents from streaming mplayer flac output right into Sox and
c. that there is confusion about oggflac suffixes. It seems that there is no official suffix - it is either .ogg or .flac which causes some confusion and bugs and
d. sox/play should be able to play standard streams on its own (standalone) - except oggflac. Though I didn't manage to get it going yet.

Opening up a can of worms again. ;)

(I am discussing all this over at Sox - I'll keep you posted)

Cheers
 
Member
Joined 2004
Paid Member
MPD is supposed to support oggflac now, as of last Nov.:
November 18th, 2009 - mpd-0.15.6 released
MPD version 0.15.6 has been released. This release fixes OggFLAC, some annoyances and a few critical bugs.

I have not explored yet. I may give it a try. I haven't tried to play an internet stream with MPD yet but its worth learning how.

Are you trying to route the stream to the Squeezebox?
 
I have not explored yet. I may give it a try. I haven't tried to play an internet stream with MPD yet but its worth learning how.

Just put a URL into a playlist (any-name.m3u) file in the playlist folder and rescan the db. Select the new playlist and play it. Enjoy. ;)

Are you trying to route the stream to the Squeezebox?


Just figured it out:

SQUEEZEBOXSETUP for OGGFLAC

------------------------------------------------------------------------------------------


You need to edit /etc/convert.conf and add:

Code:
ogg pcm * *
  # R
 [mplayer] -really-quiet -vc null -vo null -bandwidth 10000000 -cache 128 -af volume=0,channels=2 -ao pcm:nowaveheader:file=/dev/stdout $FILE$

I guess people following that little adventure recognize the mplayer string. I am routing a native 48/16 PCM stream to the SBR.

Now you:


1. Stop and restart the server

Code:
sudo /etc/init.d/squeezeboxserver stop
sudo /etc/init.d/squeezeboxserver start

2. Lookup SB Server Settings / File Types

Now you see a new field called Ogg Vorbis / PCM / mplayer

This is the new rule.

3. Disable all other OGG rules and activate the new OGG/PCM rule

Now all .ogg internet streams are routed through that rule.
Even though the cesnet stream is configured with a .flac suffix it is recognized as .ogg by the server

4. Save the settings

5. Add a new entry to Home/Favorites , choose a name and apply the URL http://radio.cesnet.cz:8000/cro-d-dur.flac

6. Now the database need to be rescanned under Basic Settings /Rescan Music Library

7. Now you should see a new entry under "favorites"

8. Select and play it. Have fun. ;)


BTW: Question to the people running that stream!!!

I am not 100% happy with the stream. Once in a while it seems to break and I have to restart it. This happened during the dry-run on the PC as well as it happens as part of
the Squeezebox setup. Perhaps I need to play with the cache. Any ideas, anybody?? I mean - above cache equals 128kb.


Cheers
 
Last edited:
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.