1 of 1 people found this helpful
It isn't advised, the schematics are here:
From that you can see that one is hard-wired to a supply rail, and although the other does go to a GPIO connection, it is marked
'2 wire' and '3 wire' in the schematic, so it could be an activity indicator for I2C or some other serial bus activity (I've not checked the detail to see how the card is configured, because I don't use this board).
I was just looking at the schematics, and I agree the green one seems hard-wired to the 3.3v rail, so will always be on. Bah. Better news, though - I just got the red one under control:
echo 23 > /sys/class/gpio/export
and it now appears in /sys/class/gpio/gpio23/ - so it can be turned into an "output" pin with:
echo out > /sys/class/gpio/gpio23/direction
and then turned on / off with:
echo 0 > /sys/class/gpio/gpio23/value
echo 1 > /sys/class/gpio/gpio23/value
Disappointingly, though, the /sys/class/gpio/gpio23/ directory doesn't have the nifty "trigger" functionality that's available for the leds in /sys/class/leds/ so I can't make it "heartbeat" when recording, which would be very useful (headless operation, so I need all the output devices I can get). I wonder how a gpio pin gests "registered" as a candidate to live in /sys/class/leds/ ? I am way out of my depth.
I note your point about it potentially interfering with other things, but it seems like all the fiddling I've done with gpio23 hasn't affected the ongoing recording I am doing. (I can't say for playback, I don't do playback). Audio recording is clean, and nothing in dmesg...
A thing called a 'device tree overlay' needs to be created, which contains a 'device tree fragment'. It then needs to be compiled into a binary file, which is then loaded by Linux either at boot time, or afterwards. It isn't straightforward, but hopefully this link can help you: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=97875
Can we control the LEDs on the Cirrus Logic Audio Card? There is a green one and a red one. My interest was piqued by noticing this line:
# vcdbg log msg
However /sys/class/leds contains only the 2 standard LEDs (on the Raspberry Pi itself). Perhaps I was dreaming thinking I'd find them listed there...