maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   FLAC handling - a few questions (https://talk.maemo.org/showthread.php?t=67726)

punto 2010-12-31 23:23

FLAC handling - a few questions
 
Happy new year everyone.

A few questions for the N900 nuts & bolts knowledgeable out there - how does the N900 with the FLAC filter handle high-bitrate FLACs?

They're playing fine in Media Player but they just sound 'off' for some reason. There's a sort of fuzziness about the sound that I wouldn't expect.

How does the N900 go about playing back e.g. 88khz, 24-bit FLACs? Does any resampling take place? If so, what component is responsible for that?

seppoi 2011-01-05 07:25

Re: FLAC handling - a few questions
 
Please look at /etc/pulse/daemon.conf

From there you'll see that PulseAudio converts all the output to ALSA to 48 kHz 16 bit stereo. The algorithm seems to be speex-fixed-2. It could be changed for higher quality but the load could increase a lot. Only this conversion has been optimized the Cortex-A8 CPU.

Your 88.1 kHz FLACs are quite challenging if there's lot of energy beyond 20 kHz. It would be better to resample and re-encode them for N900 for best result to 48 kHz/24 bit FLAC with some external high-quality re-sampler (sox?). The > 16 bit format could be beneficial to avoid quantization noise if the conversion tools are not applying proper dithering/noise shaping. The 88.1/24 stuff is high-end I assume and therefore the extra caution.

jerryfreak 2011-01-05 07:56

Re: FLAC handling - a few questions
 
please note that the new rockbox port for n900 has a 'dither' feature but im not sure if/how it works.

i kinda remember trying to play 24/96 files and media player choking, but it may be my memory choking...

punto 2011-01-05 09:36

Re: FLAC handling - a few questions
 
Quote:

Originally Posted by seppoi (Post 911986)
Please look at /etc/pulse/daemon.conf

From there you'll see that PulseAudio converts all the output to ALSA to 48 kHz 16 bit stereo. The algorithm seems to be speex-fixed-2. It could be changed for higher quality but the load could increase a lot. Only this conversion has been optimized the Cortex-A8 CPU.

Your 88.1 kHz FLACs are quite challenging if there's lot of energy beyond 20 kHz. It would be better to resample and re-encode them for N900 for best result to 48 kHz/24 bit FLAC with some external high-quality re-sampler (sox?). The > 16 bit format could be beneficial to avoid quantization noise if the conversion tools are not applying proper dithering/noise shaping. The 88.1/24 stuff is high-end I assume and therefore the extra caution.

Many thanks for the comment. I understand the situation better - it's hard to know from an absolute perspective how much load all this should impose.

Given the FLAC support and also given the comparatively fast USB transfer rates of the N900, I've been dabbling with trying to play back my vinyl rips and also high-res downloads. Transcoding isn't really an option - too much hassle maintaining three libraries (currently FLAC + lossy).

Given that, I guess I should stick to the lossy transcodes. Oh well, it was a nice idea while it lasted.

So is 16b/44.1khz resampled to 16b/48khz too?

seppoi 2011-01-06 18:58

Re: FLAC handling - a few questions
 
Yes, 44.1 kHz is upsampled to 48 kHz during playback.

I keep my lossless CD rips in 44.1/16 FLAC format and maintain lossy 48 kHz mp3 copies for portable devices. There is option --resample 48000 in lame. I have checked that the frequency response and dynamic range are as good as in a 44.1 decoded output.

88.1 is a bit of overkill for vinyl rips if the ADC is good quality (anti-alias etc.). There is not much point in better than 48/24 format for the end user.

Also 96 kHz could be a better choise for high-endism and intermediate format IMHO. N900 sounds quite OK with 96/24 FLACs. Decimation by 2 is much less complex than 88.1 to 48.

punto 2011-01-06 22:14

Re: FLAC handling - a few questions
 
Yup, I can't disagree with your post. Transcoding isn't, unfortunately however an option.

I notice other issues with N900 audio as well, but I guess this is the final nail in the coffin for even 44.1 playback - the iPhone does do a better job for example. In theory am I right in saying the N900 should be better? If so, is it just the pulseaudio implementation that is holding it back?

seppoi 2011-01-07 08:13

Re: FLAC handling - a few questions
 
Quote:

Originally Posted by punto (Post 913717)
I notice other issues with N900 audio as well, but I guess this is the final nail in the coffin for even 44.1 playback - the iPhone does do a better job for example.

The upsampler there is high quality. Is there some particular reason you think that? N900 is significantly better than iPhone3G in most parameters (I dunno how reliable these are in absolute scale -- but at least the same setup has been used in measurements):

http://www.gsmarena.com/nokia_n900-review-421p7.php

Even IPhone4 is still weaker in some parameters such as noise and DR.

http://www.gsmarena.com/apple_iphone_4-review-490p7.php

Quote:

Originally Posted by punto (Post 913717)
In theory am I right in saying the N900 should be better? If so, is it just the pulseaudio implementation that is holding it back?

Nope, I just pointed to optimal conditions for best possible results since using FLAC sounds to me like you seek that!

punto 2011-01-07 11:46

Re: FLAC handling - a few questions
 
Quote:

Originally Posted by seppoi (Post 913983)
The upsampler there is high quality. Is there some particular reason you think that? N900 is significantly better than iPhone3G in most parameters (I dunno how reliable these are in absolute scale -- but at least the same setup has been used in measurements):

http://www.gsmarena.com/nokia_n900-review-421p7.php

Even IPhone4 is still weaker in some parameters such as noise and DR.

http://www.gsmarena.com/apple_iphone_4-review-490p7.php



Nope, I just pointed to optimal conditions for best possible results since using FLAC sounds to me like you seek that!

Those tests are worthless - as you'll note here http://www.gsmarena.com/latest_featu...view-171p2.php they finally pegged onto the fact that to run an actually worthwhile test, you have to insert a headphone load into the audio chain - there is zero point in connecting it up to a 10kohm load to test audio quality which 99.999999999% of users will experience with headphones.

I don't even need to run RMAA (although what the heck, I might for BoostN900 - because I think it might come out to be a joke of epic proportions) to hear that the N900 has audibly worse SQ than the iPhone 4 with a FLAC vs ALAC and in MP3 / Ogg (for Spotify) - and not always as a constant, but in terms of added distortion at times. Which is why I suspect the firmware far more than the hardware. Maybe GMSArena will get around to running the N900 with a 32ohm load with different codecs some day...

seppoi 2011-01-07 17:18

Re: FLAC handling - a few questions
 
Oh, I thought the previous tests were done with some headphone like resistive load because some phones still demonstrated poor low frequency response. You are right, the response and distortion measurements there are worthless. Should have noticed that from the distortion and crosstalk figures :^P

Vague idea: Are your headphone contacts clean?

punto 2011-01-07 21:11

Re: FLAC handling - a few questions
 
Quote:

Originally Posted by seppoi (Post 914240)
Oh, I thought the previous tests were done with some headphone like resistive load because some phones still demonstrated poor low frequency response. You are right, the response and distortion measurements there are worthless. Should have noticed that from the distortion and crosstalk figures :^P

Vague idea: Are your headphone contacts clean?

I can tell the difference between contact crackle and distortion, thank you very much :p

punto 2011-01-08 19:10

Re: FLAC handling - a few questions
 
Just RMAA'd on a fairly casual basis - a 32-ohm load in the audio chain (iPod earphones), N900 set to full volume, iPhone 4G matched to that volume.

It does NOT look pretty - the iPhone blows away the N900, especially for distortion as I suspected. In other respects (dynamic range) it's barely better, but the fact is everything is better.

I think this pretty much ends the N900's viability for me, audio-wise, for anything but podcasts and streaming comedy shows in QSpot in the bath.

EDIT - A curveball update: It appears that however the N900 configures itself when a headSET is plugged in, the audio behaviour ends up being better than if the phone component of the headSET (if it were possible - I'm using a jack-converted WH-205) were to be plugged into the N900's socket.
http://talk.maemo.org/showthread.php...290#post915290.

seppoi 2011-01-09 08:20

Re: FLAC handling - a few questions
 
Really weird thing you discovered. And the normal three pole 3.5mm plug you used is mechanically and electrically OK (there may be several gnd contacts inside)? Likely is since it sounds you know what you are doing...

punto 2011-01-09 11:24

Re: FLAC handling - a few questions
 
Yeah it is isn't it - you'd logically expect a measurement directly from the headphone socket to be better.

However, the N900 has separate volume modes for headPHONE and headSET, and my suspicion is still with the firmware: It appears that somewhere along the line gain is being hiked up too much, introducing distortion into the mix - and perhaps it's being done less in headSET mode.

Would be good if someone could find a way to solve it via alsamixer...?


All times are GMT. The time now is 18:20.

vBulletin® Version 3.8.8