hollol
Posts: 8
Joined: Sun Feb 28, 2016 8:31 am

Re: Analogue audio testing

Sun Feb 28, 2016 8:36 am

Did anyone tested this on Openelec (6.0.x) so far?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5341
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Analogue audio testing

Sun Feb 28, 2016 3:33 pm

hollol wrote:Did anyone tested this on Openelec (6.0.x) so far?
You need to update the firmware, but yes it can be enabled.
It tends to get into a bad state after a while, so I wouldn't say it's usable,
but it may run long enough to heard the quality improvement (which is quite impressive).

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Analogue audio testing

Sun Feb 28, 2016 5:35 pm

dom wrote:It tends to get into a bad state after a while, so I wouldn't say it's usable,
but it may run long enough to heard the quality improvement (which is quite impressive).
Are you guys getting any closer to finding out why this is happening? I'd love to be able to go over to using this permanently.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

ahmed.medhat
Posts: 1
Joined: Thu Feb 25, 2016 6:42 pm

Re: Analogue audio testing

Sun Feb 28, 2016 5:52 pm

Looks like I'm getting the same issue after firmware jumping to latest, though audio quality is good, audio playing randomly stops (no pattern at all) and all attempts to rmmod/modprobe all bcm2835 related modules turns pointless!

And only a reboot is what brings it back to life!

I'm testing with mpg123.

Here's what dmesg says once this issue occurs.

[ 43.154912] cfg80211: Exceeded CRDA call max attempts. Not calling CRDA
[19382.729420] vc_vchi_audio_init:295 vc_vchi_audio_init: failed to open VCHI service connection (status=-1)
[19382.729448] vc_vchi_audio_init:308 vc_vchi_audio_init: closing 0: (null)
[19382.729459] vc_vchi_audio_init:314 vc_vchi_audio_init: error
[19382.729468] bcm2835_audio_open_connection:406 bcm2835_audio_open_connection: failed to initialize audio service
[19382.729712] vc_vchi_audio_init:295 vc_vchi_audio_init: failed to open VCHI service connection (status=-1)
[19382.729728] vc_vchi_audio_init:308 vc_vchi_audio_init: closing 0: (null)
[19382.729737] vc_vchi_audio_init:314 vc_vchi_audio_init: error
[19382.729746] bcm2835_audio_open_connection:406 bcm2835_audio_open_connection: failed to initialize audio service
[19441.273909] vc_vchi_audio_init:295 vc_vchi_audio_init: failed to open VCHI service connection (status=-1)
[19441.273939] vc_vchi_audio_init:308 vc_vchi_audio_init: closing 0: (null)
[19441.273949] vc_vchi_audio_init:314 vc_vchi_audio_init: error
[19441.273959] bcm2835_audio_open_connection:406 bcm2835_audio_open_connection: failed to initialize audio service
[19465.766260] vc_vchi_audio_init:295 vc_vchi_audio_init: failed to open VCHI service connection (status=-1)
[19465.766289] vc_vchi_audio_init:308 vc_vchi_audio_init: closing 0: (null)
[19465.766299] vc_vchi_audio_init:314 vc_vchi_audio_init: error
[19465.766308] bcm2835_audio_open_connection:406 bcm2835_audio_open_connection: failed to initialize audio service
[19472.211450] vc_vchi_audio_init:295 vc_vchi_audio_init: failed to open VCHI service connection (status=-1)
[19472.211479] vc_vchi_audio_init:308 vc_vchi_audio_init: closing 0: (null)
[19472.211489] vc_vchi_audio_init:314 vc_vchi_audio_init: error
[19472.211498] bcm2835_audio_open_connection:406 bcm2835_audio_open_connection: failed to initialize audio service

User avatar
becka
Posts: 5
Joined: Fri Feb 19, 2016 12:51 pm

Re: Analogue audio testing

Sun Feb 28, 2016 5:53 pm

I can confirm my earlier findings of this happening in long, not perfectly reproducible intervals. 45 minutes seems common, but sometimes several hours. When trying to restart audio after it happens, I hear a short crackle, then silence, only remedied by a reboot.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2123
Joined: Thu Jul 11, 2013 2:37 pm

Re: Analogue audio testing

Mon Feb 29, 2016 8:48 am

GTR2Fan wrote:
dom wrote:It tends to get into a bad state after a while, so I wouldn't say it's usable,
but it may run long enough to heard the quality improvement (which is quite impressive).
Are you guys getting any closer to finding out why this is happening? I'd love to be able to go over to using this permanently.
Things are a bit busy this week :D
Rockets are loud.
https://astro-pi.org

User avatar
ibisum
Posts: 11
Joined: Sat Sep 15, 2012 2:10 pm
Location: Vienna, Austria
Contact: Website

Re: Analogue audio testing

Mon Feb 29, 2016 12:10 pm

Just wanted to pitch in and confirm: audio quality is much better on my rPi-2, thank you very much for this - it means the rPi is qualified for places it wasn't, previously .. (studio) .. so I'm quite chuffed. I will now happily put this to use for audio things. And so I will test for hangs, also .. anything in particular that would help with the debugging? FWIW, I'd be happy to rig up kernel-module debugging, if there is a specific rig you might recommend? gdbserver on something?
;
--
ibisum
{ repeat:generate::consume::produce::destroy }

hollol
Posts: 8
Joined: Sun Feb 28, 2016 8:31 am

Re: Analogue audio testing

Mon Feb 29, 2016 12:16 pm

dom wrote:
hollol wrote:Did anyone tested this on Openelec (6.0.x) so far?
You need to update the firmware, but yes it can be enabled.
It tends to get into a bad state after a while, so I wouldn't say it's usable,
but it may run long enough to heard the quality improvement (which is quite impressive).
Which files do I actually have to exchange on my Openelec boot partition (kernel.img, start.elf, ...?) in order to enable the new sound output in my config.txt. And where do I find these files (Github?).

I would be very happy to take part in the testing.

Thanks, Lars

User avatar
ibisum
Posts: 11
Joined: Sat Sep 15, 2012 2:10 pm
Location: Vienna, Austria
Contact: Website

Re: Analogue audio testing

Mon Feb 29, 2016 12:20 pm

Lars - I booted to raspian, and used rpi-update to get this applied .. from that point on you can boot any other distro and still have these settings, as it is a firmware update - i.e. not specific to any OS. I think its probably best that such updates be done with raspian/rpi-update, personally ..
;
--
ibisum
{ repeat:generate::consume::produce::destroy }

User avatar
RST8
Posts: 64
Joined: Tue Nov 25, 2014 1:57 pm

Re: Analogue audio testing

Mon Feb 29, 2016 1:39 pm

Just tried this with volumio 1.55 on a model B V1, (256RAM) and sadly the results are pretty horrible, lots of crackles and clipped audio to the point of not being usable.
I'll try and a B+ shortly.

Joe

jon_p
Posts: 4
Joined: Fri Sep 21, 2012 9:56 am

Re: Analogue audio testing

Tue Mar 01, 2016 12:49 pm

RST8 wrote:Just tried this with volumio 1.55 on a model B V1, (256RAM) and sadly the results are pretty horrible, lots of crackles and clipped audio to the point of not being usable.
I did the same with MoOde 2.5 and got the same result.
I'm assuming that it is overriding the mixer settings and using the old driver, except with unexpected settings resulting in the lo-fi sound.

cjan
Posts: 737
Joined: Sun May 06, 2012 12:00 am

Re: Analogue audio testing

Tue Mar 01, 2016 2:13 pm

my ears is wood, so how can test it OK or not? is there a test program?

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Analogue audio testing

Tue Mar 01, 2016 2:21 pm

cjan wrote:my ears is wood, so how can test it OK or not? is there a test program?
There's no need for a special test program. Noise on the analogue output drops close to zero and distortion is now down to non-annoying levels. I'd say that it's almost impossible to not hear the difference when playing back nearly anything.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2123
Joined: Thu Jul 11, 2013 2:37 pm

Re: Analogue audio testing

Thu Mar 03, 2016 8:14 pm

Several bugfixes are in the latest firmware build:

- Warbling on OMX-based playback applications should now be fixed as we report sample-precise latency now
- Pause/resume now fixed
- Clear the accumulators at mute/start/stop to prevent small glitches when playback is started/stopped after the first time the driver's used
- The idle value is now at 50% duty cycle which prevents a small discontinuity on opening the driver
Rockets are loud.
https://astro-pi.org

andrum99
Posts: 847
Joined: Fri Jul 20, 2012 2:41 pm

Re: Analogue audio testing

Thu Mar 03, 2016 8:41 pm

Are there any implications in terms of ARM CPU usage with the new modulation, versus the existing setup? I'm guessing the answer is "no" and the whole thing runs on the GPU.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2123
Joined: Thu Jul 11, 2013 2:37 pm

Re: Analogue audio testing

Thu Mar 03, 2016 8:59 pm

andrum99 wrote:Are there any implications in terms of ARM CPU usage with the new modulation, versus the existing setup? I'm guessing the answer is "no" and the whole thing runs on the GPU.
No, the whole thing runs on the GPU.
Rockets are loud.
https://astro-pi.org

cjan
Posts: 737
Joined: Sun May 06, 2012 12:00 am

Re: Analogue audio testing

Fri Mar 04, 2016 1:29 am

jdb wrote:Several bugfixes are in the latest firmware build:

- Warbling on OMX-based playback applications should now be fixed as we report sample-precise latency now
- Pause/resume now fixed
- Clear the accumulators at mute/start/stop to prevent small glitches when playback is started/stopped after the first time the driver's used
- The idle value is now at 50% duty cycle which prevents a small discontinuity on opening the driver
update to #848, no sound & youtube halt, no idea if others update in #848 cause?

User avatar
ibisum
Posts: 11
Joined: Sat Sep 15, 2012 2:10 pm
Location: Vienna, Austria
Contact: Website

Re: Analogue audio testing

Fri Mar 04, 2016 7:08 am

Is this also valid for the new Raspi 3? I just got mine in the mail and thought I'd see if this is applicable for it ..
;
--
ibisum
{ repeat:generate::consume::produce::destroy }

pik33
Posts: 182
Joined: Thu Sep 10, 2015 4:26 pm

Re: Analogue audio testing

Fri Mar 04, 2016 7:39 am

At last :) Some time ago I wrote this type of PWM audio driver (8-bit, 300 kHz) for Parallax Propeller chip using second order noise shaping filter. The difference from standard 11-bit with dithering was huge.

I always wanted to write something like this for Raspberry Pi bur the lack of detailed knowledge of how to write a linux driver for the Pi combined with lack of free time for learning stopped this.

I'll test this driver today :) No more usb audio dongles!

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2123
Joined: Thu Jul 11, 2013 2:37 pm

Re: Analogue audio testing

Fri Mar 04, 2016 11:09 am

cjan wrote:
jdb wrote:Several bugfixes are in the latest firmware build:

- Warbling on OMX-based playback applications should now be fixed as we report sample-precise latency now
- Pause/resume now fixed
- Clear the accumulators at mute/start/stop to prevent small glitches when playback is started/stopped after the first time the driver's used
- The idle value is now at 50% duty cycle which prevents a small discontinuity on opening the driver
update to #848, no sound & youtube halt, no idea if others update in #848 cause?
- What video are you trying to play?
- Did this video work before running rpi-update?
- Is anything else (aplay, omxplayer) affected?
Rockets are loud.
https://astro-pi.org

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5341
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Analogue audio testing

Fri Mar 04, 2016 11:20 am

ibisum wrote:Is this also valid for the new Raspi 3? I just got mine in the mail and thought I'd see if this is applicable for it ..
Yes

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Analogue audio testing

Fri Mar 04, 2016 11:22 am

I can report back that the issues you've fixed are, erm, fixed. This just leaves the 'dying' issue to be fixed then I'll be using this full time. Thank you. :)
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

cjan
Posts: 737
Joined: Sun May 06, 2012 12:00 am

Re: Analogue audio testing

Fri Mar 04, 2016 11:56 am

jdb wrote:- What video are you trying to play?
- Did this video work before running rpi-update?
- Is anything else (aplay, omxplayer) affected?
- Chromium play youtube, only 1 sec then stop, #options then everything back to normal.
- yes
- not yet test

lb
Posts: 261
Joined: Sat Jan 28, 2012 8:07 pm

Re: Analogue audio testing

Fri Mar 04, 2016 12:22 pm

This is a very cool effort! Are there any ideas to get around the issues with PWM buffer underrun? Doesn't the VC4 have some internal memories that can be used, or maybe the builtin cache can help?

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2123
Joined: Thu Jul 11, 2013 2:37 pm

Re: Analogue audio testing

Fri Mar 04, 2016 1:49 pm

lb wrote:This is a very cool effort! Are there any ideas to get around the issues with PWM buffer underrun? Doesn't the VC4 have some internal memories that can be used, or maybe the builtin cache can help?
It's complicated. The code surrounding the SDRAM PVT/re-clocking is gnarly impenetrable VPU assembly and tying some sort of buffering into this is fraught with danger - if you get into a state where a VPU read makes it out of the cache and on to the bus to SDRAM with SDRAM disabled, the bus matrix stalls all the way down to the VPU which means your chip effectively locks up.

I need to stop DMA from stalling on a read while SDRAM is disabled which probably means peeking at the DMA read address, preloading 2-3 cachelines of the next set of data into GPU L2, then running PVT. Tricky to get right.
Rockets are loud.
https://astro-pi.org

Return to “Advanced users”