mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
soc: remove tdm slot mask invalid err log in multi lane case
slot mask use group value instead of port value, which will return default value when multi lane is enabled Change-Id: Iac2f6876915d14b1f5b005354a6edb9239fa41f9 Signed-off-by: Hongtao Peng <quic_hongtaop@quicinc.com>
This commit is contained in:
parent
f374586dc0
commit
dd1d9f2502
1 changed files with 10 additions and 3 deletions
|
|
@ -11263,7 +11263,7 @@ static int msm_dai_q6_tdm_set_channel_map(struct snd_soc_dai *dai,
|
|||
}
|
||||
|
||||
static unsigned int tdm_param_set_slot_mask(u16 *slot_offset, int slot_width,
|
||||
int slots_per_frame)
|
||||
int slots_per_frame, int num_channels)
|
||||
{
|
||||
unsigned int i = 0;
|
||||
unsigned int slot_index = 0;
|
||||
|
|
@ -11280,6 +11280,11 @@ static unsigned int tdm_param_set_slot_mask(u16 *slot_offset, int slot_width,
|
|||
return slot_mask;
|
||||
}
|
||||
|
||||
if (num_channels != slots_per_frame) {
|
||||
pr_debug("%s: multi lane is enabled, use the slot mask of tdm group\n", __func__);
|
||||
return slot_mask;
|
||||
}
|
||||
|
||||
for (i = 0; i < channel_count; i++) {
|
||||
if (slot_offset[i] != AFE_SLOT_MAPPING_OFFSET_INVALID) {
|
||||
slot_index = slot_offset[i] / slot_width_bytes;
|
||||
|
|
@ -11407,11 +11412,13 @@ static int msm_dai_q6_tdm_hw_params(struct snd_pcm_substream *substream,
|
|||
tdm->slot_mask = tdm_param_set_slot_mask(
|
||||
slot_mapping_v2->offset,
|
||||
tdm_group->slot_width,
|
||||
tdm_group->nslots_per_frame);
|
||||
tdm_group->nslots_per_frame,
|
||||
tdm_group->num_channels);
|
||||
else
|
||||
tdm->slot_mask = tdm_param_set_slot_mask(slot_mapping->offset,
|
||||
tdm_group->slot_width,
|
||||
tdm_group->nslots_per_frame);
|
||||
tdm_group->nslots_per_frame,
|
||||
tdm_group->num_channels);
|
||||
|
||||
pr_debug("%s: TDM:\n"
|
||||
"num_channels=%d sample_rate=%d bit_width=%d\n"
|
||||
|
|
|
|||
Loading…
Reference in a new issue