Finally cracked it!

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
User avatar
roobarb!
Posts: 1723
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Finally cracked it!

Post by roobarb! »

For a very long time the OpenFrame images haven't been able to move on from the 3.16 kernel branch due to an annoying issue with ALSA that has prevented audio hot-plugging from working. Well, to be fair, it's an annoying issue with how the STAC9202 chip is wired up in the Joggler / OpenFrame 1, but changes in ALSA were making all of the recommended fixes fail miserably.

It's been a pet problem of mine, particularly as one of the main uses of the Joggler has been as an audio playback unit. With the bug present, even when a cable from the back of the unit is permanently connected to headphones or an amplifier there would be an annoying crackling interference from the internal speakers.

WELL NO MORE!

I finally found a little time to work on Debian Bullseye (though I'd originally been targeting Buster... shows how much time has gone by) and in the process compiled the 5.10 kernel. As I checked the boot output for errors I noticed that it enumerated the STAC9202 IC in an identical manner to the 3.16 kernel. Weird, I thought, I'm sure it used to do that differently in the 4.x branch.

So I modified the kernel and userspace patches to apply to kernel 5.10 and tada! It behaves precisely as it did under 3.16. THE FINAL LEVEL COMPLETE! :lol:

Well, I'm not quite done, there's something weird happening with the backlight driver, but I think it's a simple fix.

With any luck there'll be some sort of Debian Bullseye image with an up-to-date and fully working kernel available in the next week or two. :D
birdslikewires.net - Upgrade your OpenFrame to Debian Bullseye with the latest 5.10 kernel! 8-)
Man in a van
Posts: 383
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Finally cracked it!

Post by Man in a van »

good news, boss ;)

ronnie
User avatar
pete
Posts: 2937
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Finally cracked it!

Post by pete »

Great news!!!!
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
Paul Webster
Posts: 134
Joined: Mon Jul 18, 2011 7:56 am

Re: Finally cracked it!

Post by Paul Webster »

That is great news. I would love to move off the ancient builds I am running, if only to give a cheap USB DAC that fails to work with the old stuff.
jkn
Posts: 120
Joined: Sat Jul 16, 2011 11:18 am

Re: Finally cracked it!

Post by jkn »

Nice one, well done!
User avatar
roobarb!
Posts: 1723
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Finally cracked it!

Post by roobarb! »

Thanks, everyone. Backlight driver and ambient light sensor are both working again now too. 8-)

There've been a bunch of changes that are messing up the of-* scripts at the moment, so I'll be working on those next. However, if anybody is particularly keen to have a play the version I've just compiled is here.

As the URL suggests this is just a temporary location and the "finished" image files will go in the correct place and be linked from my site in time.

With this version we essentially have software parity with the latest Raspberry Pi images. Obviously stuff custom-compiled stuff for their platform won't work for us, as we're Intel x86 and they're ARM, but general documentation and processes will be comparable.

Oh, by the way, since Debian Buster commands that require root access living in "sbin" directories are not in the user's default path. I'll try to stick to this convention and adjust locations based upon the access requirements of the scripts, but if you "tab tab" a lot for autocompletion and don't see the commands you're looking for, that may be why. Just prefix with sudo, as you would need to in order to run the script.
birdslikewires.net - Upgrade your OpenFrame to Debian Bullseye with the latest 5.10 kernel! 8-)
Man in a van
Posts: 383
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Finally cracked it!

Post by Man in a van »

roobarb! wrote: Sat Feb 19, 2022 11:35 pm Thanks, everyone. Backlight driver and ambient light sensor are both working again now too. 8-)

There've been a bunch of changes that are messing up the of-* scripts at the moment, so I'll be working on those next. However, if anybody is particularly keen to have a play the version I've just compiled is here.
Just tried, no luck :?

Code: Select all

Processing triggers for udev (247.3-6) ...
Processing triggers for libc-bin (2.31-13+deb11u2) ...
Configuring Xserver defaults... done.
Installation of Xserver completed.
--2022-02-20 20:59:50--  https://birdslikewires.net/download/openframe/squeezeplay/v7.8/
Resolving birdslikewires.net (birdslikewires.net)... 5.135.163.72, 2001:41d0:8:e648::1
Connecting to birdslikewires.net (birdslikewires.net)|5.135.163.72|:443... connected.
ERROR: The certificate of ‘birdslikewires.net’ is not trusted.
ERROR: The certificate of ‘birdslikewires.net’ doesn't have a known issuer.
--2022-02-20 20:59:50--  https://birdslikewires.net/download/openframe/squeezeplay/v7.8/.md5
Resolving birdslikewires.net (birdslikewires.net)... 5.135.163.72, 2001:41d0:8:e648::1
Connecting to birdslikewires.net (birdslikewires.net)|5.135.163.72|:443... connected.
ERROR: The certificate of ‘birdslikewires.net’ is not trusted.
ERROR: The certificate of ‘birdslikewires.net’ doesn't have a known issuer.
cat: /tmp/.md5: No such file or directory
md5sum: /tmp/: Is a directory



No checksums! Looks like the download failed.
of@openframe:~$ Installation of Xserver completed.
--2022-02-20 20:59:50--  https://birdslikewires.net/download/openframe/squeezeplay/v7.8/
Resolving birdslikewires.net (birdslikewires.net)... 5.135.163.72, 2001:41d0:8:e648::1
Connecting to birdslikewires.net (birdslikewires.net)|5.135.163.72|:443... connected.
ERROR: The certificate of ‘birdslikewires.net’ is not trusted.
ERROR: The certificate of ‘birdslikewires.net’ doesn't have a known issuer.
--2022-02-20 20:59:50--  https://birdslikewires.net/download/openframe/squeezeplay/v7.8/.md5
Resolving birdslikewires.net (birdslikewires.net)... 5.135.163.72, 2001:41d0:8:e648::1
Connecting to birdslikewires.net (birdslikewires.net)|5.135.163.72|:443... connected.
ERROR: The certificate of ‘birdslikewires.net’ is not trusted.
ERROR: The certificate of ‘birdslikewires.net’ doesn't have a known issuer.
cat: /tmp/.md5: No such file or directory
md5sum: /tmp/: Is a directory



No checksums! Looks like the download failed.
of@openframe:~$

ronnie
User avatar
roobarb!
Posts: 1723
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Finally cracked it!

Post by roobarb! »

Man in a van wrote: Sun Feb 20, 2022 10:07 pm
roobarb! wrote: Sat Feb 19, 2022 11:35 pm Thanks, everyone. Backlight driver and ambient light sensor are both working again now too. 8-)

There've been a bunch of changes that are messing up the of-* scripts at the moment, so I'll be working on those next. However, if anybody is particularly keen to have a play the version I've just compiled is here.
Just tried, no luck :?
Aye, as I say, all those scripts are pretty messed up right now and I have no idea if Squeezeplay will work.

Having said that, the errors you're seeing there are because there are no recent certificates installed for comms over HTTPS. Do this first:

Code: Select all

sudo apt update
sudo apt install ca-certificates
See what happens if you try again.
birdslikewires.net - Upgrade your OpenFrame to Debian Bullseye with the latest 5.10 kernel! 8-)
Man in a van
Posts: 383
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Finally cracked it!

Post by Man in a van »

roobarb! wrote: Tue Feb 22, 2022 12:14 pm
Man in a van wrote: Sun Feb 20, 2022 10:07 pm
roobarb! wrote: Sat Feb 19, 2022 11:35 pm Thanks, everyone. Backlight driver and ambient light sensor are both working again now too. 8-)

There've been a bunch of changes that are messing up the of-* scripts at the moment, so I'll be working on those next. However, if anybody is particularly keen to have a play the version I've just compiled is here.
Just tried, no luck :?
Aye, as I say, all those scripts are pretty messed up right now and I have no idea if Squeezeplay will work.

Having said that, the errors you're seeing there are because there are no recent certificates installed for comms over HTTPS. Do this first:

Code: Select all

sudo apt update
sudo apt install ca-certificates
See what happens if you try again.


The joggler is set up with a usb hub for the usb-stick and a usb-dac

Those commands install squeezeplay.

However, all that is displayed on the screen is

squeezeplay@openframe

Image

If I "sudo apt install squeezelite" to /etc/default/squeezelite I can playback from the dac (also through the Joggler if I change the output path)

If I install it to /home/squeezeplay/squeezelite it plays back through the Joggler

I also installed LMS v8.2.1 but it does not start

Code: Select all

of@openframe:~$ sudo systemctl status logitechmediaserver
● logitechmediaserver.service - Logitech Media Server
     Loaded: loaded (/lib/systemd/system/logitechmediaserver.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Tue 2022-02-22 18:48:24 GMT; 1min 3s ago
    Process: 2610 ExecStart=/usr/sbin/squeezeboxserver --prefsdir $PREFSDIR --logdir $LOGDIR --cachedir $CACHEDIR --charset $CHARSET $SLIMOPTIONS (code=exited, status=0/SUCCESS)
   Main PID: 2610 (code=exited, status=0/SUCCESS)
        CPU: 886ms

Feb 22 18:48:24 openframe squeezeboxserver[2610]: If you're running some unsupported Linux/Unix platform, please use the buildme.sh
Feb 22 18:48:24 openframe squeezeboxserver[2610]: script located here:
Feb 22 18:48:24 openframe squeezeboxserver[2610]: https://github.com/Logitech/slimserver-vendor/tree/public/8.2/CPAN
Feb 22 18:48:24 openframe squeezeboxserver[2610]: If 8.2 is outdated by the time you read this, Replace "8.2" with the major version
Feb 22 18:48:24 openframe squeezeboxserver[2610]: You should never need to do this if you're on Windows or Mac OSX. If the installers
Feb 22 18:48:24 openframe squeezeboxserver[2610]: don't work for you, ask for help and/or report a bug.
Feb 22 18:48:24 openframe squeezeboxserver[2610]: *******
Feb 22 18:48:24 openframe squeezeboxserver[2610]:
Feb 22 18:48:24 openframe squeezeboxserver[2610]: Exiting..
Feb 22 18:48:24 openframe systemd[1]: logitechmediaserver.service: Succeeded.
The perl version is OK

Code: Select all

of@openframe:~$ perl -v

This is perl 5, version 32, subversion 1 (v5.32.1) built for i686-linux-gnu-thread-multi-64int
(with 47 registered patches, see perl -V for more detail)

Copyright 1987-2021, Larry Wall
That's a bit of a shame :(

ronnie
User avatar
roobarb!
Posts: 1723
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Finally cracked it!

Post by roobarb! »

IIRC, the latest, snazziest way of using Logitech Media Server and Squeezeplay was to run a "de-jived" version of Squeezeplay and use the UI to control the squeezelite process running in the background. Is this still The Way, or has a new method taken precedence in the meantime?

If I end up looking at it again, I may as well look at the best method. It was all to do with hi-def audio not working through the old jive player, wasn't it?
birdslikewires.net - Upgrade your OpenFrame to Debian Bullseye with the latest 5.10 kernel! 8-)
jogglerhase
Posts: 172
Joined: Wed Aug 08, 2012 3:02 pm

Re: Finally cracked it!

Post by jogglerhase »

roobarb! wrote: Tue Feb 22, 2022 11:15 pm IIRC, the latest, snazziest way of using Logitech Media Server and Squeezeplay was to run a "de-jived" version of Squeezeplay and use the UI to control the squeezelite process running in the background. Is this still The Way, or has a new method taken precedence in the meantime?

If I end up looking at it again, I may as well look at the best method. It was all to do with hi-def audio not working through the old jive player, wasn't it?

Hi @roobarb!
thank you so much for keeping our little Jogglers usable!!!
And yes: Using the old 'std' Squeezeplay did not work for me reliably anymore. Squeezeplay sometimes just crashed when playing Audio, leaving me just with the command line on the screen.

I then followed the 'Dirty Hack' from @DJWillis and since then the system did not crash anymore. (I assume this is what you describe with " run a "de-jived" version of Squeezeplay and use the UI to control the squeezelite process"?)
-> So, from my perspective, this is curretnly the best known option.

FYI: Still, also with this 'hack' after roughly a month of continuous use, the UI will just vanish (blank screen) and I need to reboot the system.
But this seems to be just something w/ the UI, whereas before audio playback crashed, as stated.

Thanks again for all your time & work you put into this!
User avatar
roobarb!
Posts: 1723
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Finally cracked it!

Post by roobarb! »

Hey, thank you, you're very welcome! Can't tell you how pleased I am to get us away from kernel 3.16 at last. :)

Okay, when I have more brain power (somewhat lacking this evening) I'll look to switch from "full jive" to jivelite. The squeezelite backend is available straight through apt on Debian Bullseye (though maybe it's a little old, need to check) so it's just the UI we need. I've already seen roughly how it's been slimmed down, but getting it to compile on a modern OS might be, erm, interesting. SqueezePlay was.

Some of the of- scripts are looking a little better now. Xserver install works and I have the test unit streaming a camera with mplayer for testing, plus the default wifi card (RT2770) is now working fine too.

IMG_0267.jpeg

Just messing around, I haven't figured out settings that work smoothly yet, but here's BigCliveLive streaming from YouTube. :lol:
birdslikewires.net - Upgrade your OpenFrame to Debian Bullseye with the latest 5.10 kernel! 8-)
Man in a van
Posts: 383
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Finally cracked it!

Post by Man in a van »

The Bullseye squeezelite is an updated version (although it is always going to be behind a Ralphy's version)

On a raspberry pi I download the apt version, which gives me a configuration folder, amongst system ctl and stuff, then just run an update script

Code: Select all

#raspberry pi os bullseye 64 bit
sudo /etc/init.d/squeezelite stop
wget -O squeezelite.tgz https://sourceforge.net/projects/lmsclients/files/squeezelite/linux/squeezelite-1.9.9.1392-aarch64.tar.gz
sudo tar -C /usr/bin -zxvf squeezelite-1.9.9.1372-armhf.tar.gz
sudo tar -C /usr/bin -zxvf squeezelite.tgz
sudo chmod a+x /usr/bin/squeezelite
sudo /etc/init.d/squeezelite start
ronnie
Man in a van
Posts: 383
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Finally cracked it!

Post by Man in a van »

Well I still can't get squeezelite to show its face :?

And my Jivelite on a joggler foo is really rusty :shock:

But there is hope :o

Curser is still on screen (but that should be fixable ;) )

Image

Image

Image

ronnie
Man in a van
Posts: 383
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Finally cracked it!

Post by Man in a van »

just installed squeezelite, and playing through the joggler with default setting

Image

starting it via putty from my Windows 10 Desktop

Code: Select all

sudo jivelite/bin/jivelite
ronnie

wish I had more hair :roll:

Code: Select all

of@openframe:~$ sudo squeezelite -l
[sudo] password for of:
Output devices:
  null                           - Discard all samples (playback) or generate zero samples (capture)
  mixer
  default
  hw:CARD=MID,DEV=0              - HDA Intel MID, STAC9202 Analog - Direct hardware device without any conversions
  hw:CARD=MID,DEV=1              - HDA Intel MID, STAC9202 Digital - Direct hardware device without any conversions
  plughw:CARD=MID,DEV=0          - HDA Intel MID, STAC9202 Analog - Hardware device with all software conversions
  plughw:CARD=MID,DEV=1          - HDA Intel MID, STAC9202 Digital - Hardware device with all software conversions
  sysdefault:CARD=MID            - HDA Intel MID, STAC9202 Analog - Default Audio Device
  front:CARD=MID,DEV=0           - HDA Intel MID, STAC9202 Analog - Front output / input
  surround21:CARD=MID,DEV=0      - HDA Intel MID, STAC9202 Analog - 2.1 Surround output to Front and Subwoofer speakers
  surround40:CARD=MID,DEV=0      - HDA Intel MID, STAC9202 Analog - 4.0 Surround output to Front and Rear speakers
  surround41:CARD=MID,DEV=0      - HDA Intel MID, STAC9202 Analog - 4.1 Surround output to Front, Rear and Subwoofer speakers
  surround50:CARD=MID,DEV=0      - HDA Intel MID, STAC9202 Analog - 5.0 Surround output to Front, Center and Rear speakers
  surround51:CARD=MID,DEV=0      - HDA Intel MID, STAC9202 Analog - 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
  surround71:CARD=MID,DEV=0      - HDA Intel MID, STAC9202 Analog - 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
  iec958:CARD=MID,DEV=0          - HDA Intel MID, STAC9202 Digital - IEC958 (S/PDIF) Digital Audio Output
  dmix:CARD=MID,DEV=0            - HDA Intel MID, STAC9202 Analog - Direct sample mixing device
  dmix:CARD=MID,DEV=1            - HDA Intel MID, STAC9202 Digital - Direct sample mixing device
  dsnoop:CARD=MID,DEV=0          - HDA Intel MID, STAC9202 Analog - Direct sample snooping device

of@openframe:~$ sudo /jivelite/bin/jivelite
sudo: /jivelite/bin/jivelite: command not found
of@openframe:~$ ls
jivelite  luajit
of@openframe:~$ sudo jivelite/bin/jivelite

JiveLite 0.1.0
No protocol specified
No protocol specified
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image
Man in a van
Posts: 383
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Finally cracked it!

Post by Man in a van »

Here is a little guide to install Jivelite, as things are at the moment.

Any suggestions and advice on how to better do it, please post. I'm a real numpty at this and often do stuff that is not required (or miss stuff that is required). :!:

Is a new user required :?:

Anyway, proceed at your own risk ;) :) :roll:

I'm using an Ethernet connection to the Joggler
Download the files from here
https://birdslikewires.net/download/ope ... lseye/tmp/
I used rpi-imager to make the image on a usb stick (8gb is enough at the moment)
https://www.raspberrypi.com/software/
I used gParted on a raspberry pi desktop to expand the file system on the stick
start up joggler with usb hub, mouse, keyboard and image stick attatched
Using the guide here, I created a user ronnie
https://www.digitalocean.com/community/ ... quickstart
shutdown/reboot
--------------------------------------------------------------------------------------------------------------------
ssh into joggler as new user

Code: Select all

sudo apt-get update

sudo apt install ca-certificates build-essential git libluajit-5.1-dev libsdl1.2-dev libsdl-ttf2.0-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libexpat1-dev
--------------------------------------------------------------------------------------------------------------

Code: Select all

cd
mkdir luajit
cd luajit
git clone http://luajit.org/git/luajit-2.0.git
cd luajit-2.0
make
sudo make install
sudo ldconfig
----------------------------------------------------------------------------------------------------

Code: Select all

cd
git clone https://github.com/ralph-irving/jivelite.git
cd jivelite
sudo make PREFIX=/usr/local
-------------------------------------------------------------------------------------

Code: Select all

cd
sudo apt install xinit xorg
-------------------------------------------------------------------------------------
sudo reboot
------------------------------------------------------------------------------------------
ssh into joggler as new user

Code: Select all

sudo nano jivelite.sh
add the following text (replace ronnie with new user name)
-------------------------------------------------------------------------------------
#!/bin/bash
export JIVE_NOCURSOR=1

sudo -E xinit /home/ronnie/jivelite/bin/jivelite
----------------------------------------------------------------------------------

save and exit ( ctrl-x > y > enter)

Code: Select all

sudo chmod u+x jivelite.sh
---------------------------------------------------------

Code: Select all

sudo crontab -e
add at the botttom

@reboot /home/ronnie/jivelite.sh (replace ronnie with new user name)

save and exit ( ctrl-x > y > enter)
-----------------------------------------------------------------------

Code: Select all

sudo reboot
-----------------------------------------------------------------------

I hope that is correct

ronnie

I'm thinking that for regular LMS users it might be possible (when the dev is more complete) to install a desktop with browser and use the Material Skin Plugin as an alternative to either Squeezeplay or Jivelite.
Squeezelite is a given
LMS on the Joggler 32 bit requires a rebuild Perl (I tried this last night but kept getting the error message
./buildme.sh: line 253: ldconfig: command not found
libz not found - please install it
but however I tried I could not install the package :cry:
Man in a van
Posts: 383
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Finally cracked it!

Post by Man in a van »

Well a Desktop is possible, but not this one :) ;)

Image

it's too much for the joggler, so sloooooooooooooooooow :roll:

Image

ronnie
papaiannis
Posts: 66
Joined: Tue May 15, 2012 9:53 pm

Re: Finally cracked it!

Post by papaiannis »

Hi Roobarb,
does the latest openframe ubuntu image downloadable from your site (dated 06-Feb-2022) include the fix to the annoying crackling sound coming from the speaker?
Thank you so much for what you do for our community.
Alekos
sixedup
Posts: 19
Joined: Mon May 14, 2012 12:01 pm

Re: Finally cracked it!

Post by sixedup »

Dumb user question - is this heading towards being an updated replacement for the old SqueezeOS 3.03 image that could be installed on the internal flash?
papaiannis
Posts: 66
Joined: Tue May 15, 2012 9:53 pm

Re: Finally cracked it!

Post by papaiannis »

I may have misunderstood the subject of this thread...however, I was referring to this image available on birdslikewires.net:
bio-ext2-1028-43-bionic-5.4.177op.img.gz
It is compiled with kernel 5.4 and is meant to be installed on an external USB drive.
Post Reply