Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: andrew_a on November 15, 2013, 02:43:52 AM

Title: Is it possible to disable downsampling?
Post by: andrew_a on November 15, 2013, 02:43:52 AM
Hello guys!

I've got a rockboxed Toshiba Gigabeat F, and have an idea recently to take the digital signal from the processor and pass it to my standalone diy DAC (PCM 1742 KE) .
I like listening to hi-res and have all my music and lots of music to download in various hi-res formats.

So the question is - any possibility to simply disable downsampling to 16/44 ? - I've seen a similar topic here and read that there may be lots of problems with it.

And if not possible to just disable it - can the code be modified (by myself with your kind advices))) to output 24/96 instead of 16/44 ? all the time, all music - just switch the format - I suppose it must be much more simple than disabling conversion.. And yes, the Toshiba's DAC seem to support this bitrate/frequency.

Thank you! I like rockbox very much and want to use one of my favourite devices as a hi-res digital source.

Any thoughts/advices highly appreciated! :)
Title: Re: Is it possible to disable downsampling?
Post by: saratoga on November 15, 2013, 02:47:21 AM
How do you plan to use that DAC? 

I guess if you can wire it in, you can clock it at whatever you want and then hack up the output to be whatever you want.  It already supports 44.1k and 48k. 
Title: Re: Is it possible to disable downsampling?
Post by: andrew_a on November 15, 2013, 02:51:36 AM
If I understand you right (with my bad English)) - I want to:

1) hack the output from 16/44 to 24/96
2) take the digital signal from processor by wiring it out through the dock and right inside to my DAC to the input pins of 1742 KE chip (haven't checked it for compatibility yet, but suppose it should do)
3) to still be able to use internal DAC at new frequencies - maybe it would sound even better?

Thank you for such fast answer!

Can you help me please with hacking th format?
Title: Re: Is it possible to disable downsampling?
Post by: saratoga on November 15, 2013, 03:06:20 AM
1) hack the output from 16/44 to 24/96
2) take the digital signal from processor by wiring it out through the dock and right inside to my DAC to the input pins of 1742 KE chip (haven't checked it for compatibility yet, but suppose it should do)

Get step 2 working first.  Thats the difficult step.  Then if you want, try 1.  Don't bother though until 2 is finished. 

3) to still be able to use internal DAC at new frequencies - maybe it would sound even better?

Right now, the driver says it can only do 22/44/88 khz.  My guess is that the clock dividers are not present for 24/48/96 frequencies, but perhaps that could be hacked in with enough effort.  The F port is ancient, i don't know all the details. 

But no, it won't sound better.  There is no performance improvement to running the clocks higher, it just wastes power. 
Title: Re: Is it possible to disable downsampling?
Post by: andrew_a on November 15, 2013, 03:35:50 AM
Ok, got it, thanks!

I think I'll re-consider the need of connecting external DAC ... maybe there's an easier way to get a 24/96 source (buy another pc for example))

p.s. still wondering if it is very hard to hack the output? to 24/88 for example ? (isn't it just as simple as changing the values in the code? =)))

Title: Re: Is it possible to disable downsampling?
Post by: andrew_a on December 03, 2013, 04:21:21 AM
Hello guys,

another thing I decided to do - add a MAX 9722 OPA to improve the headphone output.

Still wondering if you could help me to raise sample rates?

Thanks!
Title: Re: Is it possible to disable downsampling?
Post by: saratoga on December 03, 2013, 12:53:14 PM
Looking at that DAC, I think it detects the oversampling ratio automatically from the clock you provide it and the I2S signal.  So I guess get the I2S signal working at 44.1khz with 512x oversampling.  Then build with test_plugins enabled, load test_sampr, and set the sample rate to 88.2KHz.  If everything is working, you should hear the test tone at the right frequency played back at 256x oversampling instead of 512.  You should be able to get this far hopefully without changing anything in the code. 
Title: Re: Is it possible to disable downsampling?
Post by: cataclem on August 07, 2015, 01:14:03 PM
hello!

sorry if i ask a question?
i have an ipod video(classic, 5.5) which i rockboxed and i tested it with 24/96 files which it reads very well (actually this files sound better even downsampled then 16/44, same tune); 24/192 have gaps in playing (i need probably to maximize the buffer?)
but my question is if you really can play files at default quality...

thank you!
Title: Re: Is it possible to disable downsampling?
Post by: saratoga on August 07, 2015, 01:43:33 PM
Your CPU might not be fast enough to decode them.  If they are 5.1, make sure you downsample to stereo first.

It'd be more efficient to downsample to 44.1k/48k first though, since that is what rockbox is resampling to. 
Title: Re: Is it possible to disable downsampling?
Post by: cataclem on August 08, 2015, 02:39:52 AM
i don't use 5.1 files, just stereo wav or flac.
i'm not a developer, so i don't know how to modify rockbox source.
my ask was about it is possible to disable downsample or to make an audiophile edition without downsample...

thank you!

anyway, rockbox is an incredible ipod firmware :)