mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Now move the all remaining codec drivers from sound/pci/hda to sound/hda/codecs subdirectory. Some drivers are put under the further vendor subdirectory, and the vendor helper code (*_helper.c) are put under helpers subdirectory. Also the sub-codec drivers are moved under a different subdirectory, sound/hda/codecs/sub-codecs, for distinguishing from the main HD-audio codec drivers. The prefix patch_ and hda_ as well as the suffix _helper are dropped from file names as they are mostly superfluous. No functional changes but just file path shuffling. Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250709160434.1859-7-tiwai@suse.de
36 lines
882 B
C
36 lines
882 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Ideapad helper functions for Lenovo Ideapad LED control,
|
|
* It should be included from codec driver.
|
|
*/
|
|
|
|
#if IS_ENABLED(CONFIG_IDEAPAD_LAPTOP)
|
|
|
|
#include <linux/acpi.h>
|
|
#include <linux/leds.h>
|
|
|
|
static bool is_ideapad(struct hda_codec *codec)
|
|
{
|
|
return (codec->core.subsystem_id >> 16 == 0x17aa) &&
|
|
(acpi_dev_found("LHK2019") || acpi_dev_found("VPC2004"));
|
|
}
|
|
|
|
static void hda_fixup_ideapad_acpi(struct hda_codec *codec,
|
|
const struct hda_fixup *fix, int action)
|
|
{
|
|
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
|
|
if (!is_ideapad(codec))
|
|
return;
|
|
snd_hda_gen_add_mute_led_cdev(codec, NULL);
|
|
snd_hda_gen_add_micmute_led_cdev(codec, NULL);
|
|
}
|
|
}
|
|
|
|
#else /* CONFIG_IDEAPAD_LAPTOP */
|
|
|
|
static void hda_fixup_ideapad_acpi(struct hda_codec *codec,
|
|
const struct hda_fixup *fix, int action)
|
|
{
|
|
}
|
|
|
|
#endif /* CONFIG_IDEAPAD_LAPTOP */
|