Home of the Squeezebox™ & Transporter® network music players.
Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30
  1. #21
    Senior Member
    Join Date
    Mar 2010
    Posts
    221
    Quote Originally Posted by paul- View Post
    the shutdown is gpio 17, active high, and pull down
    Same result. According to Audiophonics images, these are the pin-to-GPIO mappings:




    When I switch the cables around (connecting GPIO.04 from the PI-SPC to supposed GPIO.22 on the DAC and vice versa), these settings and the button actually make the pCP shutdown, but the power off is not (reliably) triggered, although all three LEDs on the PI-SPC are lit at the end of the sequence.

  2. #22
    Senior Member
    Join Date
    Mar 2010
    Posts
    221
    Here's the actual cabling (when the button triggers a shutdown, i.e. reversed from what I read from the documented pin layout):

    Name:  0 - Cabling (klein).jpg
Views: 799
Size:  251.7 KB

    Normal operations:
    Name:  1 - Normal operation (klein).jpg
Views: 791
Size:  228.5 KB

    Shutdown triggered (but not complete):
    Name:  2 - Shutdown triggered (klein).jpg
Views: 789
Size:  229.3 KB

    Shutdown complete (but power not cut):
    Name:  3 - Shutdown finished (klein).jpg
Views: 791
Size:  230.2 KB

  3. #23
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,629
    The audiophonics documentation is confusing. And I didn't help, as I was referring to this power board.

    https://www.audiophonics.fr/en/raspb...i-p-10912.html

    But my board has an IR remote on it, so perhaps it was never released......the silk screen is messed up on my board too. The cable connected to the "SoftShutdown" (Labeled GPIO4 on the documentation) They had a tag on the connector end that said GPIO17. I'm really not sure how to connect yours.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  4. #24
    Senior Member
    Join Date
    Mar 2010
    Posts
    221
    Quote Originally Posted by paul- View Post
    The audiophonics documentation is confusing. And I didn't help, as I was referring to this power board.

    https://www.audiophonics.fr/en/raspb...i-p-10912.html

    But my board has an IR remote on it, so perhaps it was never released......the silk screen is messed up on my board too. The cable connected to the "SoftShutdown" (Labeled GPIO4 on the documentation) They had a tag on the connector end that said GPIO17. I'm really not sure how to connect yours.
    Interesting. Mine has an extra set of connectors at a 90░ angle to the GPIOs, where one pin is labled "IR". It differs from the images of the power board at the Audiophonics site (but it looks like that's the only difference). I've already written to Audiophonics, but have not received a reply yet.

  5. #25
    Senior Member
    Join Date
    Mar 2010
    Posts
    221

    I finally figured it out

    The original wiring I had was correct. The missing piece was that the gpio-poweroff overlay needs "active_low" to be enabled (either the posting by Audiophonics contained a typo, or they changed the board later on). With the wiring according to the Audiophonics pictures and these settings, everything now works reliably:

    Name:  Bildschirmfoto 2019-05-12 um 18.17.27.png
Views: 790
Size:  25.8 KB

    Thanks again for the great work on piCorePlayer, and for the help in here!

  6. #26
    Quote Originally Posted by pputzer View Post
    The original wiring I had was correct. The missing piece was that the gpio-poweroff overlay needs "active_low" to be enabled (either the posting by Audiophonics contained a typo, or they changed the board later on). With the wiring according to the Audiophonics pictures and these settings, everything now works reliably:

    Name:  Bildschirmfoto 2019-05-12 um 18.17.27.png
Views: 790
Size:  25.8 KB

    Thanks again for the great work on piCorePlayer, and for the help in here!
    Our board was not intended to be used with these "news" power managements overlays but a custom script.

    These overlays was not existing when we designed firmware of this board.
    Good to know that you made it working with them.

    Their are using only 2 wires instead of 3 (No boot ok), which release a pin that could have been used for IR, that's why there is a IR connector on the board.
    We made a prototype firmware for it, but we never put it on production, and boards can't be updated.

    Now that PiCore discontinued our custom script and is including the standard overlays, we should consider to offer the "overlay" version.

  7. #27
    Junior Member
    Join Date
    Feb 2020
    Posts
    3

    Script still available

    Quote Originally Posted by audiophonics View Post
    Now that PiCore discontinued our custom script and is including the standard overlays, we should consider to offer the "overlay" version.
    Actually that's not totally correct. The new version includes a script that uses your GPIO values as default and works with your module. I quote, from the script, "Defaults are for the Audiophonics power button"

    So instead of your script, use /home/tc/pcp-powerbutton.sh and it works the way it is.

    As far as I could see there are 2 differences between using the script or using the power managements overlays:
    With the script, when shutting down, after killing everything the screen turns all white and slowly fades to black and that's it. With the power management overlays it turns black directly. That white stuff with the script almost looks like something is wrong.

    With the power management overlays, when booting, the led stops blinking very early in the process as soon as picorePlayer starts loading extensions. With the script, it keeps blinking until JiveLite starts so almost until the system is really ready.

    I'd love to have the best of both worlds but it doesn't seem possible right now so I'm going to use the overlays as I don't like that white screen at the end.
    Last edited by mnakalay; 2020-02-29 at 14:47.

  8. #28
    Member
    Join Date
    Mar 2020
    Location
    Bristol, UK
    Posts
    44
    Hi all,

    The original audiophonics sript sds.sh had this:
    Code:
    echo "ShutDown : GPIO17=in, Low"
    echo "BootOK   : GPIO22=out, High"
    echo "SoftSD   : GPIO04=out, Low"
    
    gpio -g mode 04 out
    gpio -g write 04 0
    gpio -g mode 17 in
    gpio -g write 17 0
    gpio -g mode 22 out
    gpio -g write 22 1
    The pcp-powerbutton script contains the following variables:
    Code:
    IN_LOW=0
    PIN_IN=17
    PIN_OUT=22
    PUPDOWN="off"
    And then further down (note: WiringPi is not used anymore in PicorePlayer... "pcp-gpio" instead):
    Code:
    pcp-gpio mode $PIN_IN in
    pcp-gpio mode $PIN_IN $PUPDOWN
    pcp-gpio mode $PIN_OUT out
    pcp-gpio write $PIN_OUT 1
    In my recent experiments with PcP 6.0.0 and power management module integrated in DAC audiophonics i-sabre ESS9023 V3, overlay method worked well. What I am missing is the soft shutdown functionality i.e. the power management module being made aware of shutdown done in the Pi (via LMS, ssh or whatever). I guess I could try and add some gpio commands on pin 04 in the pcp-powerbutton script?

    Thanks, Marc

  9. #29
    Quote Originally Posted by pputzer View Post
    The original wiring I had was correct. The missing piece was that the gpio-poweroff overlay needs "active_low" to be enabled (either the posting by Audiophonics contained a typo, or they changed the board later on). With the wiring according to the Audiophonics pictures and these settings, everything now works reliably:

    Name:  Bildschirmfoto 2019-05-12 um 18.17.27.png
Views: 790
Size:  25.8 KB

    Thanks again for the great work on piCorePlayer, and for the help in here!
    thanks these settings work for me too

  10. #30
    Junior Member
    Join Date
    Feb 2021
    Location
    near Berlin
    Posts
    26
    Quote Originally Posted by pputzer View Post
    The original wiring I had was correct. The missing piece was that the gpio-poweroff overlay needs "active_low" to be enabled (either the posting by Audiophonics contained a typo, or they changed the board later on). With the wiring according to the Audiophonics pictures and these settings, everything now works reliably:

    Name:  Bildschirmfoto 2019-05-12 um 18.17.27.png
Views: 790
Size:  25.8 KB

    Thanks again for the great work on piCorePlayer, and for the help in here!
    I'm still trying to figure out how to use the power module in the current RaspTouch (PI-SPC_Reg V2) with regard to softshutdown. The above example surprisingly works, but only if the shutdown process was initiated via the hardware power button. If shutdown was initiated by software, the poweroff sequence does not finish and the power button light will stay on.

    The wiring is performed in the following way:
    Soft SD -- GPIO04
    ShutDown -- GPIO17
    Boot OK -- GPIO22

    As far as I understand the wiring and the examples at github https://github.com/audiophonics/Rasp...oftshutdown.sh and https://githubusercontent.com/audiop.../master/sds.sh, as well as the official documentation of the former RaspTouch http://forum.audiophonics.fr/viewtopic.php?p=6237#p6237, the power module will act in the following way:

    During the boot process, the power button will be slowly flashing and will not initiate any shutdown process until it receives a "Boot OK" signal via GPIO22. If GPIO22 has been set to 1, the button will light continuously and is waiting for a keypress. If the button will be pressed, then GPIO17 switches to 1, which will be catched by the shutdown-monitor, triggering shutdown and followed by poweroff. During shutdown, the power module will be in some waiting state (blinking).

    GPIO04 seems to be the way to trigger this state from the software side, however I am still trying to get it done the right way.

    The above example works at least with regard to the hardware initiated shutdown, as setting gpio-poweroff to GPIO22 and active low will pull-up GPIO22 which is interpreted by the power module as "BootOK" - which is a prerequisite for the shutdown+power-off process. The same can be performed in this way (via config.txt):
    Code:
    gpio=22=op,dh
    dtoverlay=gpio-shutdown,gpio_pin=17,active_low=0,gpio_pull=down
    additionally it could be helpful to set GPIO4 to a proper state, in case of a reboot:
    Code:
    gpio=4=op,dl
    Another way to pull up GPIO22 = BootOK at a later stage during boot process could be performed e.g. via "User command #1" in PCP:
    Code:
    /usr/local/bin/pcp-gpio mode 22 out ; /usr/local/bin/pcp-gpio write 22 1
    That should be more correct with regard that the boot process should have finished.

    A proper power-off after a software-initiated shutdown process can now be initiated as described in the github examples by toggling GPIO4 up (for one second?) before executing /sbin/poweroff. However, I still have to find an easy way that a custom shutdown script will execute "pcp-gpio mode 4 out; pcp-gpio write 4 1; sleep 1; pcp-gpio write 4 0" before /sbin/poweroff will be called - using gpio-shutdown does not seem to work.
    Main: Transporter -> [Marantz PM7005 -> Canton Vento 820.2] | [Meier enhanced crossfeed -> Topping A50s -> Dan Clark Audio Aeon 2 closed]
    Office: Squeezelite-esp32+SSD1322+IR+Cirrus CS43198 -> Yamaha CRX-E400 -> Q Acoustics 3010i
    Garden: DAC32 -> Objective2 -> Dan Clark Audio Aeon 2 closed
    Bathroom and children's room: 2x SB Radio
    Spare devices / ongoing projects: 2 x SB3, Touch, PiCorePlayer8+RasPi3A++DAC+light+RTC+7'' Display+XBox Media Remote+LMS
    Server: NUC7CJYH2+Debian+LMS+Resilio Sync

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •