Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Recording
| | |-+  inverted phases on iaudio x5
« previous next »
  • Print
Pages: [1] 2 3

Author Topic: inverted phases on iaudio x5  (Read 9853 times)

Offline z-man

  • Member
  • *
  • Posts: 9
    • Z-Man's home
inverted phases on iaudio x5
« on: July 18, 2008, 06:31:31 PM »
It sounds like for some strange reason the hardware of the X5 is inverting the phase of the recorded signal. Interestingly, changing

tlv320_write_reg(REG_DAIF, DAIF_IWL_16 | DAIF_FOR_I2S);
to
tlv320_write_reg(REG_DAIF, DAIF_IWL_16 | DAIF_FOR_I2S & 0x7e);

and this way switching to [MSB first, _right_ aligned] seems to compensate the inversion and gives me the feeling of being much closer to the original.
Logged

Offline soap

  • Member
  • *
  • Posts: 1678
  • Creature of habit.
Re: inverted phases on iaudio x5
« Reply #1 on: July 18, 2008, 06:58:01 PM »
Not to knock your feelings, but should this not be easy to conclusively test?
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: inverted phases on iaudio x5
« Reply #2 on: July 18, 2008, 07:02:41 PM »
What do you mean that it "sounds" like it's inverting the phase?  A phase inversion should not produce any audible difference.
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline petur

  • Developer
  • Member
  • *
  • Posts: 769
  • wtb: time
Re: inverted phases on iaudio x5
« Reply #3 on: July 19, 2008, 07:16:22 AM »
Quote from: Chronon on July 18, 2008, 07:02:41 PM
What do you mean that it "sounds" like it's inverting the phase?  A phase inversion should not produce any audible difference.

unless only done on one of the two channels....

imho, this can/should be tested by feeding it a sine and checking the result
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: inverted phases on iaudio x5
« Reply #4 on: July 19, 2008, 07:59:15 PM »
petur: that's fair. But this should be easy to check.  Set the output in Rockbox to a mono setting.  Then put two speakers facing each other and if cancel each other out then they're phase inverted from each other.  If the sound adds then they're in phase.  Or put the signals on an oscilloscope.
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: inverted phases on iaudio x5
« Reply #5 on: July 20, 2008, 12:01:12 AM »
Quote from: Chronon on July 19, 2008, 07:59:15 PM
petur: that's fair. But this should be easy to check.  Set the output in Rockbox to a mono setting.  Then put two speakers facing each other and if cancel each other out

They'll still cancel each other out if they're phase inverted or not, only the location of the regions where constructive and destructive adding occurs will change.

Just record the same tone in both channels and look at it in an audio editor.  Should be pretty obvious if the phase is inverted in only one channel. 
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: inverted phases on iaudio x5
« Reply #6 on: July 20, 2008, 12:39:07 AM »
Have you carried out this experiment?  There's a stark difference between two in-phase sources and two sources with a phase difference of pi.  For two speakers that are close to each other the superposed waves will exhibit constructive interference almost everywhere for in-phase waves.  If you switch the polarity on one speaker then the situation changes and you will get destructive interference almost everywhere.  This works well enough that everyone in an auditorium will hear the expected change in volume when you switch the polarity of one speaker.

Good point about using an audio editor to compare the two channels.  That seems like the best approach -- and makes the above paragraph of only academic interest.
« Last Edit: July 20, 2008, 12:43:04 AM by Chronon »
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: inverted phases on iaudio x5
« Reply #7 on: July 20, 2008, 02:49:04 AM »
Quote from: Chronon on July 20, 2008, 12:39:07 AM
Have you carried out this experiment?

Every day.  I build interferometers as my day job.

(far field diffraction pattern of two sources is the inverse fourier transform of a pair of delta functions, and thus cosine if they're in phase and a sin if they're out of phase.)

Quote from: Chronon on July 20, 2008, 12:39:07 AM
For two speakers that are close to each other the superposed waves will exhibit constructive interference almost everywhere for in-phase waves.  If you switch the polarity on one speaker then the situation changes and you will get destructive interference almost everywhere.  This works well enough that everyone in an auditorium will hear the expected change in volume when you switch the polarity of one speaker.

This would work much better then putting them facing each other.  in this case all you have to do is step onto the optical axis (e.g. the origin) and see if its quiet (sin) or not (cos).  I agree that its still easier to do it digitally though, you'd probably have a lot of trouble with reflections off the walls of your room unless you've got a very large space to try this in.
Logged

Offline z-man

  • Member
  • *
  • Posts: 9
    • Z-Man's home
Re: inverted phases on iaudio x5
« Reply #8 on: July 20, 2008, 06:52:04 AM »
Quote from: saratoga on July 20, 2008, 12:01:12 AM
Just record the same tone in both channels and look at it in an audio editor.  Should be pretty obvious if the phase is inverted in only one channel. 

Did it. _BOTH_ channels appear to be inverted.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: inverted phases on iaudio x5
« Reply #9 on: July 20, 2008, 07:58:21 PM »
Quote from: z-man on July 20, 2008, 06:52:04 AM
Quote from: saratoga on July 20, 2008, 12:01:12 AM
Just record the same tone in both channels and look at it in an audio editor.  Should be pretty obvious if the phase is inverted in only one channel. 

Did it. _BOTH_ channels appear to be inverted.

And you're certain they're not both non-inverted?  I guess you checked a less symmetric signal then a sin wave.
Logged

Offline soap

  • Member
  • *
  • Posts: 1678
  • Creature of habit.
Re: inverted phases on iaudio x5
« Reply #10 on: July 20, 2008, 08:11:44 PM »
Wouldn't creating a DC offset sine wave for this test be easy enough?
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: inverted phases on iaudio x5
« Reply #11 on: July 20, 2008, 08:43:40 PM »
Assuming it records the DC level that would work.  It might filter out the DC via coupling capacitor or similar though.
Logged

Offline z-man

  • Member
  • *
  • Posts: 9
    • Z-Man's home
Re: inverted phases on iaudio x5
« Reply #12 on: July 21, 2008, 08:44:28 AM »
Quote from: saratoga on July 20, 2008, 07:58:21 PM

And you're certain they're not both non-inverted?  I guess you checked a less symmetric signal then a sin wave.

Yes, I'm sure. And please: Normally, I would be able to identify my wife not just because she has something that I don't have. Thus, looking at the signal with audacity and enough spreading enabled doesn't need a sin wave to tell whether it is inverted or not. But you're right, keeping things simple can't be a bad idea, and so I recorded an almost sin like wave from a keyboard onto my reel to reel tape. Next, I connected the analog output of the tape to the analog inputs of
- the Cowon X5
- a Sony Hi-Md walkman
- a Soundblaster Live soundcard
- a Steinberg Mi4 audio interface

Result: Compared to the other 3 devices the X5 signal is inverted.
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: inverted phases on iaudio x5
« Reply #13 on: July 21, 2008, 04:57:10 PM »
Does the X5 use inverting op-amps in the amplification stage?  It seems that there are no real-world situations where this will be audible anyway, so I'm somewhat missing the point here.
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: inverted phases on iaudio x5
« Reply #14 on: July 21, 2008, 05:35:33 PM »
Quote from: z-man on July 21, 2008, 08:44:28 AM
And please: Normally, I would be able to identify my wife not just because she has something that I don't have. Thus, looking at the signal with audacity and enough spreading enabled doesn't need a sin wave to tell whether it is inverted or not.

Well yes, thats the point, you can't tell if the signal is inverted with just a sin wave, hence the need to test something else.
Logged

  • Print
Pages: [1] 2 3
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Recording
| | |-+  inverted phases on iaudio x5
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.095 seconds with 14 queries.