#343820 - 27/03/2011 13:46
Squeezeslave running on Empeg
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
I'm planning a music system for my RV camper. I already have a Dockstar running Squeezebox Server; that part is great, it only takes 6 watts to run! Squeezeslave can run as a client on the Dockstar but there is no way to control it.
I need something to control the music with, and I have a MK2a that would be perfect for this. It seems like porting Squeezeslave to the Empeg would be a perfect setup. Has anyone attempted this?
|
Top
|
|
|
|
#343832 - 28/03/2011 13:36
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
I thought about it at one time but don't really have a use case for it anymore (the only empeg I use now is in my car.) At that time, it seemed pretty doable, but looking at it now, it seems they've added a bunch of dependencies that might be hard / impossible to build for the empeg. If I were doing it, I'd start with an older squeezeslave release to minimize these dependencies, though you may run into incompatibilities with newer squeezecenter releases, so it's a tough call. You'd have to hack up the audio output code quite a bit to get it going, see here.
|
Top
|
|
|
|
#343833 - 28/03/2011 14:20
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
It might be worth looking at SlimRio. I found it struggled on the Rio Receiver, but it would probably work better on the empeg with more memory and a faster CPU. I have no idea how much work would be involved to get it running on it though. http://empeg.org.uk/slimrio/
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#343918 - 31/03/2011 19:08
Re: Squeezeslave running on Empeg
[Re: andy]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
Thanks for the comments guys! Hmm SlimRio, yes I have used that a few years back. My main niggle was the screen layout was wrong (wrapped lines). It actually looks like the Squeezebox Boom has a very similar screen resolution to the Empeg. Is the hardware similar between the Empeg and RioReceiver? Makes sense they would be similar. I'm having a hard time finding specs, need to dig around archive.org a bit..
|
Top
|
|
|
|
#345136 - 15/05/2011 15:46
Re: Squeezeslave running on Empeg
[Re: presslab]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
I'm about to get started on the development of this and I have a couple questions. Are there any web links for help with Empeg development? I've found this cross compiler: http://www.empeg.mars.org/devel/software/toolchain.phpIs the hard disk needed or could I store my program in on-board flash? My drive needed a sharp whack to get it going again, I'm not sure how long it's good for. I suspect that I will need some kind of storage device though, and in that case I will use a compactflash or something similar. Thanks for any help guys, and I'll post progress reports as I go along.
|
Top
|
|
|
|
#345138 - 15/05/2011 19:09
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
The onboard flash is a very limited resource, so much so that, as Mark Lord has been adding features to his Hijack kernel, he's been carefully budgeting which bits of Flash are used for storing settings. So yeah, you need an HDD on the 'peg for your dev work. Unless you intend to completely replace the kernel on the 'peg with your own kernel, in which case, yes, you need to use the flash for the kernel. The basic division of labor is: Flash=Kernel, some flash-based kernel settings. HDD=Swap, temp storage, and usermode apps. I'm sure there are exceptions to all of the above but that's about it. For other dev resources, there's a few bits here.
|
Top
|
|
|
|
#345139 - 15/05/2011 21:26
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 19/01/2002
Posts: 3584
Loc: Columbus, OH
|
Also, rather than a hard drive, you could go with a fast CF card and a CF to IDE adapter very inexpensively. To implement squeezeslave, you could use a very small CF card. That way, you'd still be using solid state memory and it'd be faster and less likely to fail than a hard drive.
_________________________
~ John
|
Top
|
|
|
|
#345183 - 17/05/2011 03:25
Re: Squeezeslave running on Empeg
[Re: JBjorgen]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
Thanks for the info Tony and John. Looks like a CF adapter is easy enough.
I know I've seen this here before, but the post is eluding my search. I'd like to make the Ethernet plug a blind mate so I can use the dock without manually unplugging it. I swear I saw some pics of this long ago. Any pointers?
|
Top
|
|
|
|
#345185 - 17/05/2011 06:19
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
There have been a few home docking solutions, some more advanced than others. You can mod a car sled. I've done some, and there shots of others in the FAQ here: http://riocar.org/modules.php?op=modload...mp;faqent=64#64The best would have been if you could have gotten one of Mark Lord's custom docks, which are awesome (I also have one of those, it's the best of all worlds).
|
Top
|
|
|
|
#345198 - 17/05/2011 14:33
Re: Squeezeslave running on Empeg
[Re: tfabris]
|
carpal tunnel
Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
|
There have been a few home docking solutions, some more advanced than others. You can mod a car sled. I've done some, and there shots of others in the FAQ here: http://riocar.org/modules.php?op=modload...mp;faqent=64#64The best would have been if you could have gotten one of Mark Lord's custom docks, which are awesome (I also have one of those, it's the best of all worlds). Indeed, they are awesome. They only rarely come up for sale on the board, so if you see one, grab it before it's gone.
|
Top
|
|
|
|
#345219 - 18/05/2011 00:04
Re: Squeezeslave running on Empeg
[Re: tfabris]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
Thanks again Tony, the hot glue worked great!
Attachments
Description: Dock blind mate Ethernet
|
Top
|
|
|
|
#345223 - 18/05/2011 02:58
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
If that's in the *car* be careful, because the interior of some parked cars gets hot enough to melt hot-melt glue. I know from experience. If it's just indoors, though no worries.
|
Top
|
|
|
|
#345224 - 18/05/2011 03:49
Re: Squeezeslave running on Empeg
[Re: tfabris]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
If that's in the *car* be careful, because the interior of some parked cars gets hot enough to melt hot-melt glue. I know from experience. If it's just indoors, though no worries. Yes, that's in the camper. I looked at the hot glue sticks and apparently they are of the high temperature 380 F type. I'll take my chances, thanks for the heads up though. At least hot glue isn't as bad to remove as other glues. I am able to get the Ethernet to work on my gigabit hub but when I plug direct into the server the link light is lit but no data is received. It is an Auto-MDI/X (gigabit) port so I should not need a crossover cable, but I'll try that next. I know the Empeg is a bit finicky with it's 10baseT port.
|
Top
|
|
|
|
#345250 - 19/05/2011 14:14
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
I am able to get the Ethernet to work on my gigabit hub but when I plug direct into the server the link light is lit but no data is received. It is an Auto-MDI/X (gigabit) port so I should not need a crossover cable, but I'll try that next. I know the Empeg is a bit finicky with it's 10baseT port. That's exactly right: Its 10baseT port is finicky. There are documented accounts where doesn't get along with some 10/100 switches, and probably plenty of anecdotal evidence that the same might happen with gigabit switches. You sometimes need to put a cheap-ass hub in between the 'peg and the faster switch to get it to work.
|
Top
|
|
|
|
#345268 - 20/05/2011 05:50
Re: Squeezeslave running on Empeg
[Re: tfabris]
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
and probably plenty of anecdotal evidence that the same might happen with gigabit switches. You sometimes need to put a cheap-ass hub in between the 'peg and the faster switch to get it to work. My mk2 and mk2a definitely work with Netgear GS108 GigE switches.
_________________________
-- roger
|
Top
|
|
|
|
#345271 - 20/05/2011 12:03
Re: Squeezeslave running on Empeg
[Re: Roger]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
Well, it was through no fault of the empeg that the Ethernet wasn't working. My Iomega iConnect that is my music server needed some patches applied to the kernel in order for the Ethernet to work at any speed other than 1000baseT.
Using a straight-through cable now works thanks to the Auto-MDI/X on the server and it connects at 10baseT half duplex.
Is there any way for the empeg to play a network stream like http://server:9000/stream.mp3?
|
Top
|
|
|
|
#345286 - 20/05/2011 19:24
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Is there any way for the empeg to play a network stream like http://server:9000/stream.mp3? Mark Lord's hijack kernel has that built in. Depending on the format of the URL, it will either download an MP3 file, stream the file, or download an M3U playlist for streaming. There's even a rudimentary Web UI already built into hijack that allows you to browse the playlists. To get started: http://www.riocar.org/modules.php?op=mod...;faqent=202#202
|
Top
|
|
|
|
#345287 - 20/05/2011 19:48
Re: Squeezeslave running on Empeg
[Re: tfabris]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
I think he means stream a file from the LAN (e.g. a Squeezebox server) not for it to stream files to the LAN. I don't know of anyone who's gotten the former to work.
|
Top
|
|
|
|
#345294 - 20/05/2011 23:32
Re: Squeezeslave running on Empeg
[Re: tonyc]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Isn't that what the Rio Receiver Edition firmware does?
|
Top
|
|
|
|
#345377 - 26/05/2011 14:03
Re: Squeezeslave running on Empeg
[Re: mlord]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
Yes I want to stream a file *from* the LAN. It would be an interim thing until I get the native player coded up.
I saw the Rio Receiver Edition but I didn't want to hassle with getting the SSDP, TFTP, etc. stuff all set up. Maybe the empeg doesn't need that though, I've only had experience with the actual Rio/Dell Receiver.
I now have the CF card and adapter, I just need to set up the new drive.
|
Top
|
|
|
|
#345512 - 03/06/2011 13:23
Re: Squeezeslave running on Empeg
[Re: presslab]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
|
Top
|
|
|
|
#345577 - 07/06/2011 13:44
Re: Squeezeslave running on Empeg
[Re: presslab]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
After beating up Squeezeslave for a bit I have it running on the empeg. Some of the code was not written to work with the 2.95 compiler but that was easy to manage. There were a bunch of other little things, mostly because the toolchain/kernel is outdated.
I do not have sound yet, I'm trying to figure that out. The newer empeg kernels removed the OSS ioctls, so I had to do a hack job on PortAudio to rip that out. I don't see any errors in the kernel log about the 4608 /dev/audio size problem, I attempted to make PortAudio write in that block size.
Out of curiousity, has anyone got a more modern kernel working on the empeg?
|
Top
|
|
|
|
#345580 - 07/06/2011 14:18
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
I suppose you could just reconfigure/rebuild the existing kernel to include OSS if that's needed.
|
Top
|
|
|
|
#345581 - 07/06/2011 14:19
Re: Squeezeslave running on Empeg
[Re: presslab]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
This is how I set up /dev/mixer: static PaError mixer_init()
{
int source, soft_audio_mute, mute, volume, fd = 0;
PaError result = paNoError;
PA_DEBUG(( "mixer_init executed.\n" ));
ENSURE_((fd = open(DEVICE_MIXER_BASE, O_WRONLY)), paInternalError);
source = SOUND_MASK_PCM;
ENSURE_(ioctl(fd, EMPEG_MIXER_WRITE_SOURCE, &source), paInternalError);
soft_audio_mute = 0;
ENSURE_(ioctl(fd, EMPEG_MIXER_SET_SAM, &soft_audio_mute), paInternalError);
mute = 0;
ENSURE_(ioctl(fd, EMPEG_MIXER_WRITE_FLAGS, &mute), paInternalError);
volume = 100 | (100 << 8);
ENSURE_(ioctl(fd, MIXER_WRITE( SOUND_MIXER_VOLUME ), &volume), paInternalError);
error:
if (fd) close(fd);
return result;
}
|
Top
|
|
|
|
#345594 - 07/06/2011 16:52
Re: Squeezeslave running on Empeg
[Re: mlord]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
I suppose you could just reconfigure/rebuild the existing kernel to include OSS if that's needed. That's a good idea, I'll give it a shot!
|
Top
|
|
|
|
#345602 - 07/06/2011 21:07
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Easiest way to get a kernel built is probably to grab the Hijack Kernel source tree, plus the tools from the link on the Hijack pages.
cheers
|
Top
|
|
|
|
#345612 - 08/06/2011 03:18
Re: Squeezeslave running on Empeg
[Re: mlord]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
After a bit of digging it looks like OSS support is a no-go. The Mk2 has a CS4231A codec. It seems the empeg CS4231A driver is implemented as a simple character device, so it has no OSS support. I guess the driver for the Mk1 had OSS support.
In any case I don't think I can get it to work that way, unless you have another idea. I guess I'll have to focus on PortAudio.
|
Top
|
|
|
|
#345644 - 10/06/2011 10:37
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
If you're trying to output via the CS4231A then it won't work. It is purely there to handle the mic input and sample the aux/tuner for visualisations. All output is via the Phillips DSP.
|
Top
|
|
|
|
#345647 - 10/06/2011 12:09
Re: Squeezeslave running on Empeg
[Re: tman]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
Which driver provides /dev/audio? That's what I'm using.
Looking at the datasheet for the SAA7705H, it doesn't look like it has any parallel bus interface to the CPU. It actually looks like the SA1100 is actually providing the audio stream... I will investigate further.
|
Top
|
|
|
|
#345657 - 11/06/2011 02:54
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 19/05/1999
Posts: 3457
Loc: Palo Alto, CA
|
Yeah, the SA1100 has no I2S on it, so the I2S is actually generated by an SPI port, with some external logic to make the word select. If it glitches at all, word select resyncs so the first worked after a falling CS is left (or right... whichever, it's always the same one). That, and the display interfacing to CLCD using every 4th pixel and a PIC was thought of on the train to and from London The HW is locked at 44,100 too. This may impede you finding any audio drivers for it, simply because the SA1100 didn't really have I2S audio in the first place (I think it had PCM?) If you just rebuffer your audio output it into 4608 byte chunks you should be just fine, however. The "DSP" does no decode at all. It's a car audio DSP designed to be used with a CD and/or tape mechanism. It does EQ and FM stereo processing, balance, loudness boost, dynamic range compression type of thing. It is fed the vanilla I2S by the SA1100.
Edited by altman (11/06/2011 02:55)
|
Top
|
|
|
|
#345664 - 11/06/2011 23:07
Re: Squeezeslave running on Empeg
[Re: altman]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
Thanks! It's working now. I've only tested with moderate bitrate MP3s but it sounds fine.
Next I need to get the blue wire (amp remote) turned on and use the mixer to set the volume. I assume the blue wire is some GPIO pin but I need to figure out how to get to it from user space. I've seen some code for the volume control; that looks easy enough.
|
Top
|
|
|
|
#345665 - 12/06/2011 02:16
Re: Squeezeslave running on Empeg
[Re: presslab]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
Is it possible the display on/off also controls the blue wire? I see some stuff in the FAQ that seems to indicate there is some connection there.
For right now I have the display off because I don't yet have the code for it and I don't want it to burn in. Maybe I will try blanking the screen but leaving the display on.
edit: Ah-ha, yes that's it. The display power is 'tied' to the blue wire. Now if I could figure out the volume. It looks like /dev/mixer supports the standard ioctl MIXER_WRITE(SOUND_MIXER_VOLUME) so I'm not sure why it's not working.
Edited by presslab (12/06/2011 03:58)
|
Top
|
|
|
|
#345769 - 16/06/2011 14:25
Re: Squeezeslave running on Empeg
[Re: presslab]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
I've got the mixer working, Squeezeslave was trying to set the PCM volume instead of the master volume.
Playing a ~192kbit VBR MP3 consumes 20-40% of the CPU. I'm not sure if this is normal or not, but at least it seems like things are not on the verge of disaster. There is a stutter when changing tracks which I can get rid of with a bit of a delay; I'd like to come up with a better solution. I've tested Ogg Vorbis and FLAC and those are working too.
Now I'm working on the button input and I think I've got that figured out using /dev/ir. Also I need to get the player to shut down when the accessory power goes away, and /dev/empeg_power seems to be the trick to that one.
|
Top
|
|
|
|
#345852 - 20/06/2011 14:40
Re: Squeezeslave running on Empeg
[Re: presslab]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
The front panel buttons/knob are working pretty good now. It seems like the knob has a bit too aggressive debounce on it, as spinning fast seems to drop out. It's understandable though with the mechanical rotary encoder, it's just that the squeezeboxserver has some velocity sensitive stuff that's pretty nice but if I try to get it to kick in the knob is holding me back.
Next up is the DSP equalizer. I've figured out how to read/write it, but I can't find information on how to calculate the constants. I've searched both the 7705 datasheet and user guide but it doesn't seem to have these. I can kind of figure out how to stuff the freq, Q, and gain into word1 and word2 but I don't know how to calculate the actual constants.
|
Top
|
|
|
|
#345867 - 20/06/2011 18:47
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
but I can't find information on how to calculate the constants. I've searched both the 7705 datasheet and user guide but it doesn't seem to have these. I can kind of figure out how to stuff the freq, Q, and gain into word1 and word2 but I don't know how to calculate the actual constants. Yeah. IIRC, the 7705 came with a piece of software so that you could calculate preset EQs, and then your software would just push the constants into the chip. I think we reverse-engineered the algorithm (or found a private data sheet) so that we could implement the configurable EQ in the empeg.
|
Top
|
|
|
|
#345999 - 27/06/2011 03:12
Re: Squeezeslave running on Empeg
[Re: Roger]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
For now I'm just saving the EQ data after running 'player' to a file and reloading it on startup. Not exactly user friendly but it works.
It's pretty far along now!
Attachments
|
Top
|
|
|
|
#346005 - 27/06/2011 08:52
Re: Squeezeslave running on Empeg
[Re: presslab]
|
pooh-bah
Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
|
This looks great! Are you thinking of making it available once you've got it fully working ???
Cheers
Cris
|
Top
|
|
|
|
#346009 - 27/06/2011 13:17
Re: Squeezeslave running on Empeg
[Re: Cris]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
Yes! I'm not sure if it will be part of Squeezeslave or a branch. I hacked apart portaudio pretty good too, I dunno how to make that "production" quality but at the least someone with a toolchain will be able to download the source/patch and make it themselves.
What the heck, in case I die tomorrow I've attached a diff from Squeezeslave r261.
Attachments
062711-empeg-r261-squeezeslave.diff (490 downloads)Description: Squeezeslave for empeg diff
|
Top
|
|
|
|
#346014 - 27/06/2011 14:46
Re: Squeezeslave running on Empeg
[Re: presslab]
|
pooh-bah
Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
|
Awesome !!! I'm a total tool at stuff like this, can someone clever explain how I can get this working on my empeg please Cheers Cris
|
Top
|
|
|
|
#346020 - 27/06/2011 16:19
Re: Squeezeslave running on Empeg
[Re: Cris]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
You'll need a crosscompiling toolchain and the development version of the os; it's not really trivial. When I get it to a stable place I'll try to make a *.upgrade file, might be a while though.
|
Top
|
|
|
|
#346655 - 01/08/2011 06:48
Re: Squeezeslave running on Empeg
[Re: presslab]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
The Windows version can be patched, just like the Linux one. The difference is that you need to download the Perl source separately and change the startup options so that it runs from the source rather than from the pre-compiled Perl that it ships with.
Looking at the patch, it should work fine on the Windows version of SBS.
Edited by andy (01/08/2011 06:50)
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#346663 - 01/08/2011 12:23
Re: Squeezeslave running on Empeg
[Re: andy]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
That's good to hear Andy. I've never actually used the Windows version, I just took a quick look to see if the patch would work and I didn't see the source anywhere.
I would guess that after the server loads into RAM the performance should be the same regardless of whether it was precompiled or not.
|
Top
|
|
|
|
#360990 - 13/02/2014 21:32
Re: Squeezeslave running on Empeg
[Re: presslab]
|
journeyman
Registered: 29/07/2008
Posts: 73
Loc: North Bay, CA
|
|
Top
|
|
|
|
|
|