Go to advanced search

by Simple
Tue Jun 15, 2021 12:24 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Working like a charm so far!

Thanks Phil
S
by Simple
Mon Jun 14, 2021 10:14 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Brilliance! Tested it a few times and works like one would expect. The nice part about a good quick pulsing LED is that it won't be misunderstood as a hung boot or something other, as the LED comes on steady at boot. With the pulsing, I can now remove the LED that is on the PCB for fault indication....
by Simple
Mon Jun 14, 2021 5:00 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Makes sense. I like the 'on' state triggered by any length of sound activity.
For now this should work well. Its really just a nitpicky thing anyways.

Is it a simple edit to change the 'fault' red LED indication from a steady on to a 3Hz blinking indicator?

Thx Phil
by Simple
Mon Jun 14, 2021 12:20 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Haven't had too much time to play with the fsm, however it appears that if the pmdowntime is set under 1s, it will release under some circumstances. Apparently if it doesn't reach the 1s that we have set for the delay between K1 and K2 activation, it could return to the amp off state.
by Simple
Thu Jun 03, 2021 11:08 am
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

I think it has something to do with the pmdowntime.conf
Apparently, if the timeout is set too low, it runs into trouble
I've removed the timeout entirely for the time being and seems to be functioning normally.

Scott
by Simple
Thu Jun 03, 2021 2:39 am
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Thanks Phil The time that the amp stays on is normal again, but I noticed something interesting. I was able to hear what sounded like extra clicks from the relays and decided to look deeper into the action. When the amp begins to startup, GPIO22 goes high for just a very short moment, goes low again...
by Simple
Wed Jun 02, 2021 12:46 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Where do we keep all the source code for this and other overlays?
Thinking it may be time for me to look at it and see what I can understand about it.

Thanks again Phil
S
by Simple
Sat May 29, 2021 3:53 am
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Ok, it is functional but there appears to be an issue The startup function appears to work correctly but now after playing audio, it goes to shutdown after a few seconds, rather than waiting the 20 minutes or whatever we had it set to. Additionally, when it shuts down, it will shut down one relay an...
by Simple
Fri May 07, 2021 1:49 pm
Forum: Graphics, sound and multimedia
Topic: TIDAL Connect installation!
Replies: 108
Views: 47092

Re: TIDAL Connect installation!

FYI

As a solution for volume control when using the Pi, you can also use a USB volume controller and set it to control Alsamixer.
by Simple
Fri May 07, 2021 1:43 am
Forum: Graphics, sound and multimedia
Topic: TIDAL Connect installation!
Replies: 108
Views: 47092

Re: TIDAL Connect installation!

I can select the raspberry pi for playback but it does not play back anything and then reverts back to playing over the phone shortly after no sound through the raspberry pi. I have an IQaudio DAC and it does indicate that it becomes active for a moment, no sound at all and then it basically crashes...
by Simple
Sun May 02, 2021 1:29 am
Forum: Graphics, sound and multimedia
Topic: TIDAL Connect installation!
Replies: 108
Views: 47092

Re: TIDAL Connect installation!

asifjahmed wrote:
Sat Mar 13, 2021 8:13 pm

Now it works and its sweet. This is on RPI4.
Can you select the specific mixer ID?
For hardware volume, I need to use 'Digital'
by Simple
Sun Apr 25, 2021 10:18 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Ok thanks
I just wanted to clarify the operation. I wasn't sure if it would activate on and off with the dac state without the start condition. The new boards will be here in a few days and I will then be able to test it out.

Cheers on your public march along the river mate!

Thanks again
S
by Simple
Sat Apr 24, 2021 4:40 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

May need to clarify something here... This SSR function needs to operate in an AND function with GPIO23 and ALSA (GPIO22 per the driver code). GPIO24 can only become HIGH if both GPIO23 is active AND the ALSA state is active. Otherwise we will lose the startup muting of the output which is a big par...
by Simple
Mon Apr 19, 2021 12:03 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Ok thanks for the info

Each of the systems I use use alsa directly..
Running the lite version, not the desktop.
Shouldn't be an issue.

S
by Simple
Sat Apr 17, 2021 12:42 am
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Simply marvelous

I assume that there is an ability to use 0ms timeout? May be able to hard code that if all goes well.
Will the changes make it into the next release?

Amazing work
Thx
S
by Simple
Wed Apr 14, 2021 12:34 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Hello again! Hope all is well on your shore of the Atlantic Everything is running smoothly so far, latest uptime is over 15 days. Running both as shairport and also as spotify connect device depending on which is occupying ALSA in the moment. I went ahead and ordered more boards for moving back to t...
by Simple
Sun Mar 28, 2021 12:37 am
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Going to post some more information that I found for references... It would be nice to actually not have the 5 second delay and go straight to muting the output. I am assuming that it's standard part of the driver and not able to be changed but I could be wrong. Controlling the DigiAMP+ Mute / Un-mu...
by Simple
Thu Mar 25, 2021 12:43 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

OK sorry Must have been an error of mine somewhere in wget, naming or replacing, to install the overlay. Went through the process again and also cycled the protection circuit and reset. Seems to be working OK now. Take a break. I'm going to let it run, test, and see how it goes longer term before do...
by Simple
Thu Mar 25, 2021 11:56 am
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Thanks Phil Getting a couple errors $ python controlscript.py Traceback (most recent call last): File "controlscript.py", line 84, in <module> fh = open(ampStatePath, 'r') IOError: [Errno 2] No such file or directory: '/sys/class/gpio-fsm/ghost-amp/state' And $ play 2hz.wav ALSA lib confmi...
by Simple
Wed Mar 24, 2021 11:58 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

It's OK to go from fault back to normal state without a reboot. The fault state is a latching relay that will remain in it's condition until it is forced back to an open state, regardless of power state. The reset function is actually a secondary coil that moves the relay back to an open state. The ...
by Simple
Wed Mar 24, 2021 3:33 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Let's please remove all the correlation with the button.
I would like the button to be completely separate from the overlay.
The fault is too important to mess with and needs to be isolated from it.

S
by Simple
Wed Mar 24, 2021 1:04 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Thanks again Phil When I trigger the fault, it now resets itself. I think the relevant part is that GPIO27 needs to be INPUT and pull=UP so that it is triggered with a grounded button LOW. raspi-gpio get shows the same condition for GPIO27 whether I press the button or not. All of my buttons and tri...
by Simple
Tue Mar 23, 2021 11:50 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Thanks Phil You can just take that code for the button out if you want.. If you leave it in, can you make it a longer hold time for a reset, like at least 10 seconds. I don't want it to be easily reset as a DC condition can actually be dangerous. I am getting errors now as follows.. $ python control...
by Simple
Tue Mar 23, 2021 12:59 am
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Thanks Phil Sorry for all the confusions I may have added to the thread.. I'm not sure if your intention is to make the button perform the reset, but it doesn't work in case that was your intention. I am fine with having no button functionality in the overlay, and the reset works well by executing a...
by Simple
Mon Mar 22, 2021 5:25 pm
Forum: Device Tree
Topic: Help with gpio-fsm state machine
Replies: 60
Views: 7363

Re: Help with gpio-fsm state machine

Ok thanks

I see..
From -

Code: Select all

# DAC
        if ampState == 'amp_on' or ampState == 'amp_on_1':
            color = (0,.1,0) # green
to -

Code: Select all

# DAC
        if ampState == 'amp_on' or ampState == 'amp_on_1' or ampState == 'amp_off_wait':
            color = (0,.1,0) # green

Go to advanced search