PDA

View Full Version : Squeezeslave on Jive



bpa
2007-09-18, 16:19
Out of curiosity I've built a version of squeezeslave for Jive because I reckoned there was enough CPU.
http://homepage.eircom.net/~altondsl/slim/squeezeslave.ZIP

This was minimum effort test and I haven't done any optimisation and so only MP3 streams should be tried as the Flac and OGG libraries may use floating point.

It just about works especially if bit-stream limiting is on (say 128kbps) although as expected Jive can hang up and sometime get itself locked out. I've used Jive to control the audio being played out of the Jive speaker.

To install use scp to copy squeezeslave file to /usr/bin and then login using ssh and check execute permissions.

Turn off all sound effects under Remote Settings - so that squeezeslave can use the speaker (otherwise it won't run).

Run squeezeslave with IP address of the host Slimserver. When changing songs stop and clear the playlist as there seems to be some sort of bug in squeezeslave.

A slimmer optimised version adds some interesting possibilities - Jive as an alarm clock, Jive could be used to do audio preview when building playlist. It's unlikely to be used a proper player due to battery usage.

edit:
Squeezeslave has been rebuilt using latest source for new Jive kernel. However recent Jive changes means that disabling sound effects no longer releases /dev/dsp and so at present you cannot have squeezeslave working while Jive is running.

rtitmuss
2007-09-18, 16:34
Out of curiosity I've built a version of squeezeslave for Jive because I reckoned there was enough CPU.
http://homepage.eircom.net/~altondsl/slim/squeezeslave.ZIP

Funnily enough so have I, along with ARM optimizations ;).

We are planning on adding audio support for both the Jive desktop application (to replace Softsqueeze) and the Jive remote (because we can). But this won't be for a while yet.

One option was to use the squeezeslave code as a basis for this work, but after a review of the code it's not really the best starting point. Instead the plan is to port the audio playback from the Squeezebox firmware to the Jive platform. Watch this space!!

bpa
2007-09-18, 16:57
People keep thinking of Jive as a device which could be a fancy universal remote control - I think it is important to show that it can be a platform in its own right and not just as an adjunct to an SB or Transporter.

I think it's a good idea if the Jive desktop replaces Softsqueeze but it will need a screen version of the Jive controls as well as audio. I tested Jive desktop on an N800 but controls are the missing piece.

kdf
2007-09-18, 17:14
I think it's a good idea if the Jive desktop replaces Softsqueeze but it will need a screen version of the Jive controls as well as audio. I tested Jive desktop on an N800 but controls are the missing piece.

There are a number of keyboard mappings. Does the N800 not have any of that kind of functionality?

Also, N800 runs linux correct? A full port of jive to N800 would go over well for those that have them.

-kdf

snarlydwarf
2007-09-18, 17:21
We are planning on adding audio support for both the Jive desktop application (to replace Softsqueeze) and the Jive remote (because we can). But this won't be for a while yet.

One option was to use the squeezeslave code as a basis for this work, but after a review of the code it's not really the best starting point. Instead the plan is to port the audio playback from the Squeezebox firmware to the Jive platform. Watch this space!!

Oh nifty.

Can you fix Softsqueeze to work with 7.0? I need it to play music at work, and would like to stop trying to keep both 6.5 and 7 running... if SoftSqueeze worked, I could do that. :)

peterw
2007-09-18, 17:44
We are planning on adding audio support for both the Jive desktop application (to replace Softsqueeze) and the Jive remote (because we can). But this won't be for a while yet.

Richard,

I hope the Jive desktop app will emulate regular Squeezeboxes and "old school" IR remotes. Softsqueeze has been incredibly valuable for developing plugins because it can emulate my target hardware.

Thanks.

)p(
2007-09-19, 05:03
Also, N800 runs linux correct? A full port of jive to N800 would go over well for those that have them.

-kdf

That would be great. I think the larger resolution of the screen of the n800 will work better for me then the screen of the wip jive device. The names for a lot of the works in my classical library are often rather long. I don't think they will display very well on the wip device. That's from what I gather from the screenshots that is ;)

Thinking about that. I guess to work good with the n800 jive would have to be updated witch touchscreen support.

peter

ezkcdude
2007-09-19, 06:45
That would be great. I think the larger resolution of the screen of the n800 will work better for me then the screen of the wip jive device. The names for a lot of the works in my classical library are often rather long. I don't think they will display very well on the wip device. That's from what I gather from the screenshots that is ;)

Thinking about that. I guess to work good with the n800 jive would have to be updated witch touchscreen support.

peter

The names scroll, at least, when you have one selected. That may help. Definitely a bigger screen would be nice, but I suppose they have to determine what the target audience is and who the competitors are. Are they going up against the Nokia N800? That would be pretty tough, because the Nokia does a heck of a lot. Of course, it is over $300 last I checked.

dean
2007-09-19, 08:43
On Sep 18, 2007, at 5:44 PM, peterw wrote:
> I hope the Jive desktop app will emulate regular Squeezeboxes and "old
> school" IR remotes. Softsqueeze has been incredibly valuable for
> developing plugins because it can emulate my target hardware.

Alas, no, the Jive desktop application will use the Jive UI as it
evolves.

SoftSqueeze probably won't get much active development, but I do hope
that we can get a patch to revive it to work with 7.0 before it ships.

snarlydwarf
2007-09-19, 08:52
Well I hope SoftSqueeze sorta keeps up with Slim as the protocols change... I don't think I'm alone in believing it makes a good demo of how a SB works and how the UI feels.

Imagining the thing just isnt the same and while not perfect SoftSqueeze is pretty close, at least close enough to see how the UI works.

kdf
2007-09-19, 08:59
On 19-Sep-07, at 8:43 AM, dean blackketter wrote:

>
> SoftSqueeze probably won't get much active development, but I do hope
> that we can get a patch to revive it to work with 7.0 before it ships.

Hrm, I guess I may not be using the svn updates for softsqueeze, but
I do have a working version on my windows machine that I use every
day with SS7. I mapped the jar file to a softkey a long time ago, so
I'm not sure which version it is. I'll have a look.
-kdf

bklaas
2007-09-19, 09:02
I gotta think Dean meant squeezeslave and not softsqueeze in that post. Dean?

erland
2007-09-19, 09:06
SoftSqueeze probably won't get much active development, but I do hope that we can get a patch to revive it to work with 7.0 before it ships.
I'm not sure if I'm the only one, but SoftSqueeze is extremely important during development for me. It makes it possible to develop plugins and SlimServer patches on a separate development system without having separate SqueezeBox hardware. I like to separate the "production" system in the living room which has to work all the time from the development system which doesn't.

I also agree with snarlydwarf that it is a great way to demo the SqueezeBox before purchase.

I don't need SoftSqueeze to be developed with feature that doesn't exist on the SqueezeBox, but it would be good if it at least could have the same features as the SqueezeBox regarding display, navigation and SlimProto version support.

dean
2007-09-19, 09:24
On Sep 19, 2007, at 9:02 AM, bklaas wrote:
> I gotta think Dean meant squeezeslave and not softsqueeze in that
> post.
> Dean?
I did mean SoftSqueeze. We don't want to break it, but the
engineering focus will be on the Jive-based player/controller for the
future.

Richard has already said that the Jive-based software will be a
replacement for SqueezeSlave.

erland
2007-09-19, 09:45
Richard has already said that the Jive-based software will be a
replacement for SqueezeSlave.

I thought Jive was for control not for music playback.

Am I interpreting you correctly in that future Jive devices(software or hardware) also can handle music playback ?

rtitmuss
2007-09-19, 09:49
Am I interpreting you correctly in that future Jive devices(software or hardware) also can handle music playback ?

Yes, we are planning on adding music playback to the Jive platform.

peterw
2007-09-19, 10:54
On Sep 19, 2007, at 9:02 AM, bklaas wrote:
> I gotta think Dean meant squeezeslave and not softsqueeze in that
> post.
I did mean SoftSqueeze. We don't want to break it, but the
engineering focus will be on the Jive-based player/controller for the
future.

Richard has already said that the Jive-based software will be a
replacement for SqueezeSlave.

I understand completely that the Tp/SB firmware is stable and you're putting virtually all of your development effort into Jive and SlimServer. That makes perfect sense. But Richard suggested that Jive Desktop was replacing *Softsqueeze*, not Squeezeslave ("We are planning on adding audio support for both the Jive desktop application (to replace Softsqueeze)...").

I couldn't care less about Squeezeslave, but abandoning SoftSqueeze would be tantamount to abandoning the software development kit for pre-Jive hardware. As a developer and as a customer with Slim/Logitech hardware throughout my house, I find the idea that Logitech might abandon SoftSqueeze disheartening.

I've never used Squeezeslave, and would not miss it if Richard & Logitech abandoned it. But I depend on the IR/SB/Tp emulaion provided by SoftSqueeze.

-Peter

dean
2007-09-19, 10:56
On Sep 19, 2007, at 9:45 AM, erland wrote:
> Am I interpreting you correctly in that future Jive devices
> (software or
> hardware) also can handle music playback ?
That's the plan.

dean
2007-09-19, 10:59
On Sep 19, 2007, at 10:54 AM, peterw wrote:
> I understand completely that the Tp/SB firmware is stable and you're
> putting virtually all of your development effort into Jive and
> SlimServer. That makes perfect sense. But Richard suggested that Jive
> Desktop was replacing *Softsqueeze*, not Squeezeslave ("We are
> planning
> on adding audio support for both the Jive desktop application (to
> replace Softsqueeze)...").
That's right.

> As a developer and as a customer with Slim/Logitech
> hardware throughout my house, I find the idea that Logitech might
> abandon SoftSqueeze disheartening.
We aren't abandoning SoftSqueeze and do intend to make sure it
continues to work through SlimServer 7.0.
As an open source project we'll continue to accept patches to it for
improvements over time.

What we won't do is put much time into improving it with our own in-
house engineering team.

These guys will be focusing on Jive as a future software platform for
both control and playback on both devices and desktops.

Triode
2007-09-19, 11:36
I've never used Squeezeslave, and would not miss it if Richard & Logitech abandoned it. But I depend on the IR/SB/Tp emulaion provided by SoftSqueeze.
-Peter
Not an answer for slimproto support, but I definately see support for legacy plugin interfaces as important. Indeed I didn't want to convert all my plugins to have a jive interface, so wrote a SB2 display emulator interface for jive - check out RetroBrowser (elsewhere on this forum)

snarlydwarf
2007-09-19, 13:00
ah neat, something changed but damned if I know what since the Jar is the same...

But now I can use Softsqueeze again (despite the "oh no, you have 7.0, upgrade!" message).

Reverted my icky firewall rules, and tonight I'll stop running 7 from the commmand line and go to the real package.

snarlydwarf
2007-09-19, 13:50
Aha, it seems to be some conversion change?

Odd, since it didnt affect the hardware players, but I just installed the deb when I got to work, since Softsqueeze was working fine at home in the toybox.

And magically, softsqueeze broke again.

So I actually looked at the logs and see this repeated thousands of times:


[13:33:30.3197] Slim::Utils::Misc::msg (1185) Warning: [13:33:30.3181] Use of uninitialized value in sprintf at /usr/share/perl5/Slim/Player/Squeezebox.pm line 1059.
[13:33:30.3208] Slim::Utils::Misc::msg (1185) Warning: [13:33:30.3201] Use of uninitialized value in pack at /usr/share/perl5/Slim/Player/Squeezebox.pm line 1087.
[13:33:30.3235] Slim::Networking::Select::select (237) Error: Select task failed: Can't call method "resetDisplay" on an undefined value at /usr/share/perl5/Slim/Player/Squeezebox.pm line 117.


If I take the old 6.5 preferences and change the name to oldprefs to leave it out of any auto-updating attempts, the server starts and runs fine as does softsqueeze (though I will admit to needing to fake URLs in order to set bitlimiting correctly..)

Ben Sandee
2007-09-19, 14:46
On 9/19/07, peterw <peterw.2x65hn1190224501 (AT) no-mx (DOT) forums.slimdevices.com>
wrote:
>
>
> I couldn't care less about Squeezeslave, but abandoning SoftSqueeze
> would be tantamount to abandoning the software development kit for
> pre-Jive hardware. As a developer and as a customer with Slim/Logitech
> hardware throughout my house, I find the idea that Logitech might
> abandon SoftSqueeze disheartening.


You may already know this, but SoftSqueeze was originally developed by
Richard (probably with the help of others as well but MOSTLY Richard) long
before he was working for SlimDevices. It was an open source project to
start with and hosted on SlimDevices' server. It's never been an official
or unofficial SDK that I was aware of, although it was certainly a neat
bonus.

Sure, SoftSqueeze sells some Logitech hardware by giving people a chance to
'try' out the system. It probably does the opposite occasionally too for
those people who are happy using a computer and the emulated SB. I'm glad
that it will continue to be hosted on the Logitech servers but don't blame
them for not wanting to spend significant development time keeping it
up-to-date. The community has a pretty good track record of stepping up in
these instances.

Ben

Triode
2007-09-20, 16:16
So I actually looked at the logs and see this repeated thousands of times:


[13:33:30.3197] Slim::Utils::Misc::msg (1185) Warning: [13:33:30.3181] Use of uninitialized value in sprintf at /usr/share/perl5/Slim/Player/Squeezebox.pm line 1059.
[13:33:30.3208] Slim::Utils::Misc::msg (1185) Warning: [13:33:30.3201] Use of uninitialized value in pack at /usr/share/perl5/Slim/Player/Squeezebox.pm line 1087.
[13:33:30.3235] Slim::Networking::Select::select (237) Error: Select task failed: Can't call method "resetDisplay" on an undefined value at /usr/share/perl5/Slim/Player/Squeezebox.pm line 117.


Assuming this is repeatable could you raise a bug and ask qa to assign it to me.

snarlydwarf
2007-09-20, 16:27
Yeah, it should be repeatable, and I saved my 6.5 config, so if I rename it to slimserver.pref it should nicely mess up whatever it is. (I was thinking rate limiting was the problems since that is where the code is complaining, but I dont remember rate limiting SoftSqueeze at home, just at work... but I can be senile.)

I'll do a bit more investigating and see if I can figure out just what it is that is breaking.

Mark Lanctot
2007-10-11, 10:58
Trying this out right now. It works perfectly.

The speaker in JHB isn't bad at all. I just wish its volume could be controlled, because I may blow it playing around!

I've set bitrate limiting at 128 kbps like bpa instructed. No glitches, except for a little dropout at the beginning of every track, but I recall squeezeslave does the same thing on an x86 platform.

I'll try increasing the bitrate and see where it chokes.

Mark Lanctot
2007-10-11, 11:02
JHB must have a buffer, because I switched to 320 kbps and went into the basement (with poor/no signal) and it still played without a glitch.

bpa
2007-10-11, 12:44
It is 4 weeks since I first tested it and there have been a lot of optimisations in the meantime.
I found it choked whenever I did action on the screen or possibly movement. If left alone and especially if controlled from web interface - it played very well. I think the audio buffer is squeezeslave's buffer rather than the ALSA interface.

I found the volume control to be problem with squeezeslave -I found that if you stop a track before playing another the volume worked OK.

Have you tried plugging it into a set of earphones/speakers rather than the internal speaker ?

Mark Lanctot
2007-10-12, 05:34
Have you tried plugging it into a set of earphones/speakers rather than the internal speaker ?

Ooh, something else to play with, but given the lack of volume control I'm a little hesitant!

oreillymj
2007-10-12, 07:19
How exactly do you get other apps loaded onto Jive.

I've seen mention of game applets etc and now Squeezeslave.

bpa
2007-10-12, 08:12
For now, enable SSH through Advanced setting and then use scp to copy files from PC to Jive or use ssh to logon to Jive. IIRC a more automated/user friendly mechanism for 3rd party applets is planned.

The games etc. are Lua applets and need to go into a specific directory - I'm not sure which but then they become available under Extras.

Squeezeslave is a compiled ARM executable which is run from a shell prompt (using ssh) just like a Linux system. With an appropriate Lua applet - it would be possible to start/stop an executabel on Jive.

Mark Lanctot
2007-11-13, 09:22
Ugh, I've forgotten how to do this!

squeezeslave is sitting in /usr/bin. I've SSHed into /usr/bin but I can't remember how to run it!


# squeezeslave 192.168.1.3
-sh: squeezeslave: not found
# ./squeezeslave 192.168.1.3
-sh: ./squeezeslave: not found

Of course it's sitting there in /usr/bin and I have chmodded it to 777.

I've encountered this problem a lot in Linux, I can't seem to remember how to execute a program via the CLI...please excuse my newbiness!

snarlydwarf
2007-11-13, 09:32
you need to make it executable.

chmod 755 squeezeslave

Mark Lanctot
2007-11-13, 09:36
Thanks snarlydwarf, but I still must've missed something:


# cd /usr/bin
# chmod 755 squeezeslave
# squeezeslave 192.168.1.3
-sh: squeezeslave: not found
# ./squeezeslave 192.168.1.3
-sh: ./squeezeslave: not found

It's that "execute from this directory" notation that always screws me up. I thought it was "./" but I remember that never works for me. There's some other notation that does work for me, but I can never remember it.

snarlydwarf
2007-11-13, 09:38
Oh, duh, you said you did that.

/usr/bin/squeezeslave then... I don't know how well the path is set on Jive.

bpa
2007-11-13, 09:40
I think I may need to rebuild squeezeslave as the kernel as has been updated and also some of the libraries.

Mark Lanctot
2007-11-13, 09:41
I'm beginning to feel really stupid, I managed to do this before.


/usr/bin/squeezeslave 192.168.1.3
-sh: /usr/bin/squeezeslave: not found

And of course, squeezeslave is happily sitting there in /usr/bin!

Aargh!

Mark Lanctot
2007-11-13, 09:42
I think I may need to rebuild squeezeslave as the kernel as has been updated and also some of the libraries.

OK, but why am I getting "not found" errors when it clearly is there? I assume this is my own stupidity.

snarlydwarf
2007-11-13, 09:47
Not necessarily...

If the magic number at the start of the file (basically the first few bytes of the file) do not match what they should be, you will get the 'not found' message. (Yes, that is confusing.)

I believe you can also get that if dynamic libraries (at least libdl, the dynamic loader) can't be found.

Just to make matters more fun, some shells (though I don't think busybox or whatever is used on Jive does it) keep track of things you've tried to run. This makes path-searching faster... but you need to use 'rehash' when you add or delete things. "Oh, I tried squeezeslave before and didn't find it, so I won't even look now".

There are some gotcha surprises in Linux, so it isn't you.

bpa
2007-11-13, 10:06
There was something which Richard Titmuss mentioned in the first few weeks of the new kernel about the format of the executable, as I think it is an embedded kernel and so executables are in a different format and not just a different magic number.

Richard talked about enabling support for the "old" executable format through a kernel build flag but I don't know if it was enabled.

I should do rebuild as the toolchain was also changed and now supports the true instruction set (armv5tej and not the armv4) and there will be a slight perf boost with the fixed point arith of the decoders.

Mark Lanctot
2007-11-13, 10:08
So what I was doing should have worked?

I just want to know if I'm not crazy. ;-)

bpa
2007-11-13, 10:11
What you are doing looks right. Can you do a "ls -l" just to make sure all the permission and owners are OK and the same as all the other executables.

The executable format is the only explanation I have - I'll have a look at it over the next few days.

Mark Lanctot
2007-11-13, 10:15
# ls -l /usr/bin/squeezeslave
-rwxr-xr-x 1 root root 408336 Nov 13 11:13 /usr/bin/squeezeslave

snarlydwarf
2007-11-13, 10:38
So what I was doing should have worked?

Yeah, that looked fine.



I just want to know if I'm not crazy. ;-)

Well, I wouldn't go that far. You may still be off your rocker entirely, just not for that reason. (Though it may be pushing you over the edge. :))

Mark Lanctot
2007-11-13, 10:48
Well, I wouldn't go that far. You may still be off your rocker entirely, just not for that reason. (Though it may be pushing you over the edge. :))

I opened myself up for that one!

bpa
2007-11-16, 11:13
I've rebuilt squeezeslave but I haven't posted a new copy as there are some slimproto errors.

However, recent changes to audio in Jive have resulted in Jive keeping the /dev/dsp (audio out device) open even when sound effects are disabled - so at present a working squeezeslave cannot play audio when jive is running.

bpa
2007-11-16, 16:41
I've posted the updated squeezeslave (v 0.7.4) in the same location. Slimproto errors were just an IP address typo.

You can run squeezeslave if you kill Jive but I think the only way to reboot jive then is to remove/replace battery.

When the current problem with Jive audio are sorted, then it may be possible to fix the /dev/dsp issue.

remd
2008-04-01, 01:48
Hello BPA,
Could you give us access to the squeezeslave source code ?

bpa
2008-04-01, 01:54
It's not my code, I just copied the code from Sourceforge or Slimdevices subversion (I can't remember exactly) and cross-compiled it.

thunder
2008-09-24, 01:43
Squeezeslave works great on my controller. Thank you.

However there is one issue I was not able to resolve: How do I run Squeezeslave in the background? As soon as I detach squeezeslave from a tty, it dies.

ralphy
2008-09-24, 03:55
Add " > /dev/null 2>&1 &" without the double quotes to the end of the command line. For example;

/usr/sfw/bin/squeezeslave --retry --signal schostname > /dev/null 2>&1 &

thunder
2008-09-24, 12:27
Thank you it works perfect!

you guys rock!

bhaagensen
2008-09-24, 15:04
Squeezeslave works great on my controller. Thank you.

However there is one issue I was not able to resolve: How do I run Squeezeslave in the background? As soon as I detach squeezeslave from a tty, it dies.

use dtach ;)