summaryrefslogtreecommitdiff
path: root/sound/pci/hda/thinkpad_helper.c
AgeCommit message (Collapse)Author
2016-11-10ALSA: hda - add a new condition to check if it is thinkpadHui Wang
Latest Thinkpad laptops use the HKEY_HID LEN0268 instead of the LEN0068, as a result neither audio mute led nor mic mute led can work any more. After adding the new HKEY_HID into the is_thinkpad(), both of them works well as before. Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-10-12ALSA: hda - Fix a failure of micmute led when having multi adcsHui Wang
On a Dell laptop, there is no global adcs for all input devices, so the input devices use the different adc, as a result, dyn_adc_switch is set to true. In this situation, it is safe to control the micmute led according to user's choice of muting/unmuting the current input device, since only current input device path is active, while other input device paths are inactive and powered down. Fixes: 00ef99408b6c ('ALSA: hda - add mic mute led hook for dell machines') Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-09ACPI / utils: Rename acpi_dev_present()Lukas Wunner
acpi_dev_present() was originally named after pci_dev_present() to signify the similarity of the two functions. However Rafael J. Wysocki pointed out that the exported function acpi_dev_present() is easily confused with the non-exported acpi_device_is_present(). Additionally in ACPI parlance the term "present" usually refers to the "device is present" bit returned by the _STA control method, yet acpi_dev_present() merely checks presence in the namespace. It does not invoke _STA at all, let alone check the "device is present" bit. As suggested by Rafael, rename the function to acpi_dev_found() and adjust all existing call sites. Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-02-21ALSA: hda - Use acpi_dev_present()Lukas Wunner
Use shiny new acpi_dev_present() and remove all the boilerplate to search for a particular ACPI device. No functional change. Cf. 2d12b6b381ba ("ACPI / utils: Add acpi_dev_present()"). Signed-off-by: Lukas Wunner <lukas@wunner.de> Acked-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-24Revert "ALSA: hda - Add mute-LED mode control to Thinkpad"Takashi Iwai
This reverts commit 7290006d8c0900c56d8c58428134f02c35109d17. Through the regression report, it was revealed that the tpacpi_led_set() call to thinkpad_acpi helper doesn't only toggle the mute LED but actually mutes the sound. This is contradiction to the expectation, and rather confuses user. According to Henrique, it's not trivial to judge which TP model behaves "LED-only" and which model does whatever more intrusive, as Lenovo's implementations vary model by model. So, from the safety reason, we should revert the patch for now. Reported-by: Martin Steigerwald <martin@lichtvoll.de> Cc: Pali Rohár <pali.rohar@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27ALSA: hda - Add mute-LED mode control to ThinkpadTakashi Iwai
This patch adds the missing flag to enable "Mute-LED Mode" mixer enum ctl for Thinkpads that have also the software mute-LED control. Reported-and-tested-by: Pali Rohár <pali.rohar@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-23ALSA: hda - Move a part of hda_codec stuff into hdac_deviceTakashi Iwai
Now some codes and functionalities of hda_codec struct are moved to hdac_device struct. A few basic attributes like the codec address, vendor ID number, FG numbers, etc are moved to hdac_device, and they are accessed like codec->core.addr. The basic verb exec functions are moved, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-25ALSA: hda - Replace with standard printkTakashi Iwai
Use dev_err() and co for messages from HD-audio controller and codec drivers. The codec drivers are mostly bound with codec objects, so some helper macros, codec_err(), codec_info(), etc, are provided. They merely wrap the corresponding dev_xxx(). There are a few places still calling snd_printk() and its variants as they are called without the codec or device context. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-07ALSA: hda - Fix inconsistent Mic mute LEDTakashi Iwai
The current code for controlling mic mute LED in patch_sigmatel.c blindly assumes that there is a single capture switch. But, there can be multiple multiple ones, and each of them flips the state, ended up in an inconsistent state. For fixing this problem, this patch adds kcontrol to be passed to the hook function so that the callee can check which switch is being accessed. In stac_capture_led_hook(), the state is checked as a bitmask, and turns on the LED when all capture switches are off. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14ALSA: hda - Fix endless vmaster hook call in thinkpad_helper.cTakashi Iwai
The new vmaster hook, update_tpacpi_mute_led(), calls the original vmaster hook, but I forgot to save the original hook function but keep calling the updated one, which of course results in a stupid endless loop. Fixed now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Split Thinkpad ACPI-related codeTakashi Iwai
Both patch_realtek.c and patch_conexant.c contain the fairy same code snippet for supporting Thinkpad ACPI LED controls. Split them into thinkpad_helper.c and include it from both places. Although this isn't the best approach from the code size POV, the probability for coexistence of both Realtek and Conexant codecs on a single machine is pretty low, thus it'll end up with less memory footprint than splitting to yet another module. Signed-off-by: Takashi Iwai <tiwai@suse.de>