summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_component.h
AgeCommit message (Collapse)AuthorFilesLines
2024-03-07ALSA: hda: hda_component: Include sound/hda_codec.hRichard Fitzgerald1-0/+1
hda_component.h uses hda_codec_dev from sound/hda_codec.h. Include sound/hda_codec.h instead of assuming that it has already been included by the parent .c file. This isn't causing any problems with current code, so no need to backport to older kernels. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Message-ID: <20240307111216.45053-2-rf@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-03-07ALSA: hda: hda_component: Add missing #include guardsRichard Fitzgerald1-0/+5
Add the conventional include guards around the content of the hda_component.h header file. This prevents double-declaration of struct hda_component if the header gets included multiple times. This isn't causing any problems with current code, so no need to backport to older kernels. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Message-ID: <20240307111216.45053-1-rf@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-01-25ALSA: hda: realtek: Move hda_component implementation to moduleRichard Fitzgerald1-0/+59
Move the generic parts of the hda_component implementation into a new hda_component module. This will allow other HDA codecs to add support for the component binding API without duplicating all the code. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Tested-by: Gergo Koteles <soyer@irl.hu> Link: https://lore.kernel.org/r/20240124112607.77614-3-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-09-22ALSA: hda: cs35l41: Add notification support into component bindingStefan Binding1-0/+4
Some systems support a notification from ACPI, which can be used for different things. Only one handler can be registered for the acpi notification, but all amps need to receive that notification, we can register a single handler inside the component master, so that it can then notify through the component framework. This is required to support mute notifications from ACPI. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230921162849.1988124-2-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-07-24ALSA: hda: hda_component: Add pre and post playback hooks to hda_componentStefan Binding1-0/+2
These hooks can be used to add callbacks that would be run before and after the main playback hooks. These hooks would be called for all amps, before moving on to the next hook, i.e. pre_playback_hook would be called for all amps, before the playback_hook is called for all amps, then finally the post_playback_hook is called for all amps. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230721151816.2080453-8-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-12ALSA: hda: cs35l41: Remove suspend/resume hda hooksStefan Binding1-2/+0
The current code uses calls from the HDA Codec driver to determine when to suspend/resume by calling hooks via the hda_component binding. However, this means the cs35l41 driver relies on the HDA Codec driver to tell it when to suspend or resume, creating an additional external dependency, and potentially creating race conditions in the future. It is better for the cs35l41 hda driver to decide for itself when the part should be suspended or resumed. This makes supporting system suspend easier. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20221011143552.621792-5-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-07-15ALSA: hda: cs35l41: Support Hibernation during SuspendStefan Binding1-0/+2
CS35L41 supports hibernation during suspend when using DSP firmware. When the driver suspends it will hibernate the part, if firmware is running, and resume will wake from hibernation. CS35L41 driver will suspend/resume when requested by hda driver. Note that suspend/resume and hibernation is only supported when firmware is running. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-10-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-07-14ALSA: hda: cs35l41: Save codec object inside component structStefan Binding1-0/+1
This is required for ALSA control support. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-4-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-16ALSA: hda: cs35l41: Remove Set Channel Map api from bindingStefan Binding1-2/+0
This API was required for CLSA0100 laptop, which did not have correct properties inside ACPI. The required values are now hardcoded inside the driver so this is no longer needed. Without this api, there CLSA0100 can now use the generic cs35l41 fixup, like the other laptops. All other laptops will read the Speaker Position from ACPI and set the channel map from within the driver. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220509214703.4482-4-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-01-05ALSA: hda: cs35l41: Add support for CS35L41 in HDA systemsLucas Tanure1-0/+20
Add support for CS35L41 using a new separated driver that can be used in all upcoming designs Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211217115708.882525-8-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>