This lets the interested codec be notified when an i915 pin/ELD event happens.
Signed-off-by: David Henningsson <email address hidden> --- sound/pci/hda/hda_i915.c | 10 ++++++++++ sound/pci/hda/hda_intel.h | 5 +++++ 2 files changed, 15 insertions(+)
diff --git a/sound/pci/hda/hda_i915.c b/sound/pci/hda/hda_i915.c index aec8a0e..b6eadf1 100644 --- a/sound/pci/hda/hda_i915.c +++ b/sound/pci/hda/hda_i915.c @@ -108,6 +108,16 @@ void haswell_set_bclk(struct hda_intel *hda) azx_writew(&hda->chip, EM5, bclk_n); }
+int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *aops) +{ + if (WARN_ON(!hdac_acomp)) + return -ENODEV; + + hdac_acomp->audio_ops = aops; + return 0; +} +EXPORT_SYMBOL_GPL(snd_hdac_i915_register_notifier); + static int hda_component_master_bind(struct device *dev) { struct snd_card *card = dev_get_drvdata(dev); diff --git a/sound/pci/hda/hda_intel.h b/sound/pci/hda/hda_intel.h index 51cd664..51b940c 100644 --- a/sound/pci/hda/hda_intel.h +++ b/sound/pci/hda/hda_intel.h @@ -54,6 +54,7 @@ void haswell_set_bclk(struct hda_intel *hda); int hda_i915_init(struct hda_intel *hda); int hda_i915_init_bpo(struct hda_intel *hda); int hda_i915_exit(struct hda_intel *hda); +int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *); #else static inline int hda_set_codec_wakeup(struct hda_intel *hda, bool enable) { @@ -80,6 +81,10 @@ static inline int hda_i915_exit_bpo(void) { return 0; } +static inline int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *) +{ + return -ENODEV; +} #endif
#endif -- 1.9.1
This lets the interested codec be notified when an i915 pin/ELD
event happens.
Signed-off-by: David Henningsson <email address hidden> pci/hda/ hda_i915. c | 10 ++++++++++ pci/hda/ hda_intel. h | 5 +++++
---
sound/
sound/
2 files changed, 15 insertions(+)
diff --git a/sound/ pci/hda/ hda_i915. c b/sound/ pci/hda/ hda_i915. c pci/hda/ hda_i915. c pci/hda/ hda_i915. c set_bclk( struct hda_intel *hda) &hda->chip, EM5, bclk_n);
index aec8a0e..b6eadf1 100644
--- a/sound/
+++ b/sound/
@@ -108,6 +108,16 @@ void haswell_
azx_writew(
}
+int snd_hdac_ i915_register_ notifier( const struct i915_audio_ component_ audio_ops *aops) !hdac_acomp) ) >audio_ ops = aops; SYMBOL_ GPL(snd_ hdac_i915_ register_ notifier) ; master_ bind(struct device *dev) drvdata( dev); pci/hda/ hda_intel. h b/sound/ pci/hda/ hda_intel. h pci/hda/ hda_intel. h pci/hda/ hda_intel. h set_bclk( struct hda_intel *hda); init(struct hda_intel *hda); init_bpo( struct hda_intel *hda); exit(struct hda_intel *hda); i915_register_ notifier( const struct i915_audio_ component_ audio_ops *); codec_wakeup( struct hda_intel *hda, bool enable) exit_bpo( void) i915_register_ notifier( const struct i915_audio_ component_ audio_ops *)
+{
+ if (WARN_ON(
+ return -ENODEV;
+
+ hdac_acomp-
+ return 0;
+}
+EXPORT_
+
static int hda_component_
{
struct snd_card *card = dev_get_
diff --git a/sound/
index 51cd664..51b940c 100644
--- a/sound/
+++ b/sound/
@@ -54,6 +54,7 @@ void haswell_
int hda_i915_
int hda_i915_
int hda_i915_
+int snd_hdac_
#else
static inline int hda_set_
{
@@ -80,6 +81,10 @@ static inline int hda_i915_
{
return 0;
}
+static inline int snd_hdac_
+{
+ return -ENODEV;
+}
#endif
#endif
--
1.9.1