提交 9eeb7304 编写于 作者: J Jani Nikula

drm/i915/audio: rename N value getter to emphasize it's for hdmi

We'll be getting a function and a table for dp parameters soon enough,
so rename the function and table for hdmi. No functional changes.

Cc: Libin Yang <libin.yang@linux.intel.com>
Reviewed-by: NLibin Yang <libin.yang@intel.com>
Signed-off-by: NJani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/3d1c61cab70b6a2966db9b6115b76edbd747a835.1476111629.git.jani.nikula@intel.com
上级 2561389a
...@@ -81,7 +81,7 @@ static const struct { ...@@ -81,7 +81,7 @@ static const struct {
int clock; int clock;
int n; int n;
int cts; int cts;
} aud_ncts[] = { } hdmi_aud_ncts[] = {
{ 44100, TMDS_296M, 4459, 234375 }, { 44100, TMDS_296M, 4459, 234375 },
{ 44100, TMDS_297M, 4704, 247500 }, { 44100, TMDS_297M, 4704, 247500 },
{ 48000, TMDS_296M, 5824, 281250 }, { 48000, TMDS_296M, 5824, 281250 },
...@@ -121,15 +121,15 @@ static u32 audio_config_hdmi_pixel_clock(const struct drm_display_mode *adjusted ...@@ -121,15 +121,15 @@ static u32 audio_config_hdmi_pixel_clock(const struct drm_display_mode *adjusted
return hdmi_audio_clock[i].config; return hdmi_audio_clock[i].config;
} }
static int audio_config_get_n(const struct drm_display_mode *adjusted_mode, static int audio_config_hdmi_get_n(const struct drm_display_mode *adjusted_mode,
int rate) int rate)
{ {
int i; int i;
for (i = 0; i < ARRAY_SIZE(aud_ncts); i++) { for (i = 0; i < ARRAY_SIZE(hdmi_aud_ncts); i++) {
if ((rate == aud_ncts[i].sample_rate) && if (rate == hdmi_aud_ncts[i].sample_rate &&
(adjusted_mode->crtc_clock == aud_ncts[i].clock)) { adjusted_mode->crtc_clock == hdmi_aud_ncts[i].clock) {
return aud_ncts[i].n; return hdmi_aud_ncts[i].n;
} }
} }
return 0; return 0;
...@@ -256,7 +256,7 @@ hsw_hdmi_audio_config_update(struct intel_crtc *intel_crtc, enum port port, ...@@ -256,7 +256,7 @@ hsw_hdmi_audio_config_update(struct intel_crtc *intel_crtc, enum port port,
if (adjusted_mode->crtc_clock == TMDS_296M || if (adjusted_mode->crtc_clock == TMDS_296M ||
adjusted_mode->crtc_clock == TMDS_297M) { adjusted_mode->crtc_clock == TMDS_297M) {
n = audio_config_get_n(adjusted_mode, rate); n = audio_config_hdmi_get_n(adjusted_mode, rate);
if (n != 0) { if (n != 0) {
tmp &= ~AUD_CONFIG_N_MASK; tmp &= ~AUD_CONFIG_N_MASK;
tmp |= AUD_CONFIG_N(n); tmp |= AUD_CONFIG_N(n);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册