]> git.karo-electronics.de Git - linux-beck.git/commit
drm/i915/audio: set proper N/M in modeset
authorLibin Yang <libin.yang@linux.intel.com>
Tue, 25 Oct 2016 14:54:18 +0000 (17:54 +0300)
committerJani Nikula <jani.nikula@intel.com>
Wed, 26 Oct 2016 09:36:30 +0000 (12:36 +0300)
commit6014ac122ed081feca99217bc57b2e15c7fc1a51
treee713e969b4998c8203de85c85e0061d2be2a82f2
parent9ca89c443de94751cd6fb5d84b215ec48279e8c2
drm/i915/audio: set proper N/M in modeset

When modeset occurs and the LS_CLK is set to some special values in DP
mode, the N/M need to be set manually if audio is playing. Otherwise the
first several seconds may be silent in audio playback.

The relationship of Maud and Naud is expressed in the following
equation:

Maud/Naud = 512 * fs / f_LS_Clk

Please refer VESA DisplayPort Standard spec for details.

v2 by Jani:
- organize Maud/Naud table according to DP 1.4 spec
- add 64k and 128k audio rates
- update HSW_AUD_M_CTS_ENABLE register when Maud not found
- remove extra checks for port clock
- simplify Maud/Naud lookup
- reset patch author back to Libin

Cc: "Zhang, Keqiao" <keqiao.zhang@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: "Lin, Mengdong" <mengdong.lin@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1477407258-30599-3-git-send-email-jani.nikula@intel.com
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_audio.c