summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-09-25 10:07:55 +0200
committerTakashi Iwai <tiwai@suse.de>2015-09-25 10:07:55 +0200
commit010cf269a4e27252c029f10e1ccaa9ad4bd6a000 (patch)
tree50bdeafd598711b49e0cb21f074b3ff1b0033b50 /include
parent0b2c8c12f92996debdd7a2c2aebb33242e30922a (diff)
parent7e8275c2f2bbb384e18af37066b8b2f32b7d092f (diff)
Merge branch 'topic/drm-sync-audio-rate' into for-next
Diffstat (limited to 'include')
-rw-r--r--include/drm/i915_component.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/drm/i915_component.h b/include/drm/i915_component.h
index b2d56dd483d9..89dc7d6bc1cc 100644
--- a/include/drm/i915_component.h
+++ b/include/drm/i915_component.h
@@ -24,8 +24,18 @@
#ifndef _I915_COMPONENT_H_
#define _I915_COMPONENT_H_
+/* MAX_PORT is the number of port
+ * It must be sync with I915_MAX_PORTS defined i915_drv.h
+ * 5 should be enough as only HSW, BDW, SKL need such fix.
+ */
+#define MAX_PORTS 5
+
struct i915_audio_component {
struct device *dev;
+ /**
+ * @aud_sample_rate: the array of audio sample rate per port
+ */
+ int aud_sample_rate[MAX_PORTS];
const struct i915_audio_component_ops {
struct module *owner;
@@ -33,6 +43,13 @@ struct i915_audio_component {
void (*put_power)(struct device *);
void (*codec_wake_override)(struct device *, bool enable);
int (*get_cdclk_freq)(struct device *);
+ /**
+ * @sync_audio_rate: set n/cts based on the sample rate
+ *
+ * Called from audio driver. After audio driver sets the
+ * sample rate, it will call this function to set n/cts
+ */
+ int (*sync_audio_rate)(struct device *, int port, int rate);
} *ops;
const struct i915_audio_component_audio_ops {