[Intel-gfx] [PATCH v2 1/4] drm/i915: Add audio set_ncts callback

Jani Nikula jani.nikula at linux.intel.com
Mon Aug 10 04:46:21 PDT 2015


On Mon, 10 Aug 2015, libin.yang at intel.com wrote:
> From: Libin Yang <libin.yang at intel.com>
>
> Add the set_ncts callback.
>
> With the callback, audio driver can trigger
> i915 driver to set the proper N/CTS
> based on different sample rates.
>
> Signed-off-by: Libin Yang <libin.yang at intel.com>
> ---
>  include/drm/i915_component.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/include/drm/i915_component.h b/include/drm/i915_component.h
> index c9a8b64..7305881 100644
> --- a/include/drm/i915_component.h
> +++ b/include/drm/i915_component.h
> @@ -33,6 +33,8 @@ struct i915_audio_component {
>  		void (*put_power)(struct device *);
>  		void (*codec_wake_override)(struct device *, bool enable);
>  		int (*get_cdclk_freq)(struct device *);
> +		int (*set_ncts)(struct device *, int port, int dev_entry,
> +					int rate);

I'd rather call this set_audio_rate or similar, and dropping the
references to N and CTS. The caller does not need to know.

I'm also not fond of adding a dev_entry parameter and leaving it
unused. I do not think we know specifically how we're going to identify
MST sinks, and the interface may need to be changed anyway. Let's force
an update in the caller side as well when there's actually sensible
support in our side.

BR,
Jani.

>  	} *ops;
>  };
>  
> -- 
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the Intel-gfx mailing list