element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Control of LEDs on Cirrus Logic Audio Card
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 3 replies
  • Subscribers 674 subscribers
  • Views 503 views
  • Users 0 members are here
  • raspberry_pi
  • raspeberry_pi_accessories
Related

Control of LEDs on Cirrus Logic Audio Card

jcjc
jcjc over 9 years ago

Hello,

 

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

....

dtparam: pwr_led_gpio=35

...

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...

 

Thanks

James.

  • Sign in to reply
  • Cancel
  • shabaz
    shabaz over 9 years ago

    It isn't advised, the schematics are here:

    Cirrus Logic Audio Card for B+ and A+ Onwards Schematics

    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).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jcjc
    jcjc over 9 years ago in reply to shabaz

    Thanks shabaz:

    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...

     

    James.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 9 years ago in reply to jcjc

    Hi James,

     

    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

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube