Author Topic: PCM5102A: analog output level not what I expected?  (Read 2618 times)

0 Members and 1 Guest are viewing this topic.

Offline sidlauskasTopic starter

  • Contributor
  • Posts: 26
PCM5102A: analog output level not what I expected?
« on: January 27, 2019, 03:32:33 pm »
Hi,

I cannot achieve a 2.1 Vrms mentioned in their datasheet. I can only output 1.04Vrms from the 1kHz source. Do I measure it wrong or this is what I should expect? Or maybe I get such measurements because it could possibly be a counterfeit chip?

 

Offline dmendesf

  • Frequent Contributor
  • **
  • Posts: 342
  • Country: br
Re: PCM5102A: analog output level not what I expected?
« Reply #1 on: January 27, 2019, 04:42:49 pm »
Are you sure you're sending a full scale senoid to be output?
 

Offline sidlauskasTopic starter

  • Contributor
  • Posts: 26
Re: PCM5102A: analog output level not what I expected?
« Reply #2 on: January 27, 2019, 07:20:26 pm »
Are you sure you're sending a full scale senoid to be output?

I tried to play different sine wave tone (0 dBFS) generated from here: audiocheck.net/audiofrequencysignalgenerator_sinetone.php and now I can see 1.88 Vrms and 5.64 Vpp when there is no load. Is this something I should expect? I'm playing this sound at the full volume over bluetooth since I use CSRA64215 chip as a source for PCM5102A. I also checked CSRA64215 config and it's output level is already set to max.

« Last Edit: January 27, 2019, 07:22:56 pm by sidlauskas »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15794
  • Country: fr
Re: PCM5102A: analog output level not what I expected?
« Reply #3 on: January 27, 2019, 07:28:26 pm »
You're getting half of what is advertised in TI's datasheet. Although the latter is clear as mud.

2.1Vrms would be a +/-3V signal peak-to-peak. You're getting half of that.

From a 3.3V single analog supply, they are generating an internal positive rail and negative rail with a charge pump as I understood, so that's how you could actually get a +/-3V output.

Not sure why you're getting half of that. Maybe your input digital signal is only half of full-scale. Maybe you're loading the analog outputs too much. Maybe you're using the wrong digital format (I2S vs left-justified). Check your source code. Try changing the signal's polarity on the FMT pin.

Or lastly, the datasheet sucks and full-scale is not really 2.1Vrms but half of that. But I'd first check that you're using the right digital audio format, sounds like the most probable issue here.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15794
  • Country: fr
Re: PCM5102A: analog output level not what I expected?
« Reply #4 on: January 27, 2019, 07:35:20 pm »
I tried to play different sine wave tone (0 dBFS) generated from here: audiocheck.net/audiofrequencysignalgenerator_sinetone.php and now I can see 1.88 Vrms and 5.64 Vpp when there is no load. Is this something I should expect? I'm playing this sound at the full volume over bluetooth since I use CSRA64215 chip as a source for PCM5102A. I also checked CSRA64215 config and it's output level is already set to max.

The whole story is always helpful.

"When there is no load" : what do you mean? How do you load the outputs?

Also, you're apparently going from a whole chain that you probably have not much control over. What does "full volume over bluethooth" mean? What exactly is your complete signal chain? Are you using a computer or mobile, playing sound via an app through bluetooth? How can you ever guarantee bit-exact signals with that setup, if this is what you're doing? A whole lot will happen behind the scenes before your DAC receives an actual digital signal... or please show your complete signal chain in more details.


 

Offline sidlauskasTopic starter

  • Contributor
  • Posts: 26
Re: PCM5102A: analog output level not what I expected?
« Reply #5 on: January 29, 2019, 09:53:42 pm »
I tried to play different sine wave tone (0 dBFS) generated from here: audiocheck.net/audiofrequencysignalgenerator_sinetone.php and now I can see 1.88 Vrms and 5.64 Vpp when there is no load. Is this something I should expect? I'm playing this sound at the full volume over bluetooth since I use CSRA64215 chip as a source for PCM5102A. I also checked CSRA64215 config and it's output level is already set to max.

The whole story is always helpful.

"When there is no load" : what do you mean? How do you load the outputs?

Also, you're apparently going from a whole chain that you probably have not much control over. What does "full volume over bluethooth" mean? What exactly is your complete signal chain? Are you using a computer or mobile, playing sound via an app through bluetooth? How can you ever guarantee bit-exact signals with that setup, if this is what you're doing? A whole lot will happen behind the scenes before your DAC receives an actual digital signal... or please show your complete signal chain in more details.


Saying "there is no load" I meant "open circuit". That time the output was not "loaded" and it seems the generated waveform was not 0dBFS. This time I used Audacity for generating the sine wave (48kHz, 16bit) and loaded the outputs with 1k and 10k fixed resistors and played that sound via MacBook Pro through Bluetooth. Here's how I did the measurements:



Here's the results:
1k load


10k load


open circuit


I also monitored what the bluetooth module is outputting - for some reason it outputs -0.95dBFS, I checked everything in DSP chain and everything was already bypassed, SVol and MVol properties are already set to max available values. Another strange thing about that module is that it works only on 44.1kHz sample rate, but later on it's outputting resampled 48kHz signal via I2S. Didn't find why this module is always using 44.1kHz sample rate - it's not possible to change this property in the phone/computer bluetooth configuration.



But I think we can now calculate the Vrms like that: -0.95dBFS is 0.896396, so 1.91 Vrms @ 10k / 0.896396 = 2.13V. Is this correct or I still missing something?
« Last Edit: January 30, 2019, 07:17:01 am by sidlauskas »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15794
  • Country: fr
Re: PCM5102A: analog output level not what I expected?
« Reply #6 on: January 30, 2019, 02:52:46 pm »
Yes it seems alright. And yes, there will be things happening along the signal chain if you're using this. As you have noted, there is resampling being the scenes, and I'm certain there's a lot of other signal modification between your original file and what is output by the bluetooth receiver. It's a well known issue with computer audio in general. If you're using the normal audio subsystem of your computer OS, it's already not guaranteed to be bit-exact (it's usually not), so for professional audio, people tend to use specific access/drivers (such as ASIO). Then you're adding bluetooth in the equation, and the signal is further modified.

-0.95dB is not much in terms of audio and probably nothing to be concerned about. The resampling would be a more important concern here, as I'm pretty sure it's not state-of-the-art resampling, so it's probably adding some distortion.

As to the DAC's outputs loading, you get -1.87dB attenuation with a 1k load, which is again not that much in terms of audio. The datasheet states the output can be loaded with 1k, and they can. It's just attenuating the signal a bit, less than -3dB. That said, there is no reason to load them with such a low impedance  - I see absolutely no benefit unless the following stage has 1K input impedance and you don't want to be bothered with buffering the DAC outputs.

All in all, if you are expecting a "bit-exact" signal output with an exact full-scale output, using a computer's audio subsystem and bluetooth audio is definitely not the way to go IMO. For audio listening, it's alright. If you're using that as a signal generator... I would recommend using another approach.
 
The following users thanked this post: sidlauskas

Offline sidlauskasTopic starter

  • Contributor
  • Posts: 26
Re: PCM5102A: analog output level not what I expected?
« Reply #7 on: February 01, 2019, 11:18:55 pm »
Yes it seems alright. And yes, there will be things happening along the signal chain if you're using this. As you have noted, there is resampling being the scenes, and I'm certain there's a lot of other signal modification between your original file and what is output by the bluetooth receiver. It's a well known issue with computer audio in general. If you're using the normal audio subsystem of your computer OS, it's already not guaranteed to be bit-exact (it's usually not), so for professional audio, people tend to use specific access/drivers (such as ASIO). Then you're adding bluetooth in the equation, and the signal is further modified.

-0.95dB is not much in terms of audio and probably nothing to be concerned about. The resampling would be a more important concern here, as I'm pretty sure it's not state-of-the-art resampling, so it's probably adding some distortion.

As to the DAC's outputs loading, you get -1.87dB attenuation with a 1k load, which is again not that much in terms of audio. The datasheet states the output can be loaded with 1k, and they can. It's just attenuating the signal a bit, less than -3dB. That said, there is no reason to load them with such a low impedance  - I see absolutely no benefit unless the following stage has 1K input impedance and you don't want to be bothered with buffering the DAC outputs.

All in all, if you are expecting a "bit-exact" signal output with an exact full-scale output, using a computer's audio subsystem and bluetooth audio is definitely not the way to go IMO. For audio listening, it's alright. If you're using that as a signal generator... I would recommend using another approach.


I found the reason why the BT chip was outputting only -0.95 dBFS - the reason was the "Volume Control Hard Limiter" under Compander in DSP configuration and aptX codec. It was not enough just to bypass that limiter, I had to use SBC codec instead in order to get 0 dBFS :/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf