From: Stefan Binding <sbinding@opensource.cirrus.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>,
<patches@opensource.cirrus.com>,
Stefan Binding <sbinding@opensource.cirrus.com>
Subject: [PATCH v4 1/4] ALSA: hda: cs35l41: Add notification support into component binding
Date: Wed, 20 Sep 2023 16:54:47 +0100 [thread overview]
Message-ID: <20230920155450.576287-2-sbinding@opensource.cirrus.com> (raw)
In-Reply-To: <20230920155450.576287-1-sbinding@opensource.cirrus.com>
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>
---
sound/pci/hda/hda_component.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/pci/hda/hda_component.h b/sound/pci/hda/hda_component.h
index f170aec967c1..bbd6f0ed16c1 100644
--- a/sound/pci/hda/hda_component.h
+++ b/sound/pci/hda/hda_component.h
@@ -6,6 +6,7 @@
* Cirrus Logic International Semiconductor Ltd.
*/
+#include <linux/acpi.h>
#include <linux/component.h>
#define HDA_MAX_COMPONENTS 4
@@ -15,6 +16,9 @@ struct hda_component {
struct device *dev;
char name[HDA_MAX_NAME_SIZE];
struct hda_codec *codec;
+ struct acpi_device *adev;
+ bool acpi_notifications_supported;
+ void (*acpi_notify)(acpi_handle handle, u32 event, struct device *dev);
void (*pre_playback_hook)(struct device *dev, int action);
void (*playback_hook)(struct device *dev, int action);
void (*post_playback_hook)(struct device *dev, int action);
--
2.34.1
next prev parent reply other threads:[~2023-09-20 16:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 15:54 [PATCH v4 0/4] Support mute notifications for CS35L41 HDA Stefan Binding
2023-09-20 15:54 ` Stefan Binding [this message]
2023-09-20 15:54 ` [PATCH v4 2/4] ALSA: hda/realtek: Support ACPI Notification framework via component binding Stefan Binding
2023-09-20 15:54 ` [PATCH v4 3/4] ALSA: hda: cs35l41: Support mute notifications for CS35L41 HDA Stefan Binding
2023-09-20 15:54 ` [PATCH v4 4/4] ALSA: hda: cs35l41: Add read-only ALSA control for forced mute Stefan Binding
2023-09-21 14:28 ` [PATCH v4 0/4] Support mute notifications for CS35L41 HDA Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230920155450.576287-2-sbinding@opensource.cirrus.com \
--to=sbinding@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).