24/96 Squeezeplay and External USB DAC

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

I've found asound.conf in /etc/ but can't edit it as I'm not root. Whats the root password for squeezeplayOS (internal)?
User avatar
JimbobVFR400
Posts: 264
Joined: Fri Jul 20, 2012 8:39 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by JimbobVFR400 »

It's not needed just use sudo eg
sudo nano /etc/asound.conf
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

just before your post (honest!) I applied a brain cell, and did a sudo chmod, which seemed to work! I've now got 16bit 96kHz showing on my DAC, which is a bit suspicious as the file I'm playing is 24bit 48kHz, so I suspect my edit of the asound.conf line rate 44100 to rate 96000 is just setting a fixed sample rate, not following the file sample rate. I'm still in 16bit. I really dont know what I'm editing in there, but not broken it (yet)...
So, what sets the bit rate?
how do I persuade it to just pass through the file at its native bit depth and sample rate?
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

More fumbling in the dark...
I've now edited
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:1,0"
period_time 0
period_size 1024
buffer_size 4096
rate 96000

and I've removed the lines

period_time 0
period_size 1024
buffer_size 4096
rate 96000

and its now correctly sending the file as 48kHz but still 16bit

How do I allow 24bit through?
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

Ah, not got as far as I thought... 44.1kHz files now showing as 48kHz - and changes to the desktopJive.lua disappear on reboot, and make no apparent difference anyway, so I suspect desktopJive.lua is written from somewhere else on boot...

So, in reality, I've got nowhere 8-(

beats mowing the lawn I suppose...
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by Wilberforce »

I've made a quick port of triode's applet... It lacks the cpu power saving tweaks, but it should allow you to select a usb sound card / dac. Mad props to triode - license is BSD.

P.s RE : DesktopJive.lua being reset on boot - this is regenerated if your formatting is off.

Usage:
  • backup your original jive_alsa:

    Code: Select all

    cd /opt/squeezeplay/bin

    Code: Select all

    cp jive_alsa jiva_alsa_bak
  • get the attached file on your device
  • cd to directory containing file
  • issue the following command:

    Code: Select all

    sudo tar -xvf EnhancedDigitalOutput.tar.gz -C /opt/squeezeplay/share/jive/applets/
    
    • restart squeezeplay
Edit: before you install run,

Code: Select all

cat /proc/asound/cards 
and verify "MID" appears in square brackets for the first card, if not post the output here.
Attachments
EnhancedDigitalOutput.tar.gz
BSD License
(50.28 KiB) Downloaded 443 times
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

24/96 Squeezeplay and External USB DAC

Post by jemhayward »

Wilberforce wrote:I've made a quick port of triode's applet... It lacks the cpu power saving tweaks, but it should allow you to select a usb sound card / dac. Mad props to triode - license is BSD.

P.s RE : DesktopJive.lua being reset on boot - this is regenerated if your formatting is off.

Usage:
  • backup your original jive_alsa:

    Code: Select all

    cd /opt/squeezeplay/bin

    Code: Select all

    cp jive_alsa jiva_alsa_bak
  • get the attached file on your device
  • cd to directory containing file
  • issue the following command:

    Code: Select all

    sudo tar -xvf EnhancedDigitalOutput.tar.gz -C /opt/squeezeplay/share/jive/applets/
    
    • restart squeezeplay
Edit: before you install run,

Code: Select all

cat /proc/asound/cards 
and verify "MID" appears in square brackets for the first card, if not post the output here.

You make it sound so simple...8-)
The standard squeezeplayOS allows me to select the external USB "sound card" but if I can get my head round the above, I'll give it a go...
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by Wilberforce »

Yeah, the standard "squeezeplay os" external usb feature uses a modified asound.conf. This uses triodes method and the interface should be the same as you are used to on the touch i.e use settings -> audio settings -> digital output to select the usb dac. When you first run start squeezeplay after installation it should prompt you to select a device.

I'm not sure if the switching to the internal analog / speakers works as I use the internal spdif mod (it switches back to my spdif, but I'm curious as to why it doesn't select the analog device as default). It also appears ignore any settings in asound.conf.

If you wish to revert, simply delete the applet directory in /opt/squeezeplay/share/jive/applets/

If you would let me know if switches back to the internal speakers or not I'd appreciate it.

An easy way to get the file on your device (if its connected to the net):

Code: Select all

wget http://www.jogglerwiki.com/forum/download/file.php?id=324 -O EnhancedDigitalOutput.tar.gz 
Edit: it does seem to switch back to the internal speakers ( it was just respecting my alsamixer settings ie muted master) - so those running the spdif mod just use alsamixer or alsactl (if you love command line interfaces) to unmute spdif / mute your analog (depending on setup) - I guess this could be easily added to the interface if people think it would be useful.

P.P.S I would also like to extend my "mad props" to roobarb for his squeezeplay build instructions/ patches/ buildscripts.
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

I'll try this out, maybe this evening if I get the time...
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

All installed and the MDAC is recognised and lots of information about the DAC available... In Advanced it shows the MDAC as the output, but the DAC says "ready", but no sound, and the track doesn't play... have I done something wrong?
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by Wilberforce »

Sounds like you installed it ok - maybe we have hit a bug! Could you provide some logs?

edit /opt/squeezeplay/bin/squeezeplay.sh and change this:

Code: Select all

elif [ "$PLATFORM" = "sqpos" ]; then

	cd $INSTALL_DIR/bin
	#./jive &> /var/log/squeezeplay.log &
	./jive

to this:

Code: Select all

elif [ "$PLATFORM" = "sqpos" ]; then

	cd $INSTALL_DIR/bin
	./jive > /var/log/squeezeplay.log 
	#./jive

Then restart squeezeplay and upload /var/log/squeezeplay.log to here (or copy and paste in

Code: Select all

 tags).

Edit: changed to prevent people using wrong code
Last edited by Wilberforce on Tue Sep 25, 2012 9:35 pm, edited 1 time in total.
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

Oh dear... now I have broken it! I edited as above - but maybe fatal laziness was copying it over to windows and editing with notepad++ reloaded it and went for reboot. Its now cycling at 02 logo with some screen corruption stripes at the bottom.. then it goes blank, and re-appears. I think I need to reinstall squeezeplayOS and start again, which may be a good idea, as I've been messing with it quite a bit.
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by Wilberforce »

Sorry, was my fault (copy and pasted without checking). It should look like:

Code: Select all

elif [ "$PLATFORM" = "sqpos" ]; then

   cd $INSTALL_DIR/bin
   ./jive > /var/log/squeezeplay.log 
   #./jive

no &'s ! Are you running from a usb stick or internal flash? If you boot using another linux distro on usb stick you should be able to mount the broken partition and change the file back.

I'm not sure why that would cause the reboots though (would have thought it just dropped to a shell). You could maybe get away with doing a filesytem check on both partitions (could be a corrupted efi partition).
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

I'm running the internal version... makes it easier to install the USB DAC - not got a handy USB boot distro atm. The reinstall is quite speedy.
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

reinstalled a clean squeezeplayOS, but no edits to squeezeplay.sh this time it behaved rather more like my real SBT, and offered me the external USB DAC as a choice on boot. It then said rebooting, but hasn't rebooted after maybe 5 mins. I will now power cycle...
MDAC says ready... no sound.
I'll now edit my squeezeplay.sh and reboot...

its back to cyclic rebooting...

8-(

maybe time for bed...
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by Wilberforce »

I know why the reboot isn't working - thats an easy fix. Not sure why the changes to squeezeplay.sh are causing a boot loop though. Maybe it can't write to /var/log... If that is the case, you could try changing it to ./jive > /home/joggler/squeezeplay.log.

You could try using my image : http://www.jogglerwiki.com/forum/viewto ... ?f=2&t=605 , that will always be recoverable without having to reflash (when making these changes at least :D) - you can either log in via ssh or use a usb keyboard and switch to a different virtual console (ctrl + alt + f# , where # is a number)

Edit: heres a minor update to solve the reboot issue on "squeezeplay os" - i.e the non reboboting, when it said it would
Attachments
EnhancedDigitalOutput.tar.gz
(50.25 KiB) Downloaded 370 times
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

I didn't go to bed... 8-)
Tried a reinstall of squeezeplayOS, and then just the edit of the squeezeplay.sh and got cyclic boot. So, I'll try the alternative log location,
but maybe tomorrow as I'm dozing off at the keyboard now!
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by Wilberforce »

Careful with the reinstalls - dont want to burn out the flash :D Out of interest did you try switching back to Intel MID (internal card)? If so, did that work? - Slightly confusingly you select this in the Digital Out bit of audio settings (even if you want analog)

Another thing to check is that jive_alsa has been moved out of /opt/squeezeplay/applets/EnhancedDigitalOutput (it shouldn't be there if things went to plan). If it is still there, it may not of had the permissions to overwrite the current jive_alsa, so you could try copying it manually to /opt/squeezeplay/bin .

Maybe roobarb will pop by and explain how he enables squeezeplay logs :D
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

Tried the logging to a different point, still getting cyclic reboot...
I'll try the reinstall of the latest version tomorrow, and look to see if the jive_alsa has moved.
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

Wilberforce wrote:Careful with the reinstalls - dont want to burn out the flash :D Out of interest did you try switching back to Intel MID (internal card)? If so, did that work? - Slightly confusingly you select this in the Digital Out bit of audio settings (even if you want analog)

Another thing to check is that jive_alsa has been moved out of /opt/squeezeplay/applets/EnhancedDigitalOutput (it shouldn't be there if things went to plan). If it is still there, it may not of had the permissions to overwrite the current jive_alsa, so you could try copying it manually to /opt/squeezeplay/bin .

Maybe roobarb will pop by and explain how he enables squeezeplay logs :D
Back on the case, briefly, and after a beer fueled meeting down the pub...
I've reinstalled squeezeplayOS, installed the latest version of EDO, and yes the jive_alsa hadn't copied across, so I've done that manually...
about to reboot...

The reboot after selecting the MDAC now works, but still no sound output...

Its a bit odd that I can select internal or external interface from the audio settings, and the selection of MDAC is in the advanced menu, but no matter which way I set things, the MDAC says "Ready", and no sound... if I unplug the USB I get "Inactive". The info on the MDAC via the advanced menu shows the MDAC status as "Stop". I feel we are very close...
Post Reply