diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-26 00:19:10 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-26 00:19:10 +0300 |
commit | 8e61e7b5c4de2bea534438bd7a008accd85492b0 (patch) | |
tree | a4879637b97673cf8fcb4b164da14196bea90458 /drivers/platform/x86/dell-laptop.c | |
parent | 996680d461f8f759082e64f2395c1f7c25d9d549 (diff) | |
parent | d82b51c855a20eb456ac09f2f40ea98312373263 (diff) | |
download | linux-8e61e7b5c4de2bea534438bd7a008accd85492b0.tar.xz |
Merge tag 'sound-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"There are no intensive changes in both ALSA and ASoC core parts while
rather most of changes are a bunch of driver fixes and updates. A
large diff pattern appears in ASoC TI part which now merges both OMAP
and DaVinci stuff, but the rest spreads allover the places.
Note that this pull request includes also some updates for LED trigger
and platform drivers for mute LEDs, appearing in the diffstat as well.
Some highlights:
ASoC:
- Preparatory work for merging the audio-graph and audio-graph-scu
cards
- A merge of TI OMAP and DaVinci directories, as both product lines
get merged together. Also including a few architecture changes as
well.
- Major cleanups of the Maxim MAX9867 driver
- Small fixes for tablets & co with Intel BYT/CHT chips
- Lots of rsnd updates as usual
- Support for Asahi Kaesi AKM4118, AMD ACP3x, Intel platforms with
RT5660, Meson AXG S/PDIF inputs, several Qualcomm IPs and Xilinx
I2S controllers
HD-audio:
- Introduce audio-mute LED trigger for replacing the former hackish
dynamic binding
- Huawei WMI hotkey and mute LED support
- Refactoring of PM code and display power controls
- Headset button support in the generic jack code
- A few updates for Tegra
- Fixups for HP EliteBook and ASUS UX391UA
- Lots of updates for Intel ASoC HD-audio, including the improved DSP
detection and the fallback binding from ASoC SST to legacy HD-audio
controller drivers
Others:
- Updates for FireWire TASCAM and Fireface devices, some other fixes
- A few potential Spectre v1 fixes that are all trivial"
* tag 'sound-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (280 commits)
ALSA: HD-Audio: SKL+: force HDaudio legacy or SKL+ driver selection
ALSA: HD-Audio: SKL+: abort probe if DSP is present and Skylake driver selected
ALSA: HDA: export process_unsol_events()
ALSA: hda/realtek: Enable audio jacks of ASUS UX391UA with ALC294
ALSA: bebob: fix model-id of unit for Apogee Ensemble
ALSA: emu10k1: Fix potential Spectre v1 vulnerabilities
ALSA: rme9652: Fix potential Spectre v1 vulnerability
ASoC: ti: Kconfig: Remove the deprecated options
ARM: davinci_all_defconfig: Update the audio options
ARM: omap1_defconfig: Do not select ASoC by default
ARM: omap2plus_defconfig: Update the audio options
ARM: davinci: dm365-evm: Update for the new ASoC Kcofnig options
ARM: OMAP2: Update for new MCBSP Kconfig option
ARM: OMAP1: Makefile: Update for new MCBSP Kconfig option
MAINTAINERS: Add entry for sound/soc/ti and update the OMAP audio support
ASoC: ti: Merge davinci and omap directories
ALSA: hda: add mute LED support for HP EliteBook 840 G4
ALSA: fireface: code refactoring to handle model-specific registers
ALSA: fireface: add support for packet streaming on Fireface 800
ALSA: fireface: allocate isochronous resources in mode-specific implementation
...
Diffstat (limited to 'drivers/platform/x86/dell-laptop.c')
-rw-r--r-- | drivers/platform/x86/dell-laptop.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index 63121fd22c2e..95e6ca116e00 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c @@ -29,7 +29,6 @@ #include <linux/mm.h> #include <linux/i8042.h> #include <linux/debugfs.h> -#include <linux/dell-led.h> #include <linux/seq_file.h> #include <acpi/video.h> #include "dell-rbtn.h" @@ -2111,17 +2110,17 @@ static struct notifier_block dell_laptop_notifier = { .notifier_call = dell_laptop_notifier_call, }; -int dell_micmute_led_set(int state) +static int micmute_led_set(struct led_classdev *led_cdev, + enum led_brightness brightness) { struct calling_interface_buffer buffer; struct calling_interface_token *token; + int state = brightness != LED_OFF; if (state == 0) token = dell_smbios_find_token(GLOBAL_MIC_MUTE_DISABLE); - else if (state == 1) - token = dell_smbios_find_token(GLOBAL_MIC_MUTE_ENABLE); else - return -EINVAL; + token = dell_smbios_find_token(GLOBAL_MIC_MUTE_ENABLE); if (!token) return -ENODEV; @@ -2129,9 +2128,15 @@ int dell_micmute_led_set(int state) dell_fill_request(&buffer, token->location, token->value, 0, 0); dell_send_request(&buffer, CLASS_TOKEN_WRITE, SELECT_TOKEN_STD); - return state; + return 0; } -EXPORT_SYMBOL_GPL(dell_micmute_led_set); + +static struct led_classdev micmute_led_cdev = { + .name = "platform::micmute", + .max_brightness = 1, + .brightness_set_blocking = micmute_led_set, + .default_trigger = "audio-micmute", +}; static int __init dell_init(void) { @@ -2177,6 +2182,11 @@ static int __init dell_init(void) dell_laptop_register_notifier(&dell_laptop_notifier); + micmute_led_cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE); + ret = led_classdev_register(&platform_device->dev, &micmute_led_cdev); + if (ret < 0) + goto fail_led; + if (acpi_video_get_backlight_type() != acpi_backlight_vendor) return 0; @@ -2222,6 +2232,8 @@ static int __init dell_init(void) fail_get_brightness: backlight_device_unregister(dell_backlight_device); fail_backlight: + led_classdev_unregister(&micmute_led_cdev); +fail_led: dell_cleanup_rfkill(); fail_rfkill: platform_device_del(platform_device); @@ -2241,6 +2253,7 @@ static void __exit dell_exit(void) touchpad_led_exit(); kbd_led_exit(); backlight_device_unregister(dell_backlight_device); + led_classdev_unregister(&micmute_led_cdev); dell_cleanup_rfkill(); if (platform_device) { platform_device_unregister(platform_device); |