diff options
-rw-r--r-- | sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c | 14 | ||||
-rw-r--r-- | sound/soc/msm/qdsp6v2/q6adm.c | 2 |
2 files changed, 7 insertions, 9 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c index 547af163c5c0..ec3c2671c797 100644 --- a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c @@ -121,14 +121,14 @@ static int msm_routing_get_bit_width(unsigned int format) return bit_width; } -static bool msm_is_fractional_resample_needed(int input_sr, int output_sr) +static bool msm_is_resample_needed(int input_sr, int output_sr) { bool rc = false; - if ((input_sr % output_sr != 0) && (output_sr % input_sr != 0)) + if (input_sr != output_sr) rc = true; - pr_debug("performing fractional resample (%s) for copp rate (%d)afe rate (%d)", + pr_debug("perform resampling (%s) for copp rate (%d)afe rate (%d)", (rc ? "oh yes" : "not really"), input_sr, output_sr); @@ -901,7 +901,7 @@ int msm_pcm_routing_reg_phy_compr_stream(int fe_id, int perf_mode, set_bit(copp_idx, &session_copp_map[fe_id][session_type][i]); - if (msm_is_fractional_resample_needed( + if (msm_is_resample_needed( sample_rate, msm_bedais[i].sample_rate)) adm_copp_mfc_cfg( @@ -1057,7 +1057,7 @@ int msm_pcm_routing_reg_phy_stream(int fedai_id, int perf_mode, set_bit(copp_idx, &session_copp_map[fedai_id][session_type][i]); - if (msm_is_fractional_resample_needed( + if (msm_is_resample_needed( sample_rate, msm_bedais[i].sample_rate)) adm_copp_mfc_cfg( @@ -1284,7 +1284,7 @@ static void msm_pcm_routing_process_audio(u16 reg, u16 val, int set) set_bit(copp_idx, &session_copp_map[val][session_type][reg]); - if (msm_is_fractional_resample_needed( + if (msm_is_resample_needed( sample_rate, msm_bedais[reg].sample_rate)) adm_copp_mfc_cfg( @@ -10381,7 +10381,7 @@ static int msm_pcm_routing_prepare(struct snd_pcm_substream *substream) set_bit(copp_idx, &session_copp_map[i][session_type][be_id]); - if (msm_is_fractional_resample_needed( + if (msm_is_resample_needed( sample_rate, bedai->sample_rate)) adm_copp_mfc_cfg( diff --git a/sound/soc/msm/qdsp6v2/q6adm.c b/sound/soc/msm/qdsp6v2/q6adm.c index e30a4efa6e60..564b67c9f76b 100644 --- a/sound/soc/msm/qdsp6v2/q6adm.c +++ b/sound/soc/msm/qdsp6v2/q6adm.c @@ -2508,8 +2508,6 @@ void adm_copp_mfc_cfg(int port_id, int copp_idx, int dst_sample_rate) mfc_cfg.sampling_rate = dst_sample_rate; mfc_cfg.bits_per_sample = atomic_read(&this_adm.copp.bit_width[port_idx][copp_idx]); - if (24 == mfc_cfg.bits_per_sample) - mfc_cfg.bits_per_sample = 32; open.dev_num_channel = mfc_cfg.num_channels = atomic_read(&this_adm.copp.channels[port_idx][copp_idx]); |