# digital S/PDIF vs. analogue output to receiver/sub with REW



## Blueeyedfrog (Dec 15, 2007)

Just wanted to check that it is ok to use the S/PDIF output from my soundcard, rather than the analogue output, when using REW. I output in PCM 2 channel, which I understand is uncompressed, to my receiver which then passes the converted analogue output to the sub via the RCA sub output.

I have compared the soundcard calibration of the S/PDIF output with the analogue output and the main difference is that the S/PDIF curve is flatter (more extended) at the lower and upper frequencies. 

Does anyone know if it is better, worse or no different to use the S/PDIF over analogue output?

Happy New Year,
Blue


----------



## Otto (May 18, 2006)

Hi Blue,

Yeah, I compared my analog calibration against the SPDIF result, and didn't find much difference. I think you should be OK to use the SPDIF out if you want. 

Have fun and happy new year!


----------



## Blueeyedfrog (Dec 15, 2007)

Thanks Otto!


----------



## brucek (Apr 11, 2006)

> Does anyone know if it is better, worse or no different to use the S/PDIF over analogue output?


Depends on whether the digital out has a perfect response. Using analog allows a calibration file to be created that corrects the analog response to be perfectly flat. There is no cal file when using digital. If it drops off at 10Hz by 5dB for example, then a subs response at 10hz will be down much.

brucek


----------



## Blueeyedfrog (Dec 15, 2007)

brucek said:


> Using analog allows a calibration file to be created that corrects the analog response to be perfectly flat. There is no cal file when using digital.


Thanks Brucek,

But I think I did create a calibration file using the digital out. From memory, to do the calibration, I fed the digital SPDIF out from the soundcard to the receiver and then used an analogue RCA tape monitor out (or similar, I don't recall exactly) to feed back into the soundcard's line input. It allowed me to generate a calibration file which I have loaded into REW. Is that not ok? The only difference in setting the output and input levels the same in REW was that I had to adjust the receiver's output since I was unable to adjust it in REW (because I wasn't using the soundcard's gain). When I get a chance I'll do the calibration check as described in the REW help file. I guess I could compare a measurement using the calibrated digital out and calibrated analogue out to see if they differ?

Cheers,
Blue


----------



## Otto (May 18, 2006)

Hi Blue,

Oh, I thought you had already calibrated it with an analog loopback. I don't think it's possible to properly calibrate your soundcard using the digital I/O because you'll be using analog input when you do your measurement (because the input signal be coming from an analog mic).

What I did was calibrate my soundcard using analog I/O. After doing that, I was able to measure an analog loopback sweep, and it was perfectly flat (with the calibration file applied, of course). Then, in place of the simple analog loopback test, I inserted a preamp into the path. I measured analog frequency response of that preamp (flat, with cal file applied). Then I measured the frequency response of the preamp with a digital signal from my PC (using the preamp's analog outputs). The measured response (using S/PDIF into the preamp, analog out) was generally the same (i.e., identical) to that of the analog input.

For me, that was evidence enough to use the calibration file for either. Also, it tells me that the correction needed for the frequency response of the soundcard is generally in the _input_ stage of the soundcard, and that the output stage doesn't have that much negative effect on FR. I'm not sure that I would necessarily expect that, but that's what I recall.


----------



## Blueeyedfrog (Dec 15, 2007)

Otto said:


> Hi Blue,
> 
> Oh, I thought you had already calibrated it with an analog loopback. I don't think it's possible to properly calibrate your soundcard using the digital I/O because you'll be using analog input when you do your measurement (because the input signal be coming from an analog mic).


But I am using an analogue input to the soundcard (digital out from soundcard to receiver, analogue out from receiver to analogue line-in on soundcard) when doing the loopback. The only difference that I can see is that rather than converting the signal from digital to analogue in the soundcard (then feeding it back in analogue into the soundcard), I'm converting the signal in the receiver (then feeding it back in analogue into the soundcard). I have compared the two responses (soundcard only loopback vs. soundcard-receiver-soundcard loopback) and can see that the drop-off is less when the receiver is in the loop (presumably due to the superior DA conversion), compared to the soundcard only.

Anyway, if that's not correct. Would it be better to do the conventional soundcard only loopback to calibrate the card, then use the soundcard's analogue output to the receiver (which then passes the signal to the sub) when doing sub measurements? Alternatively, should/can I calibrate the soundcard conventionally (no receiver), then use the digital out from the soundcard to the receiver (which converts it to analogue for the sub) when measuring the sub? However, won't the latter method give false readings due to the difference in drop-off to the sub between the soundcard's analogue output (via the receiver), used in calibration, and the soundcard's digital output (converted to analogue in the receiver), used in subsequent measurements? I know you did say Otto that you compared the outputs and found them the same but maybe my soundcard/receiver outputs are different to yours? So should I just use analogue throughout for setup calibration and subsequent measurements (analogue soundcard-receiver, analogue receiver-sub) and be done with it?

Cheers,
Blue


----------



## brucek (Apr 11, 2006)

> Is that not ok?


Yeah, I see no problem with that method. The receiver DACs the signal and then is fed directly back to the soundcards analog input. As a benefit you have included and compensated for the receivers response in your soundcard file. Be sure you have no tone controls or soundfields on when you do it though.......

It's very easy to check the efficacy of your cal file by leaving the receiver in the loop after the calibration is done (and saved in REW) and do a measurement sweep with the new soundcard cal file loaded in REW. Obviously the result you're looking for would be a perfect flat line....

brucek


----------



## Otto (May 18, 2006)

Hi Blue,

Well, the intention of the soundcard cal is to remove any shortcomings of the measurement system only. Since the receiver is part of the "device under test," including it as part of the loopback test will allow it to contribute to the calibration corrections. If there is a component of the cal file that is caused by the receiver, it will be accommodated for in the REW calculation, but not with any other input device. Since you're accounting for any shortcomings of FR in the receiver via the cal file, you will no longer be able to account for such shortcomings by using the filters of the BFD itself. 

In the end, I think this is a pretty limited case, though, and you're probably fine to go that route. Your receiver FR is probably essentially flat from 10 Hz to 20kHz.

You're right -- my result of everything being pretty close may be different than yours: different receivers, different soundcards, etc. However, it sounds like you are fully set up to determine those same results.


----------



## Otto (May 18, 2006)

brucek said:


> As a benefit you have included and compensated for the receivers response in your soundcard file.


I was thinking the same thing, brucek, but consider this:

For the sake of discussion, suppose that the receiver has some really goofy and exaggerated frequency response (FR). Do the calibration, and apply it in REW. Now do your sweeps and get everything perfect with REW and a BFD. Now, remove REW from the picture, and bring in a "perfect" spectrum analyzer, but that doesn't use a cal file (i.e., it's been calibrated on its own, and it flat from DC to infiinty at both input and output, etc.). If you remeasure, FR won't be flat due to the imperfectness of the receiver that was calibrated out with the REW cal file. That's what I'm thinking.


----------



## Blueeyedfrog (Dec 15, 2007)

Thanks for your relies.

At the moment I am still in the process of obtaining a BFD, so I'm a little unclear as to measuring/accounting for the effect of the BFD filters you refer Otto. Presumably, I just connect the BFD inline between the receiver output and sub amp input, then do measurements (cal. file loaded). I.e. the BFD is not used in the inital calibration of the soundcard/receiver loop. However, after cal. the SPL meter just plugged straight into the soundcard line in when measuring sub, and I can measure the effects of the BFD filters?

From memory, FR for the receiver was virtually flat from 10-20,000hz as you say Otto.

Sorry Otto, you lost me on your last post! 

"For the sake of discussion, suppose that the receiver has some really goofy and exaggerated frequency response (FR). Do the calibration, and apply it in REW. Now do your sweeps and get everything perfect with REW and a BFD. Now, remove REW from the picture, and bring in a "perfect" spectrum analyzer, but that doesn't use a cal file (i.e., it's been calibrated on its own, and it flat from DC to infiinty at both input and output, etc.). If you remeasure, FR won't be flat due to the imperfectness of the receiver that was calibrated out with the REW cal file. That's what I'm thinking."

I guess I'm thinking that if I got everything perfect initally using a 'perfect' specturm analyzer (not REW) when using the analogue soundcard output (via the receiver), then played music to the receiver via the soundcard's digital output (which is what I only use), then the 'perfect' filtered sound/FR that I had using the analogue soundcard signal (soundcard's DAC signal) is lost due to the different response/output of the receiver's DAC analogue output?

Cheers,
Paul


----------



## brucek (Apr 11, 2006)

> Since the receiver is part of the "device under test,"


Yeah, duh... stupid me, I wasn't thinking. You're correct of course. I was thinking about the fact that I include my mic pre-amp in the loopback cal test. Yeah, you shouldn't include the receiver in the loop, and instead it would be best to assume the digital out of the soundcard is introducing a small error.. 

brucek


----------



## Blueeyedfrog (Dec 15, 2007)

Ok, after reading your posts several times I think I'm starting to understand :dumbcrazy:. So I calibrate the card as normal (analogue feedback loop, no receiver). But then, how should I measure the FR of my sub? Analogue out from the soundcard (to receiver), or digital out from the soundcard (to receiver)? I only ever use digital out to my receiver when using the sub.

Cheers,
Blue


----------



## Otto (May 18, 2006)

Hi there,

Well, once you do the analog cal with the loopback cable, you will be able to do a sweep (with the loopback cable still in place) and it should measure perfectly flat. You can then insert the receiver in the loop (still using analog I/O) and measure essentially flat (if it's not flat, you will knw that it's a contribution of the receiver that's off). After that, you can measure with a digital output (and analog back to the PC). If that result is the same as your analog measurement through the receiver, I'd say you are good to go with the digital. If there's any significant difference, stick with the analog.

In the end, I think it'll be pretty close either way. Do let us know the delta between the analog measurement and the digital measurement. Like I said, when I did that, I got generally identical results.

Good luck!


----------



## Blueeyedfrog (Dec 15, 2007)

I have calibrated the soundcard and obtained the following comparisons (the top graph shows separated traces and the bottom graph, actual measurements):

1. The top line represents the measured response of the soundcard's analogue loopback - as expected it is completely flat.

2. The second line down represents the measured response of the soundcard's analogue out to the receiver and the receiver's analogue pre-amp out back to the soundcard. This line is essentially flat from 20hz-10khz.

3. The third line down shows the soundcard's digital out to the receiver and the receiver's analogue pre-amp out back to the soundcard. This line shows a gradual rise in volume as the frequency drops - from 1khz down to 4hz, with a very uneven response from 2khz-20khz.

4. The line right down the bottom of the graphs is the calibrated soundcard's response.

So I assume it would be most accurate to use the analogue out from the soundcard when measuring the subwoofer response? But how does measuring the response (and setting filters with BFD) with the analogue output reflect the actual response I will get when I use the digital out? Won't the filters be adjusting the response for an analogue signal which appears to be different from the digital one?

And this raises another question for me - which soundcard output will give me the best sound output for listening to music/movies? It looks like the digital output is the most uneven but the soundcard's analogue output (down the very bottom of the graph) is only flat between 30hz and 5khz? Or is the soundcard's analogue output the second line down and the very bottom line the soundcard's input sensitivity?

Is it time for me to buy a new soundcard..?


----------



## JohnM (Apr 11, 2006)

That third response looks like some form of EQ is being applied to the digital input to the receiver, like a treble adjustment.


----------



## brucek (Apr 11, 2006)

> So I assume it would be most accurate to use the analogue out from the soundcard when measuring the subwoofer response? But how does measuring the response (and setting filters with BFD) with the analogue output reflect the actual response I will get when I use the digital out? Won't the filters be adjusting the response for an analogue signal which appears to be different from the digital one?


You're using REW to set filters for a subwoofer that operates up to about 200Hz. The analog in and out provides for the most accurate method of doing this. It is assumed that after that the source feeding the system will be electronically flat. Your digital PC source of music may not be flat at higher frequencies, and is mildly off at low frequencies but that's of no consequence. Surely you have other sources also, and you want your sub to be equalized generically, not to a single source.

The analog output does look better though. Kinda surprising that the digital output isn't flat. 

rbucek


----------



## Otto (May 18, 2006)

I'm a little surprised that your digital measurement was the worst of the bunch.

Were you using the analog calibration file in every case? It seems that some of the digital measurement's bump back up at high frequency could be caused by NOT having the cal file loaded.

It's hard to say for sure that your sound card is causing the problem. Can you do a digital loopback measurement to check the card's FR in the digital domain only? It could be the receiver doing that, though I would find that somewhat surprising. It looks like it's more than a +/- 3dB swing at the end.

As for your measurments and how they will be affected if you do an analog measurement but then play music digitally -- you'll be focusing all of your filters at the low end of the frequency spectrum. The weirdness at 10kHz+ won't have anything to do with your filters, so you should be fine in that sense. However, that frequency response would bother me in general, and I would not sleep until it was fixed!

Good luck!


----------



## Otto (May 18, 2006)

JohnM said:


> That third response looks like some form of EQ is being applied to the digital input to the receiver, like a treble adjustment.


Good point, John.

Another thing I forgot to mention -- could there be any other digital processing on, either in the soundcard or the receiver, that wouldn't show up in analog measurements?


----------



## DrWho (Sep 27, 2006)

What kind of receiver and sound card are you using?



JohnM said:


> That third response looks like some form of EQ is being applied to the digital input to the receiver, like a treble adjustment.


I was kinda thinking the same thing, except that would be a rather weird transfer function for a treble attenuation...

I have seen transfer functions like that for really cheap DACs though...part of the anti-aliasing filter. The other reason I think this might be the case is due to the very slow rise in output as frequency goes down...you can't really do that with an analog circuit.

What is the swing of the ripple in the HF? It's hard to tell when you're zoomed out so far, but my guess is about +-5dB?


----------

