Dac Design Question

Discussion in 'Digital: DACs, USB converters, decrapifiers' started by Energeezer, Jun 13, 2017.

  1. purr1n

    purr1n Desire for betterer is endless.

    Staff Member Pyrate BWC
    Joined:
    Sep 24, 2015
    Likes Received:
    90,033
    Trophy Points:
    113
    Location:
    Padre Island CC TX
    The computer tells the USB receiver on the DAC the sample rate and bitdepth. Whether there is an initial query or handshake, or whether certain kinds of headers in the packets are used, so what? The mechanisms I do not care for. LIife is too short. That layer would be a black box to someone writing say audio playback software. This is all masturbatory unless you want to design USB audio drivers or USB hardware. I certainly don't.

    The point is that DAC is not going to know that the bits I am sending happen to be the bits for Duran Duran's Rio; nor will the DAC ever display the Nagel album artwork on a LCD.

    The only exception would be if a DAC manfacturer created a proprietary interface, such as with the PS Audio's ill-fated always-in-a-state-of-broken Ethernet Bridge implementation with the PWD1/2 DAC.
     
    Last edited: Jun 14, 2017
  2. winders

    winders boomer

    Banned
    Joined:
    Feb 13, 2017
    Likes Received:
    1,596
    Trophy Points:
    113
    Location:
    San Martin, CA
    Again, with USB, sample rate is not inferred. At least not according to the link I provide above. Here is a direct quote:

    Audio Request: Set Sample Rate

    The AudioClassRequests_2() function parses the passed USB_SetupPacket_t structure for a CUR request of type SAM_FREQ_CNTROL to a Clock Unit in the devices topology (as described in the devices descriptors).

    The new sample frequency is extracted and passed via channel to the rest of the design - through the buffering code and eventually to the Audio IO/I2S core. The AudioClassRequests_2() function waits for a handshake to propagate back though the system before signalling to the host that the request has completed successfully. Note, during this time the USB library is NAKing the host essentially holding off further traffic/requests until the sample-rate change is fully complete.
     
  3. winders

    winders boomer

    Banned
    Joined:
    Feb 13, 2017
    Likes Received:
    1,596
    Trophy Points:
    113
    Location:
    San Martin, CA
    But the original question was not yours. This answers a question that was asked by someone else and while it may not be important to you or anyone else, it is an answer....
     
  4. purr1n

    purr1n Desire for betterer is endless.

    Staff Member Pyrate BWC
    Joined:
    Sep 24, 2015
    Likes Received:
    90,033
    Trophy Points:
    113
    Location:
    Padre Island CC TX
    You win.

    [​IMG]
     
  5. ultrabike

    ultrabike Measurbator - Admin

    Staff Member Pyrate MZR
    Joined:
    Sep 25, 2015
    Likes Received:
    8,960
    Trophy Points:
    113
    Location:
    Irvine CA
    Yup.

    Don't be an armchair quarterback.

    I can tell you with full honesty that while I can design an audio DAC solution, I haven't. And there is always details of implementation, which many folks at the user level could not give a rats ass about.

    I can also tell you haven't designed a single audio DAC solution. So you really don't know. So don't pretend like you do.

    Now, regarding your post:

    Nobody is talking about inferring sample rate from the USB interface. That's just f'ing stupid. It's a packet driven interface with not just raw audio data but also control. Just like SPI/I2C, and probably not like I2S. Here is a two bit crap diagram of what I'm talking about:

    Scenario 1
    USB -----> Interface IC -----> SPI/I2C + I2S ------> DAC
    +SPI/I2C - control
    +I2S - serial data stream

    Scenario 2
    USB -----> DAC

    In Scenario 1, sample rate would probably be inferred from the I2S clock, and bit depth (assuming > 16-bit operation) might need to be programmed through the SPI/I2C control interface. Bit-depth could be inferred from the frame clock. But I noticed in the data sheets that it's controlled through a programmable register inside the DAC.

    In Scenario 2, all things come from the USB interface, there is an I2S in some of those DACs, but it's only an output which may be used to drive another DAC using it's defaults, such as the case of the pupDAC.
     
    Last edited: Jun 14, 2017
  6. ultrabike

    ultrabike Measurbator - Admin

    Staff Member Pyrate MZR
    Joined:
    Sep 25, 2015
    Likes Received:
    8,960
    Trophy Points:
    113
    Location:
    Irvine CA
    Note we are no longer answering the original question regarding metadata support.

    I contributed unnecessary details in an effort to make things clearer. Obviously it did not fully go they way I hoped.
     
  7. winders

    winders boomer

    Banned
    Joined:
    Feb 13, 2017
    Likes Received:
    1,596
    Trophy Points:
    113
    Location:
    San Martin, CA
    I didn't pretend anything. I was upfront about where I was getting my information. I haven't written drivers since I was at Apple many years ago and I have never done anything with audio. All I was trying to do was answer a question....not get in a pissing contest...you guys wins!
     
  8. ultrabike

    ultrabike Measurbator - Admin

    Staff Member Pyrate MZR
    Joined:
    Sep 25, 2015
    Likes Received:
    8,960
    Trophy Points:
    113
    Location:
    Irvine CA
    OK. Chill.

    Are we on the same page now, or not?
     

Share This Page