Rockbox Technical Forums

Support and General Use => Hardware => Topic started by: jdc on November 27, 2010, 05:22:41 PM

Title: Clip+ DC offset
Post by: jdc on November 27, 2010, 05:22:41 PM
Hi, I've been hearing little squeaks when I pause my Clip+ and occasionally when playing so I decided to measure the DC offset. While playing it appears to be about 5mV but when I pause it it settles on anything from 0 to 60mV offset. I booted the original firmware and it seems to be 0.1mV while playing then 0mV when paused. Is this a problem? I imagine it is especially when amplified you could have upwards of 600mV. I'm not sure if it's related but a pair of IEMs I used almost exclusively with rockbox on this Clip+ have one channel partially broken (way quieter then the otherside).

Sansa Clip+ 8GB with rockbox 3.7

I apologize if this isn't hardware issue because I wasn't sure.

Cheers,
James
Title: Re: Clip+ DC offset
Post by: saratoga on November 27, 2010, 09:01:08 PM
Hi, I've been hearing little squeaks when I pause my Clip+ and occasionally when playing so I decided to measure the DC offset. While playing it appears to be about 5mV but when I pause it it settles on anything from 0 to 60mV offset.

How are you measuring this?  With or without headphones connected?

I booted the original firmware and it seems to be 0.1mV while playing then 0mV when paused. Is this a problem?

Hard to say without knowing what you measured, but 60mV into 16 ohms is 225 microwatts, not exactly a huge amount of power.  Might be worth looking into how the OF does it though.
Title: Re: Clip+ DC offset
Post by: jdc on November 28, 2010, 12:08:57 AM
I'm just measuring between ground and each channel with my multimeter. I brought it up because from what I've read making headphone amps you want the DC offset to be less than 20mV otherwise you can damage your headphones. It seems strange that it happens with rockbox and not the OF. I'll double check it tonight to makes sure i haven't made any errors.
Title: Re: Clip+ DC offset
Post by: saratoga on November 28, 2010, 12:11:44 AM
If you measure like that the output is basically floating.  Try putting a pair of headphones in there and see if theres still a DC offset when the output isn't floating.
Title: Re: Clip+ DC offset
Post by: jdc on November 28, 2010, 12:34:05 AM
ah yes you're quite correct I'll tie each channel to ground with a 1k resistor and see what I measure.

edit: tried that, no change. would it be possible that rockbox stays at the current sample when paused rather going to zero?

edit 2: turns out I had OF volume turned down compared to Rockbox so I turned it up and it measured the same 5mV approx while playing but went to zero when paused. I am thinking it could be the above because it varies every time it is paused and once paused it goes up and down as I change the volume. The worst I measured was 240mV with rockbox turned up to max.
Title: Re: Clip+ DC offset
Post by: Carson Dyle on December 19, 2010, 07:49:20 AM
Found this thread after doing a number of searches.

I hear what must be the same thing on my Fuze v2 when pausing.  It's not present, however, when Fade on Stop/Pause is disabled.  It happens what seems like a second or two after the music stops.  Could be right at the end of the fade out.  Also happens at the start of resuming playback of a paused track.

Rockbox 3.7.1 and the IEMs being used are MEElectronics M11+, if that's relevant.
Title: Re: Clip+ DC offset
Post by: jdc on December 19, 2010, 06:29:58 PM
Yip that's exactly what I get, a little squeak just at the end of fade out and again when it is unpaused. I have since started a flyspray on the topic http://www.rockbox.org/tracker/task/11812 and discussed it on Head-Fi http://www.head-fi.org/forum/thread/528329/clip-dc-offset
Title: Re: Clip+ DC offset
Post by: Carson Dyle on December 19, 2010, 06:42:33 PM
I'm surprised that the developers don't hear this since it happens with the default setting of fade enabled.

Could it be the results of some new hardware rev on the Clip+ and Fuze?
Title: Re: Clip+ DC offset
Post by: Llorean on December 19, 2010, 06:43:58 PM
Some pops and other noises also only show up clearly in certain headphones, while being lost in others.
Title: Re: Clip+ DC offset
Post by: saratoga on December 19, 2010, 06:49:44 PM
I just tried it with 16 ohm IEMs and with the same IEMs and an 80 ohm impedance adapter.  Theres a very noticeable glitch without the impedance adapter, but nothing with it. 

I'm pretty sure this didn't use to happen.   
Title: Re: Clip+ DC offset
Post by: jdc on December 19, 2010, 09:07:32 PM
Yeah I don't think I remember it happening either. How would I got about installing say 3.6 again to test it?
Title: Re: Clip+ DC offset
Post by: yapper on December 19, 2010, 09:43:47 PM
http://download.rockbox.org/release/
Title: Re: Clip+ DC offset
Post by: saratoga on December 19, 2010, 10:01:40 PM
Yeah I don't think I remember it happening either. How would I got about installing say 3.6 again to test it?

Well 3.6 never ran on the Clip+, so thats not going to work.  You'd have to build an old version from source, or else find one mirrored somewhere.
Title: Re: Clip+ DC offset
Post by: jdc on December 19, 2010, 11:37:01 PM
Righto I found I had r27228 on my computer so I installed that and it made no difference. But what I did find was that there is no squeak in silent parts of the music and none at all on a track of silence I have, so I do think the squeak is related to the offset as it was similar. Also I think there may be a squeak without fade to pause on as well but you just can't hear it over the music.
Title: Re: Clip+ DC offset
Post by: Carson Dyle on January 03, 2011, 05:44:34 PM
I just noticed on my Fuze that when it's paused adjusting the volume level results in a distinct clicking sound that can be heard at each volume increment at the upper levels.  (Keyclicks are Off in the settings.)  Could the cause for this noise be the same thing?
Title: Re: Clip+ DC offset
Post by: saratoga on January 03, 2011, 05:50:44 PM
I just noticed on my Fuze that when it's paused adjusting the volume level results in a distinct clicking sound that can be heard at each volume increment at the upper levels. 

If you have a DC offset and you change it, thats will produce a click sound. 
Title: Re: Clip+ DC offset
Post by: bertrik on January 04, 2011, 12:17:59 PM
Two things I'd like to reply on: 1) clicks/beeps on volume change 2) DC offset. IMO, these are related, but different things.

Regarding 1), there is a ZCU bit (zero-cross update) in the audio codec used in the AMS sansas. This bit should apply volume changes only on a zero crossing (when the amplitude is near zero). I have no idea though if we currently use it. Also if enabled, I don't know if the volume change is applied anyway when no zero crossing happens, I vaguely remember from reading the AMSv2 codec specifications that a volume change is applied anyway within a few ms if there is no zero crossing.
Solution: check in the code if we use the ZCU mechanism and enable it if not, possibly check what the OF does.

Regarding 2), the AMS sansas (both AMSv1 and AMSv2) use a capacitor-less system of connecting the amplifier to the headphones. They also use a kind of virtual ground for the headphones. Things we could do here is (just some ideas): 1) send a 0-sample after the last sample 2) check the datasheet to see if we can power down the codec with 0 DC output (but probably we want audio to stay enabled for voice when paused)  3) check the datasheet for other ideas.
Title: Re: Clip+ DC offset
Post by: mc2739 on January 04, 2011, 11:43:09 PM
Regarding 1), there is a ZCU bit (zero-cross update) in the audio codec used in the AMS sansas. This bit should apply volume changes only on a zero crossing (when the amplitude is near zero). I have no idea though if we currently use it.

In current SVN, ZCU is set to off for AS3525 (AMSv1) devices. (firmware/drivers/audio/as3514.c - line 205)

ZCU is enabled for non-AS3525 devices.  AS3543 (AMSv2) does not appear to have ZCU.