User avatar
joan
Posts: 14760
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: pigpio - request for testers

Sun Sep 25, 2016 11:45 am

@fivdi

Your Pi shows the problem when you use dtparam=audio=on.

That setting has no effect on my Pi3B (144000 still reported).

It does suggest a possibility which I will now try out.

User avatar
DougieLawson
Posts: 37721
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: pigpio - request for testers

Sun Sep 25, 2016 11:59 am

Next test on my 3B with this config.txt

Code: Select all

#
get_clocks before

Code: Select all

[email protected]:~/c# ./get_clocks
GP0: src=0 divi=0    divf=0    freq=0.000   Hz
GP1: src=6 divi=20   divf=0    freq=25.000  MHz
GP2: src=1 divi=600  divf=0    freq=32.000  kHz
PCM: src=0 divi=0    divf=0    freq=0.000   Hz
PWM: src=0 divi=0    divf=0    freq=0.000   Hz

Code: Select all

[email protected]:/tmp# ./f160849.sh
144000 pigpio-log
[email protected]:/tmp# ./f160849.sh
143988 pigpio-log
get_clocks after

Code: Select all

[email protected]:~/c# ./get_clocks
GP0: src=0 divi=0    divf=0    freq=0.000   Hz
GP1: src=6 divi=20   divf=0    freq=25.000  MHz
GP2: src=1 divi=600  divf=0    freq=32.000  kHz
PCM: src=6 divi=250  divf=0    freq=2.000   MHz
PWM: src=6 divi=50   divf=0    freq=10.000  MHz
After a reboot with just

Code: Select all

dtparam=audio=on
in /boot/config.txt

Before

Code: Select all

[email protected]:~/c# ./get_clocks
GP0: src=0 divi=0    divf=0    freq=0.000   Hz
GP1: src=6 divi=20   divf=0    freq=25.000  MHz
GP2: src=1 divi=600  divf=0    freq=32.000  kHz
PCM: src=0 divi=0    divf=0    freq=0.000   Hz
PWM: src=6 divi=5    divf=0    freq=100.000 MHz

Code: Select all

[email protected]:/tmp# ./f160849.sh
127512 pigpio-log
[email protected]:/tmp# ./f160849.sh
127524 pigpio-log
After

Code: Select all

[email protected]:~/c# ./get_clocks
GP0: src=0 divi=0    divf=0    freq=0.000   Hz
GP1: src=6 divi=20   divf=0    freq=25.000  MHz
GP2: src=1 divi=600  divf=0    freq=32.000  kHz
PCM: src=6 divi=250  divf=0    freq=2.000   MHz
PWM: src=6 divi=50   divf=0    freq=10.000  MHz
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
joan
Posts: 14760
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: pigpio - request for testers

Sun Sep 25, 2016 12:23 pm

I've tried dozens of combinations of config.txt. Still can't get it to fail. I even cut&paste dtparam=audio=on into my config.txt to see if I typed it wrong.

My Pi3B is an up to date jessie (well it was a few days ago) with 4.4.21-v7+ #911 SMP.

Code: Select all

processor	: 3
model name	: ARMv7 Processor rev 4 (v7l)
BogoMIPS	: 38.40
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

Hardware	: BCM2709
Revision	: a02082
Serial		: 00000000bb786d6b

dgordon42
Posts: 782
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: pigpio - request for testers

Sun Sep 25, 2016 12:32 pm

Try running a sound command, and it will fail afterwards, like this:

Code: Select all

Last login: Sun Sep 25 12:10:16 2016
[email protected] ~ $ cd joans_test/
[email protected] ~/joans_test $ sudo ./get_clocks
GP0: src=0 divi=0    divf=0    freq=0.000   Hz
GP1: src=6 divi=20   divf=0    freq=25.000  MHz
GP2: src=1 divi=600  divf=0    freq=32.000  kHz
PCM: src=0 divi=0    divf=0    freq=0.000   Hz
PWM: src=0 divi=0    divf=0    freq=0.000   Hz
[email protected] ~/joans_test $ sudo pigpiod
[email protected] ~/joans_test $ sudo ./get_clocks
GP0: src=0 divi=0    divf=0    freq=0.000   Hz
GP1: src=6 divi=20   divf=0    freq=25.000  MHz
GP2: src=1 divi=600  divf=0    freq=32.000  kHz
PCM: src=6 divi=250  divf=0    freq=2.000   MHz
PWM: src=0 divi=0    divf=0    freq=0.000   Hz
[email protected] ~/joans_test $ ./testing.sh
144000 pigpio-log
[email protected] ~/joans_test $ sudo ./get_clocks
GP0: src=0 divi=0    divf=0    freq=0.000   Hz
GP1: src=6 divi=20   divf=0    freq=25.000  MHz
GP2: src=1 divi=600  divf=0    freq=32.000  kHz
PCM: src=6 divi=250  divf=0    freq=2.000   MHz
PWM: src=6 divi=50   divf=0    freq=10.000  MHz
[email protected] ~/joans_test $ cd ../python_games
[email protected] ~/python_games $ aplay match1.wav
Playing WAVE 'match1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
[email protected] ~/python_games $ cd ../joans_test
[email protected] ~/joans_test $ sudo ./get_clocks
GP0: src=0 divi=0    divf=0    freq=0.000   Hz
GP1: src=6 divi=20   divf=0    freq=25.000  MHz
GP2: src=1 divi=600  divf=0    freq=32.000  kHz
PCM: src=6 divi=250  divf=0    freq=2.000   MHz
PWM: src=6 divi=5    divf=0    freq=100.000 MHz
[email protected] ~/joans_test $ ./testing.sh
7032 pigpio-log
[email protected] ~/joans_test $

Playing a sound seems to change the PWM clock from 10MHz to 100MHz, and the test fails.
The 'booting with a HMDI monitor plugged in ' thing stops this from happening if the sound is played through the monitor. This is not the case with all monitors.

Hope this helps,
Dave.

User avatar
joan
Posts: 14760
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: pigpio - request for testers

Sun Sep 25, 2016 12:36 pm

@Dave

Yes, playing audio will cause a problem. The test is expected to fail if audio has been played (after the pigpio daemon has been started). It shouldn't fail if audio hasn't been played.

fivdi
Posts: 208
Joined: Sun Sep 23, 2012 8:09 pm
Contact: Website

Re: pigpio - request for testers

Sun Sep 25, 2016 12:47 pm

@joan are you testing with pigpio V50? The is the version that was released with Raspbial Jessie in May.

I'm using pigpio V50 and
Linux raspberrypi 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/Linux

User avatar
joan
Posts: 14760
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: pigpio - request for testers

Sun Sep 25, 2016 1:19 pm

fivdi wrote:@joan are you testing with pigpio V50? The is the version that was released with Raspbial Jessie in May.

I'm using pigpio V50 and
Linux raspberrypi 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/Linux
I'm using V56.

The initial report I had was for V55.

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: pigpio - request for testers

Sun Sep 25, 2016 1:38 pm

I tried it on a RPi1B+, that uses the RPF 7" display and it failed as well, both with HDMI plugged in and without.

So I went and looked at config.txt on the B+ and found this entry

Code: Select all

# Enable audio (added by raspberrypi-sys-mods)
dtparam=audio=on
I commented the line out, rebooted and then ran the script again and got "144000" this time, both with and without HDMI.

I then went to the RPi3 and checked config.txt and had the same "dtparam=audio=on" line so I commented that out, rebooted, and then got the expected "144000" on the RPi3, again both with and without HDMI. I guess audio was turned on after all, and running a desktop was producing some audio (mouse clicks and such), but I didn't realize or think about it since I have no speakers attached. So both the B+ and the RPi3B running desktops failed with audio turned on, and both pass with audio turned off.

User avatar
DougieLawson
Posts: 37721
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: pigpio - request for testers

Sun Sep 25, 2016 2:51 pm

Ah, my 3B with the RPF screen boots to the GUI. I've no idea if it makes sounds because there's no audio device attached to it.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

ChristophK
Posts: 15
Joined: Thu Oct 06, 2016 1:34 pm

Re: pigpio - request for testers

Mon Oct 17, 2016 1:15 pm

I use a HDMI to DVI cable with Raspi3 and in /boot/config.txt "dtparam=audio=on"
126???
with that line disabled it changed to
# dtparam=audio=on
[email protected]:~/Desktop $ ./pigpiotest.sh
144000 pigpio-log

[email protected]:~/PIGPIO $ sudo ./get_clocks
GP0: src=0 divi=0 divf=0 freq=0.000 Hz
GP1: src=6 divi=20 divf=0 freq=25.000 MHz
GP2: src=1 divi=600 divf=0 freq=32.000 kHz
PCM: src=6 divi=250 divf=0 freq=2.000 MHz
PWM: src=6 divi=50 divf=0 freq=10.000 MHz
[email protected]:~/PIGPIO $

Another strange behavior is a changing SPI baudrate. With 100 kHz spi_open ist starts with about 160 kHz (measured on a scope) and after some seconds changes to the correct value.
with audio disabled this also did not happen again.

Return to “General discussion”