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.
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by Wilberforce »

If it lacked the permissions to overwrite, you could try giving all users the ability to execute jive_alsa:

Code: Select all

sudo chmod 777 /opt/squeezeplay/bin/jive_alsa
and try running jive_alsa (maybe its's complaining about missing libs)

Code: Select all

/opt/squeezeplay/bin/jive_alsa
It should give you a list of command line options, post any errors here.

if no errors try disabling the applet and seeing if audio works:

Code: Select all

 sudo chmod a-x /opt/squeezeplay/applets/EnhancedDigitalOutput 
(that will make sure squeezeplay doesn't find the applet)

to re-enable:

Code: Select all

 sudo chmod a+x /opt/squeezeplay/applets/EnhancedDigitalOutput 
also try removing you asound.conf

Code: Select all

 sudo mv /etc/asound.conf /etc/asound.conf.bak 
and don't use the interface configuration in audio settings as that will regen the asound.conf (only use the option 'digital output' to switch between devices)
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by Wilberforce »

Turns out it was my fault! Just noticed I left my crude work around for my USB headset, which was labled as default (this caused a bug in the original code), and that broke support for all cards not labelled default! I'll release a new version soon and you shouldn't need to do any of the above!
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by Wilberforce »

Ok here is a version that should now work. Same as before:

Code: Select all

cd ~
wget http://www.jogglerwiki.com/forum/download/file.php?id=329 -O EnhancedDigitalOutput.tar.gz 
sudo tar -xvf EnhancedDigitalOutput.tar.gz -C /opt/squeezeplay/share/jive/applets/ --overwrite 
This may still apply:
also try removing you asound.conf

Code: Select all
sudo mv /etc/asound.conf /etc/asound.conf.bak

and don't use the 'interface configuration' in audio settings as that will regen the asound.conf (only use the option 'digital output' to switch between devices - including the internal card (for analog or digital) )

Attachments
EnhancedDigitalOutput.tar.gz
(50.25 KiB) Downloaded 1547 times
Last edited by Wilberforce on Thu Sep 27, 2012 2:12 pm, edited 2 times in total.
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

Many thanks... got yet more meetings tonight, but will try to get this loaded before bedtime...
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

Bingo!!! now playing Natalie Merchant in full 24bit/96kHz glory!!! Many many thanks. Will do some listening tests, but I'm sure it will sound identical to my "real" SBT, and the big screen looks good on the rack. Happy!!!
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by Wilberforce »

Glad we got it working in the end!
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

Now I've got this working, other SBT fans want one... how easy would it be to build a USB stick that installs squeezeplayOS and the EDO in one hit?
User avatar
JimbobVFR400
Posts: 264
Joined: Fri Jul 20, 2012 8:39 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by JimbobVFR400 »

Do you use squeezeplayOS from a USB stick or have you installed in internally?

If you run from a stick then Win32Discimage that you used to flash your stick in the first place can also take a backup of your stick as it is now including EDO. I'm not sure if EDO would write any changes or config from your own DAC being plugged in but I'd have thought it would detect any new DAC plugged in as it did when you plugged yours in.

If you run from internal flash then I'm not sure, I suspect it'll be far more complicated, probably easier to to just install SqPOS as normal then add EDO as per this thread.
themystical
Posts: 81
Joined: Mon Sep 17, 2012 2:55 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by themystical »

I understand that Triode's original patch allowed streaming of up to 192k via coax spdif and a lot of Touch owners reported an improvement in SQ for all sampling rates (although Triode does not claim this - audiophoolery/placebo anyone?) Would applying this patch achieve 192k streaming over SPDIF or is a different patch also required for LMS to make this happen?
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

JimbobVFR400 wrote:Do you use squeezeplayOS from a USB stick or have you installed in internally?

If you run from a stick then Win32Discimage that you used to flash your stick in the first place can also take a backup of your stick as it is now including EDO. I'm not sure if EDO would write any changes or config from your own DAC being plugged in but I'd have thought it would detect any new DAC plugged in as it did when you plugged yours in.

If you run from internal flash then I'm not sure, I suspect it'll be far more complicated, probably easier to to just install SqPOS as normal then add EDO as per this thread.
Internal, as it makes plugging in the DAC more elegant!
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by Wilberforce »

themystical wrote:I understand that Triode's original patch allowed streaming of up to 192k via coax spdif and a lot of Touch owners reported an improvement in SQ for all sampling rates (although Triode does not claim this - audiophoolery/placebo anyone?) Would applying this patch achieve 192k streaming over SPDIF or is a different patch also required for LMS to make this happen?
For 192khz, you need to patch your logitech media server. Checkout this patch for /usr/share/perl5/Slim/Player/Squeezebox2.pm:

https://github.com/terual/slimpy/blob/m ... 2kHz.patch

Don't forget the hardware limitation of 96khz on the jogglers spdif though (you'd need a usb dac capable of 192khz to make this worthwhile).
themystical
Posts: 81
Joined: Mon Sep 17, 2012 2:55 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by themystical »

I installed Wilberforce's patch without any issues and noticed a biggish improvement in SQ. I was surprised that the Joggler through the SPDIF now sounds as good as if not better than the same file streamed to my PS3 which was not the case before. To investigate whether this was placebo or not, I put an oscilloscope ( a basic one that I have but seldom use) on the SPDIF output. I then played various files (MP3, 44.1k FLAC, 96k FLAC and 192k FLAC) through the Joggler and tried to measure the period of the waveforms, the inverse of which computes the frequency.
On first look, I was surprised at how bad the waveform was, sawtooth rather than square, and three waveforms rather than 1, 2 of which appeared like shadows. On searching the net, I found the Lampizator site which showed waveforms taken by him on the SPDIF's of CD players and was relieved to see that some of the commercial CD players have similar waveforms. This is probably to do with impedance matching and the use of RCA connector rathen then 75 Ohm coaxial. Anyway, the DAC has absolutely no problem locking on the signal so no urgency to research a better SPDIF output waveform.
The result of the measurements were that both the MP3 and 44.1k FLAC were outputting at 44.1k or 48k. It is difficult to tell the frequecies apart in the oscilloscope that I have with the difference in time period too small to see by eye. Both the 96k and 192k files were outputting at 96k which confirms that a patch is required for LMS as stated by Wilberforce above. Now I dont have the equipment to measure whether the output is 16 bit or 24 bit but I believe that Jemhayward has previously confirmed that applying this patch enabled output at 24 bit from the previous 16. I cant be sure but I suspect that if the previous output via USB was limited to 16 bit by the Joggler, than the same would apply to the SPDIF so the improvement in SQ might come from the increase in bits. I know some of this is speculation but hey, if it sound better to me than that is no bad thing so I recommend this mod to the people who have already made the SPDIF mod.
One thing I was going to do when time permitted was to put an oscilloscope to the SPDIF output whilst running the Joggler on PnP3 Squeezeplay and check whether that actually outputs at 96k.
Also want to investigate the 192k patch for LMS (not that I have any media files at 192k apart from a single test file) but if that could be made to work than the job is a goodun and fullun! I suspect that the 96k hardware limitation on the joggler's spdif only applies to the optical output and not the coax one but we shall see........
User avatar
JimbobVFR400
Posts: 264
Joined: Fri Jul 20, 2012 8:39 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by JimbobVFR400 »

Awesome I'll give it a try with my SPDIF modded joggler and see if I notice a difference.
I don't think you'll get better than 96 out of the RCA SPDIF because the limitation to 96 is the chip in the joggler, the poster above has a USB DAC which is how higher bit rates are achieved.
themystical
Posts: 81
Joined: Mon Sep 17, 2012 2:55 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by themystical »

I put an oscilloscope on the SPDIF output whilst running on PnP111 and it outputs at 96k when 96k files are played. When 192k files are played, it defaults to 44.1k rather than the 96k with EDO patch applied. For normal audio files below 96k, the only reason for a difference in SQ can be the number of bits it transmits, 24 over 16.
themystical
Posts: 81
Joined: Mon Sep 17, 2012 2:55 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by themystical »

Wilberforce wrote: For 192khz, you need to patch your logitech media server. Checkout this patch for /usr/share/perl5/Slim/Player/Squeezebox2.pm:

https://github.com/terual/slimpy/blob/m ... 2kHz.patch

Don't forget the hardware limitation of 96khz on the jogglers spdif though (you'd need a usb dac capable of 192khz to make this worthwhile).
Not knowing how to apply this patch, I created a back up copy of the Squeezebox2.pm file. I then edited the original file to add the two lines for 192k and 174k in the correct position within the file and saved. Rebooted and checked whether I was outputting 192k which was negative. (Still at 96k). Is there anything else from the patch that I would need to ammend the file with? Is there a proper way of applying this patch?
If all I have done is ok, then the audio chip might be enforcing the limit in the hardware and I might have to give up on this?
PS the reason that most manufacturers quote 192k as not being possible with their hardware is because it is a hardware limitation on the optical connection, not the coax and I guess manufacturers can only specify/claim SPDIF at 192k if they can make it work in both its guises (rather than confuse consumers. This is the reason I am reluctant to see this as a hardware impossibility.
User avatar
JimbobVFR400
Posts: 264
Joined: Fri Jul 20, 2012 8:39 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by JimbobVFR400 »

If you search for the data sheet for the audio chip (think it's a stac9202 off the top of my head) it says the SPDIF output on the chip is 96k max. Irrespective of my optical or your coax we've both soldered to the same legs of the chip. So yes I really do believe it's a hardware limitation in this case. The dac in the chip is capable of 192k though.
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

Decided to do some final testing as my Joggler is about to get redeployed into the new bathroom!
Connected to the Audiolab MDAC the Joggler SqueezeplayOS EDO doesn't pass the bit perfect test 8-(
The "real" SBT does, so we've got 99.9% there. It still sounds fine in my very revealing system, so I'd still recommend it.
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by Wilberforce »

Try playing the test file directly on the joggler with aplay (to rule out squeezeplay):

Code: Select all

aplay -D hw:1,0 test_file.wav
To do this you will probably need to stop squeezeplay from running. A method to do this:

Code: Select all

cd ~
mv .xinitrc .xinitrc.bak
reboot and try your test files. You can then restore your .xinitrc to get squeezeplay to load up on boot again:

Code: Select all

cd ~
mv .xinitrc.bak .xinitrc
jemhayward
Posts: 40
Joined: Thu Aug 30, 2012 1:46 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by jemhayward »

I'll give that a go next week - busy weekend ahead!
papaiannis
Posts: 66
Joined: Tue May 15, 2012 9:53 pm

Re: 24/96 Squeezeplay and External USB DAC

Post by papaiannis »

I use the SPDIF output of my spdif-modified Joggler. Everything worked well after having unmuted spdif (card 0, device 1).
I decided to try wilvberforce's applet. Thus:
- I've installed wilberforce's applet.
- I've done chmod 777 on jive_alsa.
- I've removed existent asound.conf

When I first rebooted the joggler after the applet install, I was asked to select the output, and only the [MIDI] device appeared.
Unfortunately I get no sound any longer.
Is it normal to get the [MIDI] device listed? What could be wrong?
Please note that I have not connected any USB external device.
Any help would be much appreciated.

Alekos
Post Reply