]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: Add audio sync_audio_rate callback
authorLibin Yang <libin.yang@intel.com>
Wed, 2 Sep 2015 06:11:38 +0000 (14:11 +0800)
committerTakashi Iwai <tiwai@suse.de>
Fri, 25 Sep 2015 08:04:40 +0000 (10:04 +0200)
Add the sync_audio_rate callback.

With the callback, audio driver can trigger
i915 driver to set the proper N/CTS or N/M
based on different sample rates.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/drm/i915_component.h

index b2d56dd483d9c8ad197b6a59071c2dd2378652da..e6d35d7239c0492aabf7b5d1b4334e89719128f7 100644 (file)
@@ -33,6 +33,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 {