Author Topic: Question: How are different sample rates handled in audio DAC's  (Read 2049 times)

0 Members and 1 Guest are viewing this topic.

Offline TheUnnamedNewbieTopic starter

  • Super Contributor
  • ***
  • Posts: 1211
  • Country: 00
  • mmwave RFIC/antenna designer
As title suggests, I have a question regarding the implementation of DAC's sample rates.

Many "hifi" (not necessarily audiophile/phool) and studio dac's support samplerates way past the "standard" 44.1 and 48kHz samplerates.
I was wondering how this was implemented.
Does the DAC itself actually change it's output sample rate, or does it just upsample all incoming data (with the necessary digital filters ofc)?
Seems like the latter has advantages in terms of filter design (just need to design one good AA filter, and I'm guessing if you are upsampeling anyways, might as well upsample a bit higher and use a filter with a gentler slope) but the disadvantage that, at least from what I know, the maths becomes quite complex when the output sample rate isn't a quite simple multiple of the input sample rate.

From thinking a little more about it, I guess the upsample method is more likely since it would mean that you don't have to make fancy tunable filters?

Anyone here with more knowledge/experience on this topic, or just more details regarding the pros/cons of both methods, or even other methods?
« Last Edit: April 05, 2016, 11:23:50 am by TheUnnamedNewbie »
The best part about magic is when it stops being magic and becomes science instead

"There was no road, but the people walked on it, and the road came to be, and the people followed it, for the road took the path of least resistance"
 

Offline Miyuki

  • Frequent Contributor
  • **
  • Posts: 907
  • Country: cz
    • Me on youtube
Re: Question: How are different sample rates handled in audio DAC's
« Reply #1 on: April 05, 2016, 11:31:18 am »
Most DAC have PLL to generate clock at any frequency (like 10 kHz to 200 kHz) you need and just take data from small buffer
And don't use any special filter just output amplifier (to line/headphone levels) with Fc at suitable frequency (like 100kHz)
like this
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: Question: How are different sample rates handled in audio DAC's
« Reply #2 on: April 05, 2016, 11:32:35 am »
I have seen both variants. The AA filter is implemented digitally on most DACs so it is no problem when changing the sampling rate. The final analogue filter is fixed at somewhere between 20-50kHz because it only needs to remove the remaining high frequency noise from the delta-sigma modulation.
Changing the sampling rate means changing the system clock to the DAC. This may generate an audible clicking noise if the clock stops while the PLL is being reconfigured.
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1632
  • Country: gb
Re: Question: How are different sample rates handled in audio DAC's
« Reply #3 on: April 05, 2016, 01:06:21 pm »
In delta-sigma audio DACs, Different sample rates are usually determined by the master clock and hardware/software configuration (setting the division of MCLK 256/284/512) or, auto-detection of the LRCLK of the I2S input, if its a slave.

For example, if you provide a 24.576MHz clock, and set the division to 512,  you get 48kHz.  Set it to 256, and its 96kHz.  Most DACs have a couple of pins used to set the division, but some have more settings so use an SPI port to configure settings in registers.  Switching between 32/48/96/192kHz and 44.1k is often done by using an external PLL but there are probably DAC's that either have two MCLK inputs, or an on-board PLL.

As mentioned by others, because delta-sigma DAC's overs-ample to increase resolution, the actual sample rate is far above the sample rate its set to, this greatly relaxes the constraints on the output filter used to suppress images at multiples of the sample rate. So a single pole filter that starts to attenuate at 96kHz can be used for 96, 48, 44.1, and 32k sample rates.  For ladder DAC's, this output filter needs to have a very sharp roll off, which is why 'audiophiles' tend to run them at very high sample rates - so it still only has an effective bandwidth of 48k, but the nyquist frequency is higher, giving more room for a filter to roll off.  In order to do that, they often upsample the original stream.  Note 'ladder DAC's' are generally in the world of audiophoolery.  Whilst they don't have the same issues as delta-signa, they bring their own which makes then unsuitable for resolutions > 12-bit, and where the sample rate is is close to the nyquist frequency.
 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Re: Question: How are different sample rates handled in audio DAC's
« Reply #4 on: April 05, 2016, 03:08:45 pm »
In delta-sigma audio DACs, Different sample rates are usually determined by the master clock and hardware/software configuration (setting the division of MCLK 256/284/512) or, auto-detection of the LRCLK of the I2S input, if its a slave.

For example, if you provide a 24.576MHz clock, and set the division to 512,  you get 48kHz.  Set it to 256, and its 96kHz.  Most DACs have a couple of pins used to set the division, but some have more settings so use an SPI port to configure settings in registers.  Switching between 32/48/96/192kHz and 44.1k is often done by using an external PLL but there are probably DAC's that either have two MCLK inputs, or an on-board PLL.

As mentioned by others, because delta-sigma DAC's overs-ample to increase resolution, the actual sample rate is far above the sample rate its set to, this greatly relaxes the constraints on the output filter used to suppress images at multiples of the sample rate. So a single pole filter that starts to attenuate at 96kHz can be used for 96, 48, 44.1, and 32k sample rates.  For ladder DAC's, this output filter needs to have a very sharp roll off, which is why 'audiophiles' tend to run them at very high sample rates - so it still only has an effective bandwidth of 48k, but the nyquist frequency is higher, giving more room for a filter to roll off.  In order to do that, they often upsample the original stream.  Note 'ladder DAC's' are generally in the world of audiophoolery.  Whilst they don't have the same issues as delta-signa, they bring their own which makes then unsuitable for resolutions > 12-bit, and where the sample rate is is close to the nyquist frequency.

what Buriedcode said...

This is why with a change of a button and flick of bit in the DAC configuration frame, modes can be set in DAC allowing different sampling settings in real-time.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf