]> git.baikalelectronics.ru Git - kernel.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)
commitb6337fe920848967b6acae39aa2ba651dc2174ad
treee713e969b4998c8203de85c85e0061d2be2a82f2
parent6f05058d7d5f270916e7d91de21c6d41fa6958d6
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