SqueezePlay for Joggler (Native, Ubuntu & SQPOS)

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
User avatar
johnnygal
Posts: 148
Joined: Tue Oct 11, 2011 1:07 am
Location: Stockport, UK

Re: SqueezePlay for Joggler (Standalone Native and Ubuntu)

Post by johnnygal »

roobarb! wrote:Don't bother messing with these files yourselves now - just go and grab the new version with Settings > Update. :)

You'll find the ability to switch between mixer and direct output under Settings > Audio Settings > Interface Configuration > Software Mixer.
cheers roobarb.
This will make it a lot easier to switch between them for diagnosis of the issue.
I will update tomorrow when i get back
mrw
Posts: 47
Joined: Mon Jan 02, 2012 6:30 pm

Re: SqueezePlay for Joggler (Standalone Native and Ubuntu)

Post by mrw »

roobarb! wrote:
johnnygal wrote:The chipmunks are back in town!
Hehe, yes - they are! It was a deliberate choice, actually. The simple asound.conf file gives you chipmunks, but it never fails. There have been some reports of the asound.conf using the mixer (shown in loaded's post above) results in audio dropouts after SqueezePlay has been running for some hours.

I thought it better to go with reliability by default, because at least the chipmunk issue is instantly identifiable. I'm going to put something together to allow switching between the two configurations without having to dive into the command line.
I am one of those who suffers the 'audio dropouts after SqueezePlay has been running for some hours' when using the 'dmix' plugin. This is a characteristic of both of my Jogglers running the native OS.

I had a look at the Alsa documentation, and discovered a potentially better alternative to the simple 'hw' plugin: the 'plug' plugin. This will resample incoming streams into a sample rate that the hardware will support, but only if resampling is required. Helium fuelled voices are now a thing of the past.

For example, the simple 'asound.conf' file might look like:

Code: Select all

pcm.!default {
   type plug
   slave.pcm {
     type hw
     card 0
   }
}
ctl.!default {
   type hw
   card 0
}
This seems to be working well with the Joggler sound hardware, and has also been reported to work with a USB DAC (card 1 in this case).

Also worth bearing in mind is the possibility of confining Squeezeplay's alsa configuration to a separate configuration file, by setting the Alsa environment appropriately. The default configuration can be drawn into such a file with an 'include' statement. I haven't got around to trying this out yet, but something like '<confdir:asound.conf>' and an 'export ALSA_CONFIG_PATH=/pathto/mysqp_alsa.conf' would probably do the trick. The environment variables 'ALSA_CARD' and 'ALSA_PCM_CARD' might also be useful, although I haven't pursued.

Finally, it is possible to set the Alsa output device and some of its parameters within Squeezeplay itself. Optionally, a separate 'effects' Alsa output device can also be defined. One could, perhaps, provide the opportunity to choose between three or four predefined output configurations within Squeezeplay, with the detail of those configurations stored in a dedicated Squeezeplay asound.conf file.


I haven't determined the cause of the 'dmix' issue. My hunch is a problem within the Alsa library, but I don't know for sure. One thing that appears to resolve it 'on the fly' is to close and reopen the relevant Alsa device. That happens every time a stream with a different sample rate is played back, or Squeezeplay is restarted. So it may be possible to do something within Squeezeplay to work around it.
User avatar
roobarb!
Posts: 1746
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

SqueezePlay for Joggler (Standalone Native and Ubuntu)

Post by roobarb! »

Thanks for that, mrw - really helpful. Going to try out your alternative asound.conf now.

With the other options, where exactly would you specify those includes? In /etc/asound.conf or in /usr/share/alsa/alsa.conf - or somewhere else? And how does that make it specific to SqueezePlay (or, more correctly, jive)?
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
mrw
Posts: 47
Joined: Mon Jan 02, 2012 6:30 pm

Re: SqueezePlay for Joggler (Standalone Native and Ubuntu)

Post by mrw »

roobarb! wrote:Thanks for that, mrw - really helpful. Going to try out your alternative asound.conf now.

With the other options, where exactly would you specify those includes? In /etc/asound.conf or in /usr/share/alsa/alsa.conf - or somewhere else? And how does that make it specific to SqueezePlay (or, more correctly, jive)?
My thinking was that one has a stand-alone Squeezeplay 'alsa.conf' in the Squeezeplay install directory. That 'alsa.conf' might (but probably won't) look like:

Code: Select all

<confdir:asound.conf>
pcm.!default {
   type plug
   slave.pcm {
     type hw
     card 0
   }
}
ctl.!default {
   type hw
   card 0
}
Alsa will (or ought to...) substitute the 'confdir:' element with '/usr/share/alsa/' on the native OS Joggler, thus '/usr/share/alsa/alsa.conf ' is thereby included. And when you examine '/usr/share/alsa/alsa.conf ' you see that it automatically brings in '/etc/asound.conf', and '~/asoundrc'.

Update 23 May: The <xxx> 'include' feature does not seem to work quite as I had hoped. Although the above 'works', it does not seem possible to redefine, for example, the 'default' device in the replacement configuration file.

One might achieve a similar effect with the 'ALSA_CONFIG_PATH' environment variable, as it takes a colon separated list of configuration files. But the approach I've outlined seems to me to be the most straightforward, as it minimizes the amount of foreknowledge required by the Squeezeplay start up script. The Squeezeplay start up script would simply export an appropriately defined 'ALSA_CONFIG_PATH' into jive's environment. (The jive_alsa child, or children, will inherit it). Alsa will look at that when jive/jive_alsa calls upon it.

To reiterate, I haven't yet run this in any kind of 'production' mode, just tinkering at present, and only half tested. So I'm not guaranteeing that it does work as I imply. But it looks right, or at least it looks to be along the right lines.

I could imagine defining a number of 'standard' configurations in the stand-alone 'alsa.conf', and then perhaps advise the user to select the one wanted by appending a simple alias line of the form 'pcm.!default = predefined_pcm_device_wanted'. Or something.
Last edited by mrw on Wed May 23, 2012 1:01 pm, edited 1 time in total.
User avatar
roobarb!
Posts: 1746
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: SqueezePlay for Joggler (Standalone Native and Ubuntu)

Post by roobarb! »

Having run with mrw's new simple asound.conf all night, it would appear that it is indeed the panacea I've been looking for. Resampling is working and it survived the night. So, there's an update!

Version 1.43 is out now, with the new asound.conf_simple and an updated JogglerAudio applet that allows switching between the internal (card 0) audio interface and a USB (card 1) interface. This isn't as refined as I would like it to be, and I still need to mull over mrw's ideas in the post above, but for the time being at least it solves a couple of things that have been a tad irritating. Happy weekend, everyone! :)
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
User avatar
johnnygal
Posts: 148
Joined: Tue Oct 11, 2011 1:07 am
Location: Stockport, UK

Re: SqueezePlay for Joggler (Standalone Native and Ubuntu)

Post by johnnygal »

roobarb! wrote:Having run with mrw's new simple asound.conf all night, it would appear that it is indeed the panacea I've been looking for. Resampling is working and it survived the night. So, there's an update!

Version 1.43 is out now, with the new asound.conf_simple and an updated JogglerAudio applet that allows switching between the internal (card 0) audio interface and a USB (card 1) interface. This isn't as refined as I would like it to be, and I still need to mull over mrw's ideas in the post above, but for the time being at least it solves a couple of things that have been a tad irritating. Happy weekend, everyone! :)
Great, thanks Roobarb.

Updating now...
oggie
Posts: 18
Joined: Thu Dec 22, 2011 2:33 pm

Re: SqueezePlay for Joggler (Standalone Native and Ubuntu)

Post by oggie »

The new version with the updated asound.conf is working great, thanks for the update Roobarb.

One last small issue (I'll not bother you again after this!)... is there a way to reduce the volume of the sound effects even further? I've tried setting the volume to minimum, but they are still too loud.
User avatar
roobarb!
Posts: 1746
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

SqueezePlay for Joggler (Standalone Native and Ubuntu)

Post by roobarb! »

oggie wrote:The new version with the updated asound.conf is working great, thanks for the update Roobarb.

One last small issue (I'll not bother you again after this!)... is there a way to reduce the volume of the sound effects even further? I've tried setting the volume to minimum, but they are still too loud.
Good to hear!

Other than turning them off, I'm afraid I don't know of a way to make the effects quieter. Never looked into that - they've always been pretty quiet for me on the lower settings (the old pulse audio fix had a weird side effect of massively reducing the effects volume, but I never saw an explantation for that). Sorry!
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
User avatar
johnnygal
Posts: 148
Joined: Tue Oct 11, 2011 1:07 am
Location: Stockport, UK

Re: SqueezePlay for Joggler (Standalone Native and Ubuntu)

Post by johnnygal »

Yep, working great here too on V1.43. My podcasts and additional speech are back working again, with default audio setting. Fingers crossed to see how it behaves for an extended period.

The updater makes it so easy to update.

Much appreciated.
User avatar
johnnygal
Posts: 148
Joined: Tue Oct 11, 2011 1:07 am
Location: Stockport, UK

Re: SqueezePlay for Joggler (Standalone Native and Ubuntu)

Post by johnnygal »

Well, the audio seems to have settled down. No chipmunks and no stuttering/beatbox!

What has happened though for the least 3 mornings is that I have found squeezeplay had stopped on the joggler I leave on all the time (turning "off" squeezeplay each night). When I have come to it, squeezeplay is not running and the Ubuntu update manager is on display - related? I can also see that it is always about 08:06 in the morning? Is this when the update manager runs?

Anyway, I have disable the daily checks by the update manager and see how it goes..
User avatar
roobarb!
Posts: 1746
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: SqueezePlay for Joggler (Standalone Native and Ubuntu)

Post by roobarb! »

johnnygal wrote:When I have come to it, squeezeplay is not running and the Ubuntu update manager is on display - related? I can also see that it is always about 08:06 in the morning? Is this when the update manager runs?
It sounds to me like the update manager is running and pushing SqueezePlay into the background, essentially behind the desktop. Switching off the checks should solve it, I would have thought.
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
User avatar
johnnygal
Posts: 148
Joined: Tue Oct 11, 2011 1:07 am
Location: Stockport, UK

Re: SqueezePlay for Joggler (Standalone Native and Ubuntu)

Post by johnnygal »

roobarb! wrote:
johnnygal wrote:When I have come to it, squeezeplay is not running and the Ubuntu update manager is on display - related? I can also see that it is always about 08:06 in the morning? Is this when the update manager runs?
It sounds to me like the update manager is running and pushing SqueezePlay into the background, essentially behind the desktop. Switching off the checks should solve it, I would have thought.
I don't think Squeezeplay was still running as it had disconnected from LMS. But yep, seems a coincidence that the update manager was there instead. Will see how it behaves now.
User avatar
roobarb!
Posts: 1746
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

SqueezePlay for Joggler (Native, Ubuntu & sqpOS)

Post by roobarb! »

Just posted SqueezePlay OS, which some of you might be interested in. :)

It's a small installation of Ubuntu 10.04 with no window manager; only the basics (well, there are a few niceties, like apt-get and hardware video decoding, in case it's needed). Fits in 1GB of space and runs this SqueezePlay, which is why there have been a couple of seemingly dull bug fix releases recently.

I've been running it for a little while now and it's been very reliable. It should also make for a great tinkering system. Enjoy! :)
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
User avatar
BuZz
Site Admin
Posts: 1460
Joined: Fri Mar 04, 2011 1:15 am

Re: SqueezePlay for Joggler (Native, Ubuntu & sqpOS)

Post by BuZz »

nice one! :)
ARJunior
Posts: 51
Joined: Fri Aug 05, 2011 2:28 pm

Re: SqueezePlay for Joggler (Native, Ubuntu & sqpOS)

Post by ARJunior »

WOW !!! A SqueezePlay OS ! Crazy guy :)

Thank you very much...going to test it now...
Last edited by ARJunior on Thu Apr 26, 2012 6:30 pm, edited 1 time in total.
mrw
Posts: 47
Joined: Mon Jan 02, 2012 6:30 pm

Re: SqueezePlay for Joggler (Native, Ubuntu & sqpOS)

Post by mrw »

roobarb! wrote:Just posted SqueezePlay OS, which some of you might be interested in. :)
Does it use X11 for the user interface ?

User input seems somewhat 'slow' under X11, with touch screen events delivered typically 30/40ms apart. I suspect that the target device (Squeezebox Touch) delivers them up rather more often and regularly, and I would expect improvement in responsiveness/flick etc. But I'm not sure.

I had a go at improving flick responsiveness, with some success (I think), but it leaves me thinking that X11 touch input handling remains an impediment. I had been wondering how one might transition away from it, at least for the purposes of gathering touch input.
ARJunior
Posts: 51
Joined: Fri Aug 05, 2011 2:28 pm

Re: SqueezePlay for Joggler (Native, Ubuntu & sqpOS)

Post by ARJunior »

@Roobarb
Installation of SSH service doesn't seem to work correctly...the system hangs (freeze on installation screen) and I've to reboot the Joggler :s
User avatar
roobarb!
Posts: 1746
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: SqueezePlay for Joggler (Native, Ubuntu & sqpOS)

Post by roobarb! »

mrw wrote:Does it use X11 for the user interface ?
It does. I've not felt that the responsiveness has been particularly laggy, but if you do come up with any improvements I'm more than happy to try them out!
ARJunior wrote:Installation of SSH service doesn't seem to work correctly...the system hangs (freeze on installation screen) and I've to reboot the Joggler :s
It does take a little while to do - it installs using apt-get, so will need to fetch up-to-date caches before downloading ssh and openssh-server. If you continue to have troubles, take a look at the file /home/joggler/.squeezeplay/additional.log. That contains the output of the last attempted installation and should tell you what's going on.

Edit: Ha! Of course, you'll need to plug the stick into another system first to read that file. ;)
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
User avatar
BuZz
Site Admin
Posts: 1460
Joined: Fri Mar 04, 2011 1:15 am

Re: SqueezePlay for Joggler (Native, Ubuntu & sqpOS)

Post by BuZz »

it's worth noting, ubuntu mirrors are VERY slow right now due to release of 12.04. bad time to apt-get install stuff :)

gb.archive.ubuntu.com is barely working at all.
User avatar
johnnygal
Posts: 148
Joined: Tue Oct 11, 2011 1:07 am
Location: Stockport, UK

Re: SqueezePlay for Joggler (Native, Ubuntu & sqpOS)

Post by johnnygal »

Cheers Roobarb - having a play with this now!

I can confirm that the SSH install does work ok, once leaving it for a good 15mins or so.

John
Post Reply