Bug 229074 - [acpi_ibm] [patch] Add support for Thinkpads Mic led
Summary: [acpi_ibm] [patch] Add support for Thinkpads Mic led
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 11.0-STABLE
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-acpi (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-06-16 21:05 UTC by Ali Abdallah
Modified: 2019-01-12 17:53 UTC (History)
2 users (show)

See Also:


Attachments
Add support for microphone led (1.54 KB, patch)
2018-06-16 21:05 UTC, Ali Abdallah
no flags Details | Diff
Add support for microphone led (2.53 KB, patch)
2018-06-17 20:03 UTC, Ali Abdallah
no flags Details | Diff
Add documentation of dev.acpi_ibm.0.mic_led (963 bytes, patch)
2018-07-18 11:26 UTC, Ali Abdallah
no flags Details | Diff
Add documentation of dev.acpi_ibm.0.mic_led (963 bytes, patch)
2018-07-21 13:34 UTC, Ali Abdallah
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ali Abdallah 2018-06-16 21:05:45 UTC
Created attachment 194314 [details]
Add support for microphone led

The acpi_ibm kernel module does not have a syscall to control the microphone led state (for example on x220 and x230 thinkpads). The attached patch adds a dev.acpi_ibm.0.mic_led=0 (off) 1 (on) sysctl, the led is controlled using the ACPI MMTS Object.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2018-06-17 19:32:53 UTC
Hey, the patch doesn't apply. Can you resend?

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- file_not_specified_in_diff
|+++ file_not_specified_in_diff
--------------------------
Patching file ./sys/dev/acpi_support/acpi_ibm.c using Plan A...
Empty context always matches.
Reversed (or previously applied) patch detected!  Assume -R? [y] y
Hunk #1 succeeded at 77.
Empty context always matches.
Hunk #2 succeeded at 179.
patch: **** malformed patch at line 16: ---
Comment 2 Ali Abdallah 2018-06-17 20:03:55 UTC
Created attachment 194338 [details]
Add support for microphone led
Comment 3 Ali Abdallah 2018-06-17 20:07:16 UTC
New patch uploaded, let me know if it is okay. It applies on my system.
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-06-17 20:45:22 UTC
A commit references this bug:

Author: eadler
Date: Sun Jun 17 20:44:21 UTC 2018
New revision: 335304
URL: https://svnweb.freebsd.org/changeset/base/335304

Log:
  acpi: Add support for Thinkpads Mic led

  PR:		229074
  Submitted by:	"Ali Abdallah" <aliovx@gmail.com>

Changes:
  head/sys/dev/acpi_support/acpi_ibm.c
Comment 5 Ali Abdallah 2018-07-18 11:26:41 UTC
Created attachment 195237 [details]
Add documentation of dev.acpi_ibm.0.mic_led

I've added documentation of the dev.acpi_ibm.0.mic_led, as well as example how to use it in /usr/local/sbin/acpi_oem_exec.sh to the acpi_ibm.4. Please kindly apply it.
Comment 6 Ali Abdallah 2018-07-21 13:34:30 UTC
Created attachment 195325 [details]
Add documentation of dev.acpi_ibm.0.mic_led

Small correction.
Comment 7 commit-hook freebsd_committer freebsd_triage 2019-01-12 17:53:31 UTC
A commit references this bug:

Author: allanjude
Date: Sat Jan 12 17:52:52 UTC 2019
New revision: 342971
URL: https://svnweb.freebsd.org/changeset/base/342971

Log:
  Add missing documentation for dev.acpi_ibm.0.mic_led added in r335304

  PR:		229074
  X-MFC-With:	335304
  Submitted by:	Ali Abdallah <aliovx@gmail.com>

Changes:
  head/share/man/man4/acpi_ibm.4