User avatar
truehl
Posts: 642
Joined: Sun Mar 04, 2012 6:47 pm
Contact: Website

Model B+ Audio Experiences

Wed Jul 16, 2014 12:46 pm

Hi,
I've got my Model B+ today. I'm not sure about the sound output so far, so I like to ask you about your experience!
Here are mine:
1. First of all: My actual images of SqueezePlug seems not to work with Model B+. USB and Network does not work. I think it's because of a missing firmware update. Maybe it works if I do a rpi-update from an old Pi.
2. The sound with SqueezeLite (analogue) was cracky the first tries, now it seems better, I'm still testing.
3. The analogue audio out seems not support headphones, only a very low sound output comes out of the headphones.

Please tell me about your first experiences!

Thomas
truehl
http://www.squeezeplug.de

User avatar
DougieLawson
Posts: 32669
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Model B+ Audio Experiences

Wed Jul 16, 2014 1:00 pm

The analog audio output is a line-out level not at headphone level. You'll need an amp to drive a pair of headphones.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

User avatar
truehl
Posts: 642
Joined: Sun Mar 04, 2012 6:47 pm
Contact: Website

Re: Model B+ Audio Experiences

Wed Jul 16, 2014 1:27 pm

DougieLawson wrote:The analog audio output is a line-out level not at headphone level. You'll need an amp to drive a pair of headphones.
o.k., that makes sense!

The sound is much better now by using a better power supply. I now use the one from my iPad. The only thing I mention now is some noise in quite parts of music!
truehl
http://www.squeezeplug.de

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Model B+ Audio Experiences

Wed Jul 16, 2014 1:38 pm

The Pi audio is generated by a high frequency PWM engine or 1 bit DAC this from what I understand is comparable to 10 bit sound card.
For general purpose audio i.e. movies I think this is fine but for music especially if you have a high quality speaker system it may sound less than desirable.
The noise in quite parts could be due to low bit resolution or noise leakage from the power supply rail or video port.
Make sure the mixer level via alsamixer is cranked up before distorting, if noise in the background persists then you may need a ground loop isolator or a better audio device i.e. CM108, CM106.

Richard S.

User avatar
RaTTuS
Posts: 9895
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Model B+ Audio Experiences

Wed Jul 16, 2014 1:42 pm

The B+ is much more improved than the B for audio [reportly]
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 10579
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Model B+ Audio Experiences

Wed Jul 16, 2014 2:03 pm

The audio output of the B+ model now uses slightly higher levels compared to the original model B (1.25V peak-peak, instead of 1.1V peak-peak), but you only get the full benefit from that if you turn the software volume fully up, because halving the volume will also halve the dynamic range, and thus the signal to noise ratio! So when using external amplifiers regulate the volume with the volume regulator of the amplifier, and turn the "software volume control" fully up.

The output is now also a much lower impedance, (50 Ohm instead of 100 Ohm) so connecting ear-buds will now result in a better signal to noise ratio than before as the output signal it isn't attenuated as much by the ratio between internal resistance and the relatively high resistance of ear-buds. But headphones present a far lower resistance, (typically 32 ohms) compared to ear-buds, (who have a few hundred ohms) so they receive much less energy, so driving them is still not recommended, as it may lead to distortion and very weak sound.
The output is still optimized for external speakers with inputs > 1K Ohm.

Its hard to compare the audio output's dynamic range to a regular PWM signal, because a smart algorithm is used by the GPU to create the bit-steam that is sent to the audio filters, (theoretical there is no inherent "dynamic range limit", expressed in the number of digital bits, like a normal PWM signal, and now the actual bit stream has much less analog noise superimposed on it due to a lower noise power source that is used to generate it.) So with a much improved DAC it now makes more sense to use a better optimized algorithm when running on a B+ PI. It will sound better, provided you use the latest most optimized for the model B+ audio drivers. Using older software will provide no "improved PWM algorithm" benefits.

Corrections based on reexamining schematics, doing some calculations, and on the comments below

drgeoff
Posts: 8081
Joined: Wed Jan 25, 2012 6:39 pm

Re: Model B+ Audio Experiences

Wed Jul 16, 2014 3:42 pm

mahjongg wrote:.... a smart algorithm is used by the GPU to create the bit-steam that is sent to the audio filters, (theoretical there is no inherent "dynamic range limit", expressed in the number of digital bits, like a normal PWM signal,...
A smart algorithm, commonly known as "noise shaping" has been used in 1-bit audio DACs for years. It does not give 'no inherent "dynamic range limit", expressed in the number of bits'. It can improve the subjective signal to quantising noise ratio by adding a dither signal which reduces quantising noise at lower frequencies but increases it at higher frequencies where it is less audible. However there are limits to what can be achieved, contrary to the impression given by mahjongg.

http://en.wikipedia.org/wiki/Noise_shaping

I haven't seen anything which suggests that the basic D to A mechanism in the B+ is any different from that in the B (and A) in which periods of 10 ns (100 MHz clock) can be high or low. At a 48 kHz sample rate, there are just over 2,083 such periods hence there are 2083 analogue levels that can be distinguished in the filtered output. And hence the oft quoted 11-bit dynamic range.

The PWM bit is inside the Broadcomm chip and that chip is the same in the B+ and the B. The noise shaping is performed in software before the multi-bit signal is applied to the Pulse Width Modulator stage, so up to the point where the two-level PWM output leaves the chip the B can have exactly the same audio performance as the B+. Granted the B+ may then have different, better (external to the chip) circuitry which takes the two-level PWM signal and low pass filters it to produce the audio output fed to the socket. The B and A had the issue of the "high" voltage of the PWM signal being contaminated with noise. The B+ apparently has a separate power rail (external to the Broadcomm chip) which controls the "high" voltage of the two-level signal into the low pass filter. Hence that source of noise is eliminated. See my post of Mar 06, 2012 10:20 pm at http://93.93.128.176/forums/viewtopic.p ... 43&p=58336 and Gert's reply.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 10579
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Model B+ Audio Experiences

Wed Jul 16, 2014 6:42 pm

Yes, no limit is obviously a simplification, as there is obviously a limitation to the complexity of the algorithm and computing and hardware resources. What I meant is that you cannot simply say that is fixed to "comparable to a 11-bit PWM".
Because when you say that
periods of 10 ns (100 MHz clock) can be high or low. At a 48 kHz sample rate, there are just over 2,083 such periods hence there are 2083 analogue levels that can be distinguished in the filtered output. And hence the oft quoted 11-bit dynamic range.
then that may be true now, but the GPU code can indeed be changed to something a bit "better" than this standard "noise shaping" PWM mechanism, and I read somewhere that with a better, less noisier, ADC it would now make a difference to switch to such a better (read better than 11-bit) dynamic range algorithm. Perhaps a mechanism could be used that dynamically switches between "better" and "worse" algorithms depending on the application (need for better audio) and the availability of GPU cycles.

Perhaps an expert can tell a bit more, perhaps I understood wrong, when I read that "now with a better ADC it is worthwhile to use (switch to) a better (higher) dynamic range algorithm".

drgeoff
Posts: 8081
Joined: Wed Jan 25, 2012 6:39 pm

Re: Model B+ Audio Experiences

Wed Jul 16, 2014 7:21 pm

mahjongg wrote:... as there is obviously a limitation to the complexity of the algorithm and computing resources ...
No that isn't the limitation. You can make the algorithm as complex as you like and throw all the computers in the universe at it but you won't get past a certain point.

The limitation is human psycho-acoustics. The quantising noise/distortion doesn't go away. Some of it gets moved up to higher frequencies. So less quantising noise at frequencies where it is easily heard and more quantising noise at frequencies where it is not so easily heard. There is an equilibrium point at which the noise is perceptually the same throughout the range. Overdo it and the increased HF noise becomes more annoying than the diminished LF noise.
Last edited by drgeoff on Wed Jul 16, 2014 7:33 pm, edited 1 time in total.

drgeoff
Posts: 8081
Joined: Wed Jan 25, 2012 6:39 pm

Re: Model B+ Audio Experiences

Wed Jul 16, 2014 7:32 pm

mahjongg wrote:.. but the GPU code can indeed be changed to something a bit "better" than this standard "noise shaping" PWM mechanism, and I read somewhere that with a better, less noisier, ADC it would now make a difference to switch to such a better (read better than 11-bit) dynamic range algorithm. Perhaps a mechanism could be used that dynamically switches between "better" and "worse" algorithms depending on the application (need for better audio) and the availability of GPU cycles.
Each channel of the audio output comes from a GPIO pin. Unless the internal workings of the Broadcom chip permit steps less than the current 10 ns (!00 MHz) to appear at those pins then the rule of

no. of quantising levels = 100 MHz divided by audio sample rate

cannot be improved.

That sets the limit on the objective performance of the D to A converter. Noise shaping can improve the subjective performance but there is a limit to that improvement.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 10579
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Model B+ Audio Experiences

Wed Jul 16, 2014 7:58 pm

Well, I agree to all that. I wonder where the remark that it would now be worthwhile to upgrade the GPU algorithm now we have a better performing ADC, came from, and what the reason behind it is.
It could be a better performing "dihering" mechanism to get a better subjective audio performance, I simply don't know, and with the mass of stuff I have read the last couple of days I'm sorry to say I cannot remember exactly where I read the remark, but I remember it was made by someone who is normally well informed.

we will see in due time how much the audio output has improved subjectively.

drgeoff
Posts: 8081
Joined: Wed Jan 25, 2012 6:39 pm

Re: Model B+ Audio Experiences

Wed Jul 16, 2014 8:16 pm

mahjongg wrote:Well, I agree to all that. I wonder where the remark that it would now be worthwhile to upgrade the GPU algorithm now we have a better performing ADC, came from, and what the reason behind it is.
It could be a better performing "dihering" mechanism to get a better subjective audio performance, I simply don't know, and with the mass of stuff I have read the last couple of days I'm sorry to say I cannot remember exactly where I read the remark, but I remember it was made by someone who is normally well informed.

we will see in due time how much the audio output has improved subjectively.
1. I think you mean "better performing DAC".

2. I'm reasonably sure the reason behind "worthwhile" is the cleaner supply to the low pass filter stage. The model A/B simply fed the PWM output pin to a passive low pass filter. The 'top' of the PWM pulses were not clean but had superimposed noise from the digital goings-on within the chip. The parts of that noise within the audio band just came through the low pass filter. Given that, it wasn't deemed worthwhile to go to great lengths to reduce quantising distortion. I haven't seen schematics for the B+ but I expect that the improved audio circuitry includes an active device which is toggled by the PWM from the chip and switches between two clean (compared to the A/B) voltage levels thus eliminating that source of noise. Exactly as I asked back in March 2012. With that source of noise out of the way it then becomes worthwhile to focus on noise shaping. I'm fairly sure that the B didn't have any noise shaping when it was launched but don't know if any was added since. So I don't know if the "special algorithm" in the B+ is an entirely new addition or a better version of something that has been in later versions of A/B firmware.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 10579
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Model B+ Audio Experiences

Wed Jul 16, 2014 9:08 pm

drgeoff wrote:

we will see in due time how much the audio output has improved subjectively.
1. I think you mean "better performing DAC".[/quote]
Yes obviously I did. :oops:
drgeoff wrote:
2. I'm reasonably sure the reason behind "worthwhile" is the cleaner supply to the low pass filter stage. The model A/B simply fed the PWM output pin to a passive low pass filter. The 'top' of the PWM pulses were not clean but had superimposed noise from the digital goings-on within the chip. The parts of that noise within the audio band just came through the low pass filter. Given that, it wasn't deemed worthwhile to go to great lengths to reduce quantising distortion. I haven't seen schematics for the B+ but I expect that the improved audio circuitry includes an active device which is toggled by the PWM from the chip and switches between two clean (compared to the A/B) voltage levels thus eliminating that source of noise. Exactly as I asked back in March 2012. With that source of noise out of the way it then becomes worthwhile to focus on noise shaping. I'm fairly sure that the B didn't have any noise shaping when it was launched but don't know if any was added since. So I don't know if the "special algorithm" in the B+ is an entirely new addition or a better version of something that has been in later versions of A/B firmware.
The way I read it was that "a better DAC" was achieved by the things you mention, such as less power noise on the digital bitstream, increasing the output level, and lowering the output impedance.
I have known since last year that a simple form of noise shaping was used, and instead of outputting 1024 ones followed by 1024 zero's to get a 50% duty cycle the algorithm used sent out alternating ones and zero's, and for other duty cycles the number of ones and zero's would also be more evenly spread out over the available 2048 bits, This indeed "pushes the quantization errors to higher frequencies" but I knew nothing beyond that about the actual implementation, so its easily possible that a better form of "dithering" than previously used can be implemented, improving the subjective audio quality. Also the algorithm maybe could improve on things like clipping problems and such.

drgeoff
Posts: 8081
Joined: Wed Jan 25, 2012 6:39 pm

Re: Model B+ Audio Experiences

Wed Jul 16, 2014 9:53 pm

mahjongg wrote: I have known since last year that a simple form of noise shaping was used, and instead of outputting 1024 ones followed by 1024 zero's to get a 50% duty cycle the algorithm used sent out alternating ones and zero's, and for other duty cycles the number of ones and zero's would also be more evenly spread out over the available 2048 bits, This indeed "pushes the quantization errors to higher frequencies" ..
I would call that Pulse Density Modulation but it does absolutely nothing to improve quantisation errors and isn't noise shaping in the accepted use of the term. It doesn't matter how you distribute the ones and zeros. The number of achievable levels after low pass filtering is the same and independent of audio signal frequency.

However it is advantageous in that the low pass filter has an easier job. With the 1024 followed by 1024 input signal there is a very strong component at the audio sampling frequency and multiples of it. Even when it isn't that exact 1024/1024 split a lot of energy is at those frequencies (Fourier). When the ones and zeros are perfectly interspersed there is no energy at the audio sampling frequency. All the energy is at 50 MHz and harmonics. As the mixing departs from every one adjacent to a zero the two methods begin to converge. Think of limiting cases. All zeros (or all ones) are the same for PWM and PDM. And a single zero (or single one) is the same for PWM and PDM. (It doesn't matter where that single lone pulse is in the 2048.)

This is somewhat related to the "oversampling" D to A converters that appeared in digital Hi-Fi gear. Complex signal processing was used to increase the sample rate by interpolating extra sample values so that less complex (cheaper and better sounding) analogue low pass filters could be used after the D to A. (Because the unwanted components from the sampling rate had been multiplied up to higher frequencies while the wanted audio signal remained unchanged.)

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 10579
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Model B+ Audio Experiences

Fri Jul 18, 2014 1:06 pm

Well, what can I say but that you are a lot more informed about these matters than I am.
Note that the PI had (and probably still has) an exceedingly simple low pass filter, so pulse density modulation might indeed be necessary to get a reasonable result.

One can only conclude that "the proof of the pudding is in the eating", I still await some reports about the subjective improvement of the model B+.

User avatar
truehl
Posts: 642
Joined: Sun Mar 04, 2012 6:47 pm
Contact: Website

Re: Model B+ Audio Experiences

Fri Jul 18, 2014 1:29 pm

mahjongg wrote:Well, what can I say but that you are a lot more informed about these matters than I am.
Note that the PI had (and probably still has) an exceedingly simple low pass filter, so pulse density modulation might indeed be necessary to get a reasonable result.

One can only conclude that "the proof of the pudding is in the eating", I still await some reports about the subjective improvement of the model B+.
The last posts all sound very interesting. Because I'm not an expert, for me it's all a bit exiting. My subjective impression is that the sound is not good at all. Maybe this is because of my special environment, I use SqueezeLite as a player without any special settings.

Thomas
truehl
http://www.squeezeplug.de

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Model B+ Audio Experiences

Fri Jul 18, 2014 1:32 pm

Has anyone tried performing a frequency response analysis of the Model B vs B+ ??

If audio sounds different with speakers / amps then I would imagine the response curve would also be different for both models.

Richard S.

HenryG
Posts: 28
Joined: Sat Sep 10, 2011 3:15 pm

Re: Model B+ Audio Experiences

Thu Jul 24, 2014 6:47 am

It is relatively easy to perform frequency response, noise and distortion measurements using RMAA and a decent sound card.

Gswg
Posts: 57
Joined: Wed Oct 16, 2013 10:30 am
Location: Swindon
Contact: Website

Re: Model B+ Audio Experiences

Wed Jul 30, 2014 11:58 am

Don't worry, soon there will be a number of B+ DAC boards around.

Ours is in final development phase....
www.iqaudio.com


Also, you may want to read this.... http://www.crazy-audio.com/2014/07/soun ... erry-pi-b/

Gordon@iqaudio.com

User avatar
Paul Webster
Posts: 730
Joined: Sat Jul 30, 2011 4:49 am
Location: London, UK

Re: Model B+ Audio Experiences

Wed Jul 30, 2014 2:46 pm

I have the IQaudIO device on one B and a USB sound card on another and both work well.

An interesting comment in the recent interview with James Adams regarding the analogue audio quality on B+
'“We can do better. I won’t say anymore, but there might be something coming in the future that will drastically improve the sound quality. Software based… but I’ll leave that for an announcement on the blog,” Adams teased.'

That is from a long interview at http://www.raspi.today/the-making-of-th ... el-b-plus/

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Model B+ Audio Experiences

Wed Jul 30, 2014 3:06 pm

For what it's worth I think we should be grateful that the Pi has analogue audio capability anyway if I recall correctly the Pi was original meant to generate beep tones.
In any case I'm quite happy with the sound quality of my CM108 (no so happy they've swapped the left and right channels) the only thing that that sucks is omxplayer's lack of USB audio support.

Does any know why??

The other thing that's bugs me about the analogue audio is it's ability to broadcast crude AM signals throughout the radio spectrum something that was absent from the FCC EMC report.
While this is by no means as dangerous as the P**** (sensored) project it may cause interference with nearby equipment such as a Freeview adapter with an indoor antenna.

Richard S.

drgeoff
Posts: 8081
Joined: Wed Jan 25, 2012 6:39 pm

Re: Model B+ Audio Experiences

Wed Jul 30, 2014 3:35 pm

redhawk wrote:... the analogue audio is it's ability to broadcast crude AM signals throughout the radio spectrum ...
Is this just the B+ or both B and B+?

(Those of you with memories that can go back to around 1966 may recall the Sinclair X10 and X20 audio power amps that had similar capability. Just a coincidence that they were PWM too. :lol: http://www.vintage-radio.net/forum/atta ... 1197827390 )

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Model B+ Audio Experiences

Wed Jul 30, 2014 4:21 pm

mahjongg wrote:Well, I agree to all that. I wonder where the remark that it would now be worthwhile to upgrade the GPU algorithm now we have a better performing ADC, came from, and what the reason behind it is.
It could be a better performing "dihering" mechanism to get a better subjective audio performance, I simply don't know, and with the mass of stuff I have read the last couple of days I'm sorry to say I cannot remember exactly where I read the remark, but I remember it was made by someone who is normally well informed.
I found it 8-)
http://www.raspberrypi.org/introducing- ... ent-957814
redhawk wrote:the only thing that that sucks is omxplayer's lack of USB audio support. Does any know why??
Doesn't the OMX in omxplayer stand for OpenMaX, i.e. it explicitly targets the different OpenMAX APIs offered by the Pi? And so I guess USB audio simply doesn't fit in with the OpenMAX APIs? :?
But of course you could always ask at https://github.com/popcornmix/omxplayer/issues

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Model B+ Audio Experiences

Wed Jul 30, 2014 4:47 pm

Is this just the B+ or both B and B+?
Since both B and B+ use the same PWM engine I would image both have the same capabilities of generating harmonics of the centre frequency.
With an SDR RTL based tuner (820T) I've found harmonics at: 135.49 MHz, 225.80 MHz. 316.11 MHz, 406.42 MHz, 496.73 MHz, 587.05 MHz and 677.36 MHz (+/- a few kHz).
I would have expected the harmonics to roll off after 200KHz but they're particular strong around the 400MHz - 700 MHz range for Freeview.
My setup is pretty basic, an RTL DVB-T dongle attached to the Pi with a USB extender cable, the TV aerial sits approximately 2 metres away on my shelf in the corner of the room.
To listen to music set the mode to AM and set the mixer levels on the Pi from 8 to 10 otherwise the audio could distort.
To find the Pi audio with SDR Sharp look for 3 - 5 peaks evenly spaced with the centre peak sitting on a mound.

Richard S.
Last edited by redhawk on Wed Jul 30, 2014 4:48 pm, edited 1 time in total.

drgeoff
Posts: 8081
Joined: Wed Jan 25, 2012 6:39 pm

Re: Model B+ Audio Experiences

Wed Jul 30, 2014 4:48 pm

That http://www.raspberrypi.org/introducing- ... ent-960521 bit seems to be exactly what I surmised earlier in this thread, and no I hadn't seen that blog beforehand. Honest, guv!

Return to “Media centres”

Who is online

Users browsing this forum: No registered users and 3 guests