Commit 2c9a7908 authored by Dave Airlie's avatar Dave Airlie Committed by Alex Deucher

amdgpu/dc: make get_audio_clock_info return void.

This function never returned false under any sane circumstances.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 99913a17
...@@ -1238,7 +1238,7 @@ uint32_t calc_max_audio_packets_per_line( ...@@ -1238,7 +1238,7 @@ uint32_t calc_max_audio_packets_per_line(
return max_packets_per_line; return max_packets_per_line;
} }
bool get_audio_clock_info( void get_audio_clock_info(
enum dc_color_depth color_depth, enum dc_color_depth color_depth,
uint32_t crtc_pixel_clock_in_khz, uint32_t crtc_pixel_clock_in_khz,
uint32_t actual_pixel_clock_in_khz, uint32_t actual_pixel_clock_in_khz,
...@@ -1249,9 +1249,6 @@ bool get_audio_clock_info( ...@@ -1249,9 +1249,6 @@ bool get_audio_clock_info(
uint32_t crtc_pixel_clock_in_10khz = crtc_pixel_clock_in_khz / 10; uint32_t crtc_pixel_clock_in_10khz = crtc_pixel_clock_in_khz / 10;
uint32_t audio_array_size; uint32_t audio_array_size;
if (audio_clock_info == NULL)
return false; /* should not happen */
switch (color_depth) { switch (color_depth) {
case COLOR_DEPTH_161616: case COLOR_DEPTH_161616:
clock_info = audio_clock_info_table_48bpc; clock_info = audio_clock_info_table_48bpc;
...@@ -1280,7 +1277,7 @@ bool get_audio_clock_info( ...@@ -1280,7 +1277,7 @@ bool get_audio_clock_info(
crtc_pixel_clock_in_10khz) { crtc_pixel_clock_in_10khz) {
/* match found */ /* match found */
*audio_clock_info = clock_info[index]; *audio_clock_info = clock_info[index];
return true; return;
} }
} }
} }
...@@ -1300,8 +1297,6 @@ bool get_audio_clock_info( ...@@ -1300,8 +1297,6 @@ bool get_audio_clock_info(
audio_clock_info->n_32khz = 4096; audio_clock_info->n_32khz = 4096;
audio_clock_info->n_44khz = 6272; audio_clock_info->n_44khz = 6272;
audio_clock_info->n_48khz = 6144; audio_clock_info->n_48khz = 6144;
return true;
} }
static void dce110_se_audio_setup( static void dce110_se_audio_setup(
...@@ -1362,15 +1357,14 @@ static void dce110_se_setup_hdmi_audio( ...@@ -1362,15 +1357,14 @@ static void dce110_se_setup_hdmi_audio(
HDMI_ACR_AUDIO_PRIORITY, 0); HDMI_ACR_AUDIO_PRIORITY, 0);
/* Program audio clock sample/regeneration parameters */ /* Program audio clock sample/regeneration parameters */
if (get_audio_clock_info( get_audio_clock_info(crtc_info->color_depth,
crtc_info->color_depth,
crtc_info->requested_pixel_clock, crtc_info->requested_pixel_clock,
crtc_info->calculated_pixel_clock, crtc_info->calculated_pixel_clock,
&audio_clock_info)) { &audio_clock_info);
dm_logger_write(enc->ctx->logger, LOG_HW_AUDIO, dm_logger_write(enc->ctx->logger, LOG_HW_AUDIO,
"\n%s:Input::requested_pixel_clock = %d"\ "\n%s:Input::requested_pixel_clock = %d" \
"calculated_pixel_clock = %d \n", __func__,\ "calculated_pixel_clock = %d \n", __func__, \
crtc_info->requested_pixel_clock,\ crtc_info->requested_pixel_clock, \
crtc_info->calculated_pixel_clock); crtc_info->calculated_pixel_clock);
/* HDMI_ACR_32_0__HDMI_ACR_CTS_32_MASK */ /* HDMI_ACR_32_0__HDMI_ACR_CTS_32_MASK */
...@@ -1395,7 +1389,6 @@ static void dce110_se_setup_hdmi_audio( ...@@ -1395,7 +1389,6 @@ static void dce110_se_setup_hdmi_audio(
be used by HD Audio driver be used by HD Audio driver
HDMI_ACR_PACKET_CONTROL__HDMI_ACR_N_MULTIPLE field is HDMI_ACR_PACKET_CONTROL__HDMI_ACR_N_MULTIPLE field is
programmed below in interruppt callback */ programmed below in interruppt callback */
} /* if */
/* AFMT_60958_0__AFMT_60958_CS_CHANNEL_NUMBER_L_MASK & /* AFMT_60958_0__AFMT_60958_CS_CHANNEL_NUMBER_L_MASK &
AFMT_60958_0__AFMT_60958_CS_CLOCK_ACCURACY_MASK */ AFMT_60958_0__AFMT_60958_CS_CLOCK_ACCURACY_MASK */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment