Re: [slim] Installing extra packages on piCorePlayer

2020-12-26 Thread paul-


Something may have changedits so hard to keep up with testing.  But

in pCP6.1 the RPI4 used a 64bit kernel with 32 bit userspace.  In this
configuration, onboard audio did not work with mmap turned on.  However
USB and i2s cards worked fine.


in pCP7, in 64bit system, it does now appear that the headphone jack
does work with mmap enabled.



piCorePlayer a small player for the Raspberry Pi in RAM. 
Homepage: https://www.picoreplayer.org

Please 'donate'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations=U7JHY5WYHCNRU=GB_code=USD=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
if you like the piCorePlayer

paul-'s Profile: http://forums.slimdevices.com/member.php?userid=58858
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-26 Thread cliveb

paul- wrote: 
> Squeezelite uses mmap by defaultthere are some cases with a 64bit
> kernel, where it doesn’t work.  I’ve not been very successful setting
> their automatically.
Should I interpret your comment to mean that perhaps the fact 7.0.0
worked fine out of the box with mmap=1 when 6.1.0 didn't could just be
down to luck?



Transporter -> ATC SCM100A

cliveb's Profile: http://forums.slimdevices.com/member.php?userid=348
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-26 Thread paul-

Squeezelite uses mmap by defaultthere are some cases with a 64bit
kernel, where it doesn’t work.  I’ve not been very successful setting
their automatically.



piCorePlayer a small player for the Raspberry Pi in RAM. 
Homepage: https://www.picoreplayer.org

Please 'donate'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations=U7JHY5WYHCNRU=GB_code=USD=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
if you like the piCorePlayer

paul-'s Profile: http://forums.slimdevices.com/member.php?userid=58858
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-26 Thread cliveb


Just been doing a few more experiments.

Using piCorePlayer 6.1.0, I finally discovered that the critical step is
to change the fourth option on the ALSA output setting to 0. After
restarting squeezelite, everything just works, including the GPIO
toggling. No reboot required. Once I discovered this, a quick search of
the forums found a few threads where Paul had stated that mmap=1 doesn't
work on the Pi4B in 64 bit mode. I didn't even realise that 6.1.0 was 64
bit. (Or perhaps it is 32 bit and mmap=1 doesn't work on a Pi4B in any
mode?).

Can anyone explain what the mmap option actually does?
Weird that an audio output setting affects the GPIO control.

Anyhow, I then tried out piCorePlayer 7.0.0.
Both versions (standard - which I presume is 32 bit, and 64 bit) worked
straight out of the box, even with mmap set to 1. Setting the GPIO power
on/off worked without any issue. So I guess whatever the issue was with
mmap has been resolved in Squeezelite 1.9.8 (piCorePlayer 6.1.0 shows
that it uses Squeezelite 1.9.6).

But it is interesting to note that the non-working mmap setting seems to
affect other apparently unrelated subsystems - perhaps not just the GPIO
control. Presumably had Paul or Jeff been aware of this they'd have
pointed me in the right direction much sooner.

Ironic that if I had waited a few days to start playing around with this
and 7.0.0 had been released, none of this would have come to light. But
it has at least revealed a possibly useful piece of info for anyone else
who encounters the issue.



Transporter -> ATC SCM100A

cliveb's Profile: http://forums.slimdevices.com/member.php?userid=348
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-24 Thread paul-


Headphones is the correct output for onboard audio in pCP7



piCorePlayer a small player for the Raspberry Pi in RAM. 
Homepage: https://www.picoreplayer.org

Please 'donate'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations=U7JHY5WYHCNRU=GB_code=USD=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
if you like the piCorePlayer

paul-'s Profile: http://forums.slimdevices.com/member.php?userid=58858
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-24 Thread cliveb


Jeff07971 wrote: 
> I ALWAYS resize the fs to full sdcard capacity before doing anything
I did try that at one point, but it didn't seem to help.

Jeff07971 wrote: 
> Maybe its ANY operation rather than changing O/P device
I guess that's possible.

Jeff07971 wrote: 
> Edit2: I Used piCorePlayer7.0.0b6
I'll try using that version and see what happens.
But probably not for a couple of days now.
(Interesting that the default output device for you was CARD=Headphones
rather than CARD=ALSA. I'll check that when I try 7.0.0b6).

Merry Christmas!



Transporter -> ATC SCM100A

cliveb's Profile: http://forums.slimdevices.com/member.php?userid=348
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-24 Thread Jeff07971


Hi Cliveb

Glad you got it working, if by a long winded process !

However

> So it would seem that switching the audio output device is the crucial
> step that gets everything going.
> (I speculate that the reason others say "it just works" is perhaps
> because they had already set their output device to something other than
> the default analog audio).

I don't think that this can be the case, as when testing for you I did
not change the output device at all !

BUT

I ALWAYS resize the fs to full sdcard capacity before doing anything

Maybe its ANY operation rather than changing O/P device

I'll give it a try when I get a minute and report back

Jeff



*Want a webapp ?* Get SqueezeLite-X !
https://forums.slimdevices.com/showthread.php?108550-Announce-Squeezelite-X=903953=1#post903953

Jeff07971's Profile: http://forums.slimdevices.com/member.php?userid=49290
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-24 Thread cliveb


OK, today the GPIO pin suddenly started working as desired, but I had no
idea which of the many things I fiddled with had done the trick. 
So I've spent a lot of time experimenting, being very methodical to try
and find out what fixed it.

Here's what I found. Bear in mind this is on a RPi4 using piCorePlayer
6.1.0.

1. Flash SD card with a fresh piCorePlayer image and boot up.
2. SSH in and check some things:
a). GPIO 13 is in mode IN, voltage low.
b). ps -ef shows squeezelite running with these options: *-o
hw:CARD=ALSA -a 80 1*
3. Try playing a track: No audio, pause causes track to restart rather
than pause, seek skips to position but then plays back a loop of about 5
secs.
4. Set power on/off to GPIO 13, active high. Squeezelite restarts.
5. readall.sh now shows GPIO in mode OUT, voltage high (even though
player is off).
6. Switching player on & off makes no difference; GPIO 13 remains high
at all times.
7. ps -ef shows squeezelite with options: *-o hw:CARD=ALSA -a 80 1 -G 13
H*
8. Try playing a track: no change, behaviour as in (3) above.
9. Restart squeezelite: no change.
10. Reboot piCorePlayer: no change.
11. Change audio output to RPiDAC and save, then back to analog audio
and save. Squeezelite fails to restart.
12. Reboot.
13. Now we have a fully functioning player!
a). GPIO 13 behaves as required: voltage low when player is off, high
when player is on.
b). Playback works correctly: pause pauses, seek skips as it should.
c). ps -ef shows squeezelite options: *-o hw:CARD=ALSA -a 80 0 -G 13 H*

So it would seem that switching the audio output device is the crucial
step that gets everything going.
(I speculate that the reason others say "it just works" is perhaps
because they had already set their output device to something other than
the default analog audio).

I am also intruiged by the change in the parameters to the -a option
that happened.
That second parameter (0 instead of 1) is presumably the thing that got
the audio output working.
The documentation says that this is the "period count or size in bytes".
No idea what that means.

In summary, to get it working on the Pi4, the minimum sequence of steps
is:

1. Flash SD card with piCorePlayer, boot up.
2. Set power on/off to desired GPIO.
3. Set audio output to something else, save.
4. Set audio output back to analog, save.
5. Reboot.
6. Player now behaves as expected.

Mysteries that remain:

1. Why does changing the audio output fix the behaviour of the GPIO
control?
2. Why did pause and seek do the wrong things until the audio output was
fixed? (It's not like LMS has any idea that the player's output device
is set up wrong).

Thanks to everyone who helped me with this.
It was a bit of an ordeal, but of course orders of magnitude less work
than creating my own plugin, as I had originally thought I would need to
do!



Transporter -> ATC SCM100A

cliveb's Profile: http://forums.slimdevices.com/member.php?userid=348
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread cliveb


Just done some more experiments and wonder if the results might be at
all informative.

On the Pi4, I started with both the gpio-poweroff tweak and the
squeezelite power on/off option switched off.
I never touched the gpio-poweroff tweak during these tests.

Logged in via SSH, I checked the state of GPIO 13. It was set as an
input, so I set it to output:

Code:

pcp-gpio mode 13 out


Next, I ensured it was low:

Code:

pcp-gpio write 13 0


and verified that it was low:

Code:

pcp-gpio read 13


Next, I made sure that the player was switched off in the LMS web
interface.
Then I turned on the squeezelite power on/off option, setting the GPIO
pin as 13 and active high.
After saving, which restarted squeezelte, the LMS web interface showed
te player as OFF.
But when I ran:

Code:

pcp-gpio read 13


the pin was HIGH, even though the player was off.
Switching the player on & off in the LMS web interface made no
difference to the state of GPIO 13; it stayed HIGH at all times.
So the squeezelite power on/off option is clearly doing SOMETHING with
GPIO 13; just not what is expected.

Just out of interest, I tried the same experiment but choosing the
Active LOW option in the squeezelite power on/off setting.
This time GPIO 13 stayed LOW at all times.



Transporter -> ATC SCM100A

cliveb's Profile: http://forums.slimdevices.com/member.php?userid=348
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread cliveb


paul- wrote: 
> Turning the gpio-poweroff on then off would put things back in the
> default state.  There is nothing special that needs to be done.  However
> if two drivers are trying to claim the same GPIO, then things are
> unpredictable.
OK, thanks.

Q: is the gpio-poweroff option another way of achieving the same thing
as the Squeezelite power on/off setting?
(The options states "Refer to /mnt/mmcblk0p1/overlays/README", but that
file doesn't exist).

paul- wrote: 
> You've mentioned a pi2 and a pi4, I really think you've been swapping
> things around, and getting a wrong IP address.
No, I absolutely haven't been getting them mixed up. They were never
powered up at the same time. I know the IP addresses I used were
correct.


paul- wrote: 
> Check the information page on the LMS settings interface, it will list
> all known players connected (or those recently connected)  and their ip
> adresses.  Do you see more than one called piCorePlayer?
As far as I can see, my LMS (7.9.2) only lists the players currently
connected. Perhaps recently connected ones are shown in later versions
of LMS?

paul- wrote: 
> Oh, and if you are using internet streaming services, you really need to
> upgrade your LMS server.  If you are just using local music, then 7.9.2
> is fine.
I only use local music. 
Mind you, I did wonder if the fact that LMS is running on version 4.1.0
of piCorePlayer, but the players I'm testing are running version 6.1.0,
might be a factor.
But that wouldn't explain why the Pi2 started working and the Pi4 still
won't.
And I still don't understand why the Pi2 started working when it had
previously not been.

But if you are confident that updating LMS would solve this problem,
I'll give it a go.

I know it sounds suspicious, but I am 100% certain that I haven't been
getting any IP addresses wrong.
I just restarted the Pi4, it appears in LMS with an IP address of
192.168.0.107, and when I ssh to that address and play with pcp-gpio,
the pins work as expected.
But they don't respond to switching the player on & off from LMS.

I even went to the extent of re-writing the SD card with a fresh
piCorePlayer image and starting again from scratch, just in case
something had become corrupted. But it still doesn't work.



Transporter -> ATC SCM100A

cliveb's Profile: http://forums.slimdevices.com/member.php?userid=348
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread paul-


Turning the gpio-poweroff on then off would put things back in the
default state.  There is nothing special that needs to be done.  However
if two drivers are trying to claim the same GPIO, then things are
unpredictable.

You've mentioned a pi2 and a pi4, I really think you've been swapping
things around, and getting a wrong IP address.  Check the information
page on the LMS settings interface, it will list all known players
connected (or those recently connected)  and their ip adresses.  Do you
see more than one called piCorePlayer?

Oh, and if you are using internet streaming services, you really need to
upgrade your LMS server.  If you are just using local music, then 7.9.2
is fine.



piCorePlayer a small player for the Raspberry Pi in RAM. 
Homepage: https://www.picoreplayer.org

Please 'donate'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations=U7JHY5WYHCNRU=GB_code=USD=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
if you like the piCorePlayer

paul-'s Profile: http://forums.slimdevices.com/member.php?userid=58858
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread cliveb


OK, there are some developments...

First of all, when browsing around I discovered this on the Tweaks
page:

32642
I wondered if this had anything to do with things, so I tried activating
the gpio-poweroff tweak (setting the pin to 13) and rebooted. But it
didn't seem to do anything.
I deactivated it, rebooted, and then to my surprise the Squeezelite
power on/off started working (when switching the player on/off via the
LMS web interface).

Q: DOES ACTIVATING THE GPIO-POWEROFF TWEAK CAUSE SOMETHING TO GET
SWITCHED ON IN THE PI HARDWARE?

This was all using the Pi2.

So I returned to the Pi4 only to discover that the same sequence of
events did NOT cause the power on/off to start working.

OK, so now on to Paul's suggestion:
paul- wrote: 
> How many players do you have on your LMS, are you sure you are selecting
> the correct player when toggling power?
> 
> There are 2 command line tools provided with pcp.
> 
> pcp-gpio (which will let you do simple things like toggle and output or
> read an input.)
> readall.sh (This is a simple shell script that reads the current state
> of the gpio)
> 
Yes, I am sure it's the correct player. It's the only one called
"picoreplayer" in LMS :-)

I played around with pcp-gpio & readall.sh, and confirmed that the pins
are behaving as they should:
readall confirmed that GPIO was in OUT mode
"pcp-gpio write 13 1" sets GPIO13 to 3.25V, and "pcp-gpio write 13 0"
sets it to 0V.
This was verified by both the output from readall, and using my
multimeter to check the voltage.
But turning the player on & off in the LMS web interface didn't change
GPIO13.
The voltage shown on the multimeter stayed the same, and the V column in
the readall output didn't change. 
This was on the Pi4.

Thinking I might have imagined it working on the Pi2, I returned to that
and sure enough the Squeezelite power on/off IS working when the payer
is switched in the LMS web interface. (And just to verify things, it
also worked when turning the player on & off using the Squeezer app on
my phone).

So it's all a bit perplexing.

Responding to Jeff:
Jeff07971 wrote: 
> 
> @Cliveb What server are you using ?
> 
LMS 7.9.2, running in another piCorePlayer on a RPi3 in the loft.



Transporter -> ATC SCM100A

cliveb's Profile: http://forums.slimdevices.com/member.php?userid=348
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread Jeff07971


cliveb wrote: 
> This one:
> 
> Stays at 3.27V at all times. (3.25V on the Pi4 I was trying before).

Its OK I thought that the pin might not be actively driven low, I tried
with my DMM and verified that it actaully is.

@Paul- Another command to be added to the "toolbox" !

@Cliveb What server are you using ?

Jeff



*Want a webapp ?* Get SqueezeLite-X !
https://forums.slimdevices.com/showthread.php?108550-Announce-Squeezelite-X=903953=1#post903953

Jeff07971's Profile: http://forums.slimdevices.com/member.php?userid=49290
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread paul-


How many players do you have on your LMS, are you sure you are selecting
the correct player when toggling power?

There are 2 command line tools provided with pcp.

pcp-gpio (which will let you do simple things like toggle and output or
read an input.)
readall.sh (This is a simple shell script that reads the current state
of the gpio)

So start with "sudo readall.sh" and make sure GPIO 13 is an output and
the software side is toggling with squeezelite.  If this tool shows the
output toggling, then you fried your board.  If it is not toggleing,
then something is setup wrong on the squeezelite/lms side.   But use
pcp-gpio command to toggle your output.


Code:


  tc@pCP7-Test:/usr/local/bin$ sudo readall.sh
  +-+-+--+---+-++-+---+--+-+-+
  | BCM |  NAME   | MODE | V |  Physical  | V | MODE |  NAME   | BCM |
  +-+-+--+---+-++-+---+--+-+-+
  | |3.3v |  |   |   1 ||  2  |   |  |  5v | |
  |  2  | GPIO  2 | ALT0 | 1 |   3 ||  4  |   |  |  5v | |
  |  3  | GPIO  3 | ALT0 | 1 |   5 ||  6  |   |  |  0v | |
  |  4  | GPIO  4 |   IN | 1 |   7 ||   8 | 0 |   IN | GPIO 14 |  14 |
  | |  0v |  |   |   9 ||  10 | 1 |   IN | GPIO 15 |  15 |
  | 17  | GPIO 17 |   IN | 0 |  11 ||  12 | 0 | ALT0 | GPIO 18 |  18 |
  | 27  | GPIO 27 |   IN | 0 |  13 ||  14 |   |  |  0v | |
  | 22  | GPIO 22 |   IN | 0 |  15 ||  16 | 0 |   IN | GPIO 23 |  23 |
  | |3.3v |  |   |  17 ||  18 | 0 |   IN | GPIO 24 |  24 |
  | 10  | GPIO 10 | ALT0 | 0 |  19 ||  20 |   |  |  0v | |
  |  9  | GPIO  9 | ALT0 | 0 |  21 ||  22 | 0 |   IN | GPIO 25 |  25 |
  | 11  | GPIO 11 | ALT0 | 0 |  23 ||  24 | 1 |  OUT | GPIO  8 |   8 |
  | |  0v |  |   |  25 ||  26 | 1 |  OUT | GPIO  7 |   7 |
  |  0  | GPIO  0 |   IN | 1 |  27 ||  28 | 1 |   IN | GPIO  1 |   1 |
  |  5  | GPIO  5 |   IN | 1 |  29 ||  30 |   |  |  0v | |
  |  6  | GPIO  6 |   IN | 1 |  31 ||  32 | 0 |   IN | GPIO 12 |  12 |
  | 13  | GPIO 13 |  OUT | 0 |  33 ||  34 |   |  |  0v | |
  | 19  | GPIO 19 | ALT0 | 0 |  35 ||  36 | 0 |   IN | GPIO 16 |  16 |
  | 26  | GPIO 26 |   IN | 0 |  37 ||  38 | 0 | ALT0 | GPIO 20 |  20 |
  | |  0v |  |   |  39 ||  40 | 0 | ALT0 | GPIO 21 |  21 |
  +-+-+--+---+-++-+---+--+-+-+
  | BCM |  NAME   | MODE | V |  Physical  | V | MODE |  NAME   | BCM |
  +-+-+--+---+-++-+---+--+-+-+
  tc@pCP7-Test:/usr/local/bin$ sudo pcp-gpio toggle 13
  tc@pCP7-Test:/usr/local/bin$ sudo readall.sh
  +-+-+--+---+-++-+---+--+-+-+
  | BCM |  NAME   | MODE | V |  Physical  | V | MODE |  NAME   | BCM |
  +-+-+--+---+-++-+---+--+-+-+
  | |3.3v |  |   |   1 ||  2  |   |  |  5v | |
  |  2  | GPIO  2 | ALT0 | 1 |   3 ||  4  |   |  |  5v | |
  |  3  | GPIO  3 | ALT0 | 1 |   5 ||  6  |   |  |  0v | |
  |  4  | GPIO  4 |   IN | 1 |   7 ||   8 | 0 |   IN | GPIO 14 |  14 |
  | |  0v |  |   |   9 ||  10 | 1 |   IN | GPIO 15 |  15 |
  | 17  | GPIO 17 |   IN | 0 |  11 ||  12 | 0 | ALT0 | GPIO 18 |  18 |
  | 27  | GPIO 27 |   IN | 0 |  13 ||  14 |   |  |  0v | |
  | 22  | GPIO 22 |   IN | 0 |  15 ||  16 | 0 |   IN | GPIO 23 |  23 |
  | |3.3v |  |   |  17 ||  18 | 0 |   IN | GPIO 24 |  24 |
  | 10  | GPIO 10 | ALT0 | 0 |  19 ||  20 |   |  |  0v | |
  |  9  | GPIO  9 | ALT0 | 0 |  21 ||  22 | 0 |   IN | GPIO 25 |  25 |
  | 11  | GPIO 11 | ALT0 | 0 |  23 ||  24 | 1 |  OUT | GPIO  8 |   8 |
  | |  0v |  |   |  25 ||  26 | 1 |  OUT | GPIO  7 |   7 |
  |  0  | GPIO  0 |   IN | 1 |  27 ||  28 | 1 |   IN | GPIO  1 |   1 |
  |  5  | GPIO  5 |   IN | 1 |  29 ||  30 |   |  |  0v | |
  |  6  | GPIO  6 |   IN | 1 |  31 ||  32 | 0 |   IN | GPIO 12 |  12 |
  | 13  | GPIO 13 |  OUT | 1 |  33 ||  34 |   |  |  0v | |
  | 19  | GPIO 19 | ALT0 | 0 |  35 ||  36 | 0 |   IN | GPIO 16 |  16 |
  | 26  | GPIO 26 |   IN | 0 |  37 ||  38 | 0 | ALT0 | GPIO 20 |  20 |
  | |  0v |  |   |  39 ||  40 | 0 | ALT0 | GPIO 21 |  21 |
  +-+-+--+---+-++-+---+--+-+-+
  | BCM |  NAME   | MODE | V |  Physical  | V | MODE |  NAME   | BCM |
  +-+-+--+---+-++-+---+--+-+-+
  tc@pCP7-Test:/usr/local/bin$ sudo pcp-gpio toggle 13
  tc@pCP7-Test:/usr/local/bin$ sudo readall.sh
  +-+-+--+---+-++-+---+--+-+-+
  | BCM |  NAME   | MODE | V |  Physical  | V | MODE |  NAME   | BCM |
  +-+-+--+---+-++-+---+--+-+-+
  | |3.3v |  |   |   1 ||  2  |   |  |  5v | |
  |  2  | GPIO  2 | ALT0 | 1 |   3 ||  4  |   |  |  5v | |
  |  

Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread cliveb


Jeff07971 wrote: 
> Just tried it on my Pi4 works and toggles fine, what meter are you using
> ?
> 
> 32639
This one:

32641

Stays at 3.27V at all times. (3.25V on the Pi4 I was trying before).


+---+
|Filename: meter.jpg|
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=32641|
+---+


Transporter -> ATC SCM100A

cliveb's Profile: http://forums.slimdevices.com/member.php?userid=348
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread Jeff07971


cliveb wrote: 
> I've just tried on a Pi2 with the same results: GPIO 13 remains high at
> all times.
> I must be missing something that's glaringly obvious.

Just tried it on my Pi4 works and toggles fine, what meter are you using
?

32639


+---+
|Filename: 20-12-23 13-32-05 2276.jpg   |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=32639|
+---+


*Want a webapp ?* Get SqueezeLite-X !
https://forums.slimdevices.com/showthread.php?108550-Announce-Squeezelite-X=903953=1#post903953

Jeff07971's Profile: http://forums.slimdevices.com/member.php?userid=49290
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread cliveb


Jeff07971 wrote: 
> I Doubt it its fairly foolproof !
> 
> I don't have any Pi4's as players, I'll burn a card and test on a Pi4
> 
> Jeff
I've just tried on a Pi2 with the same results: GPIO 13 remains high at
all times.
I must be missing something that's glaringly obvious.



Transporter -> ATC SCM100A

cliveb's Profile: http://forums.slimdevices.com/member.php?userid=348
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread Jeff07971


cliveb wrote: 
> OK, thanks.
> I've done exactly what you suggest and GPIO 13 (pin #33) stays
> obstinately on 3.25V whether the player is on or off.
> Have I done something stupid?
> 

I Doubt it its fairly foolproof !

I don't have any Pi4's as players, I'll burn a card and test on a Pi4

Jeff



*Want a webapp ?* Get SqueezeLite-X !
https://forums.slimdevices.com/showthread.php?108550-Announce-Squeezelite-X=903953=1#post903953

Jeff07971's Profile: http://forums.slimdevices.com/member.php?userid=49290
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread cliveb


Jeff07971 wrote: 
> Apart from setting the GPIO and the Active State (High or Low) in the
> Web settings page nothing else needs to be done.
> 
> I use GPIO13 as its right next to 0v and I know its not used by my
> Hifiberry Hat
> 
> Jeff
OK, thanks.
I've done exactly what you suggest and GPIO 13 (pin #33) stays
obstinately on 3.25V whether the player is on or off.
Have I done something stupid?

32634


+---+
|Filename: gpio.png |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=32634|
+---+


Transporter -> ATC SCM100A

cliveb's Profile: http://forums.slimdevices.com/member.php?userid=348
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread Jeff07971


cliveb wrote: 
> OK, thanks. So GPIO 13 is physical pin #33.
> I don't have any HAT installed. This is a fresh piCorePlayer install
> with nothing added.
> Should the Squeezelite power on/off setting just work, or do I need to
> enable it somehow?
> 
> Incidentally, is there a recommendation for which GPIO pin would be best
> to use for the power on/off setting?
> I'm using a RPi4 if that's relevant.

Apart from setting the GPIO and the Active State (High or Low) in the
Web settings page nothing else needs to be done.

I use GPIO13 as its right next to 0v and I know its not used by my
Hifiberry Hat

Jeff



*Want a webapp ?* Get SqueezeLite-X !
https://forums.slimdevices.com/showthread.php?108550-Announce-Squeezelite-X=903953=1#post903953

Jeff07971's Profile: http://forums.slimdevices.com/member.php?userid=49290
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread cliveb


paul- wrote: 
> BCM pin numbering.  Which is the numbering almost everything uses.  
> https://pinout.xyz/ Almost nowhere in software is physical pin numbering
> used.
> 
> Are you sure nothing else is using GPIO 13?   D9 you have a DAC Hat
> installed?
OK, thanks. So GPIO 13 is physical pin #33.
I don't have any HAT installed. This is a fresh piCorePlayer install
with nothing added.
Should the Squeezelite power on/off setting just work, or do I need to
enable it somehow?

Incidentally, is there a recommendation for which GPIO pin would be best
to use for the power on/off setting?
I'm using a RPi4 if that's relevant.



Transporter -> ATC SCM100A

cliveb's Profile: http://forums.slimdevices.com/member.php?userid=348
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread Jeff07971


> 1. The help for the setting says: "Squeezelite will toggle this GPIO
> when the Power On/Off button is pressed"
> I interpret this to mean that when I click the power button for the
> picoreplayer in the LMS web interface (and by extension, if I switch the
> player on/off using a Duet controller or phone app such as Squeezer), it
> should toggle the GPIO pin. Is that correct? I hope it is, because
> that's exactly what I want it to do

Yes exactly, I use the "powersave" plugin which mean the power amps etc
power down after a set time on pause or stop.

As Paul says GPIO Pin numbers not physical Pin number is used.

Jeff



*Want a webapp ?* Get SqueezeLite-X !
https://forums.slimdevices.com/showthread.php?108550-Announce-Squeezelite-X=903953=1#post903953

Jeff07971's Profile: http://forums.slimdevices.com/member.php?userid=49290
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread paul-


BCM pin numbering.  Which is the numbering almost everything uses.  
https://pinout.xyz/

Almost nowhere is physical pin numbering used.



piCorePlayer a small player for the Raspberry Pi in RAM. 
Homepage: https://www.picoreplayer.org

Please 'donate'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations=U7JHY5WYHCNRU=GB_code=USD=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
if you like the piCorePlayer

paul-'s Profile: http://forums.slimdevices.com/member.php?userid=58858
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-23 Thread cliveb


Jeff07971 wrote: 
> Hi Cliveb,
> 
> You don't actually have to do any scripting to do this its built into
> pCP (SL actually)
> 
> I use Powerswitch3 for my SB3's and pCP built in for my pCP based
> players
> 
> All drive 16A SSR's directly
> 
> Jeff
> 
> 32631
> 
Well, my apologies for not finding out about this! A genuinely
embarrassing face-palm moment on my part.

That said, I have now tried playing around with the Squeezelite Power
on/off GPIO settings, and haven't been able to make it work. Let me just
ask a couple of questions to make sure it does what I'm hoping for:

1. The help for the setting says: "Squeezelite will toggle this GPIO
when the Power On/Off button is pressed"
I interpret this to mean that when I click the power button for the
picoreplayer in the LMS web interface (and by extension, if I switch the
player on/off using a Duet controller or phone app such as Squeezer), it
should toggle the GPIO pin. Is that correct? I hope it is, because
that's exactly what I want it to do.

2. What numbering for the GPIO pins is used in this setting? Does it use
the physical hardware pin numbers, the (non-sequential) RPi numbering,
or some other scheme?
I ask this because I've tried both physical and RPi numbering, and
neither seem to work.
For example, if I set the Squeezelite to use GPIO 13, is this the
physical pin #13 (aka GPIO 27 in RPi-speak), or physical pin #33 (aka
GPIO 13)? I've tried checking both pins with a multimeter, and neither
seem to toggle. Pin #33 (GPIO 13) stays stubbornly high, and pin #13
(GPIO 27) stays stubbornly low.
Another way of asking the question:
If I set the Squeezelite power on/off to GPIO 13, which physical pin
will it control?



Transporter -> ATC SCM100A

cliveb's Profile: http://forums.slimdevices.com/member.php?userid=348
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-22 Thread Greg Erskine


I think you made the best solution a lot more obvious than I did. :)



Greg Erskine's Profile: http://forums.slimdevices.com/member.php?userid=7403
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-22 Thread Jeff07971


cliveb wrote: 
> Not sure which forum I should ask this in: here, 3rd party software,
> DIY?
> 
> Anyhow, I'm setting out on a project to develop a plugin that will
> toggle a GPIO pin on a pi running piCorePlayer.
> This is to replicate the behaviour of the old PowerSwitchII plugin on
> SB2/SB3/TP, to drive a relay to switch amps on/off.
> 
> To do this I'll need to install some additional packages to get access
> to the GPIO pins.
> On Raspbian, I'd apt-get install them, but this isn't available on the
> TinyLinux that piCoreplayer uses.
> 
> How do I go about installing additional packages into a piCorePlayer
> system?
> Or is there some other way to access the GPIO pins in TinyLinux?

Hi Cliveb,

You don't actually have to do any scripting to do this its built into
pCP (SL actually)

I use Powerswitch3 for my SB3's and pCP built in for my pCP based
players

All drive 16A SSR's directly

Jeff

32631


+---+
|Filename: 2020-12-22 21_59_38-Window.jpg   |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=32631|
+---+


*Want a webapp ?* Get SqueezeLite-X !
https://forums.slimdevices.com/showthread.php?108550-Announce-Squeezelite-X=903953=1#post903953

Jeff07971's Profile: http://forums.slimdevices.com/member.php?userid=49290
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-22 Thread Greg Erskine


piCore/Tiny Core uses Extensions, see pCP GUI [Main page] >
[Extensions].

This kind of thing has already been done many times.

You can access GPIO directly from userspace or use one of the many
libraries.

wiringPi is depreciated.

In /home/tc there are a couple of scripts to look at.

squeezelite has the Power On/Off GPIO and Power On/Off Script options.

Lots of other stuff that I can't think of just at the moment.



Greg Erskine's Profile: http://forums.slimdevices.com/member.php?userid=7403
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Installing extra packages on piCorePlayer

2020-12-22 Thread paul-


You could do all that with a shell script.  But assuming you want
python.  It is available, as well as the python rpio package.

Take a look at the extension page from the main menu.

If you don't find what you are looking for, ask.  We don't package
everything, but alot of commonly used stuff is there.



piCorePlayer a small player for the Raspberry Pi in RAM. 
Homepage: https://www.picoreplayer.org

Please 'donate'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations=U7JHY5WYHCNRU=GB_code=USD=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
if you like the piCorePlayer

paul-'s Profile: http://forums.slimdevices.com/member.php?userid=58858
View this thread: http://forums.slimdevices.com/showthread.php?t=113507

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss