Loading sound/soc/msm/qdsp6v2/msm-dai-q6-v2.c +18 −5 Original line number Diff line number Diff line Loading @@ -5657,6 +5657,10 @@ static int msm_dai_q6_tdm_prepare(struct snd_pcm_substream *substream, prim_port_id = dai->id; if (dai_data->sec_port_enable) { sec_port_id = AFE_PORT_ID_PRIMARY_TDM_TX; sec_group_ref = &tdm_group_ref[sec_group_idx]; } if ((dai_data->num_group_ports > 1) && (dai_data->sec_port_enable)) { sec_group_id = AFE_GROUP_DEVICE_ID_PRIMARY_TDM_TX; sec_group_idx = Loading @@ -5667,7 +5671,6 @@ static int msm_dai_q6_tdm_prepare(struct snd_pcm_substream *substream, sec_group_id); goto rtn; } sec_group_ref = &tdm_group_ref[sec_group_idx]; if (atomic_read(sec_group_ref) == 0) { rc = afe_port_group_enable( sec_group_id, Loading @@ -5687,6 +5690,10 @@ static int msm_dai_q6_tdm_prepare(struct snd_pcm_substream *substream, prim_port_id = dai->id; if (dai_data->sec_port_enable) { sec_port_id = AFE_PORT_ID_PRIMARY_TDM_RX; sec_group_ref = &tdm_group_ref[sec_group_idx]; } if ((dai_data->num_group_ports > 1) && (dai_data->sec_port_enable)) { sec_group_id = AFE_GROUP_DEVICE_ID_PRIMARY_TDM_RX; sec_group_idx = Loading @@ -5697,7 +5704,6 @@ static int msm_dai_q6_tdm_prepare(struct snd_pcm_substream *substream, sec_group_id); goto rtn; } sec_group_ref = &tdm_group_ref[sec_group_idx]; if (atomic_read(sec_group_ref) == 0) { rc = afe_port_group_enable( sec_group_id, Loading Loading @@ -5814,6 +5820,10 @@ static void msm_dai_q6_tdm_shutdown(struct snd_pcm_substream *substream, prim_port_id = dai->id; if (dai_data->sec_port_enable) { sec_port_id = AFE_PORT_ID_PRIMARY_TDM_TX; sec_group_ref = &tdm_group_ref[sec_group_idx]; } if ((dai_data->num_group_ports > 1) && (dai_data->sec_port_enable)) { sec_group_id = AFE_GROUP_DEVICE_ID_PRIMARY_TDM_TX; sec_group_idx = Loading @@ -5824,12 +5834,15 @@ static void msm_dai_q6_tdm_shutdown(struct snd_pcm_substream *substream, __func__, sec_group_id); return; } sec_group_ref = &tdm_group_ref[sec_group_idx]; } } else { prim_port_id = dai->id; if (dai_data->sec_port_enable) { sec_port_id = AFE_PORT_ID_PRIMARY_TDM_RX; sec_group_ref = &tdm_group_ref[sec_group_idx]; } if ((dai_data->num_group_ports > 1) && (dai_data->sec_port_enable)) { sec_group_id = AFE_GROUP_DEVICE_ID_PRIMARY_TDM_RX; sec_group_idx = Loading @@ -5840,7 +5853,6 @@ static void msm_dai_q6_tdm_shutdown(struct snd_pcm_substream *substream, __func__, sec_group_id); return; } sec_group_ref = &tdm_group_ref[sec_group_idx]; } } rc = afe_close(prim_port_id); Loading Loading @@ -5878,7 +5890,8 @@ static void msm_dai_q6_tdm_shutdown(struct snd_pcm_substream *substream, __func__, dai->id); } } if (dai_data->sec_port_enable) { if ((dai_data->num_group_ports > 1) && (dai_data->sec_port_enable)) { if (atomic_read(sec_group_ref) == 0) { rc = afe_port_group_enable(sec_group_id, NULL, false); Loading Loading
sound/soc/msm/qdsp6v2/msm-dai-q6-v2.c +18 −5 Original line number Diff line number Diff line Loading @@ -5657,6 +5657,10 @@ static int msm_dai_q6_tdm_prepare(struct snd_pcm_substream *substream, prim_port_id = dai->id; if (dai_data->sec_port_enable) { sec_port_id = AFE_PORT_ID_PRIMARY_TDM_TX; sec_group_ref = &tdm_group_ref[sec_group_idx]; } if ((dai_data->num_group_ports > 1) && (dai_data->sec_port_enable)) { sec_group_id = AFE_GROUP_DEVICE_ID_PRIMARY_TDM_TX; sec_group_idx = Loading @@ -5667,7 +5671,6 @@ static int msm_dai_q6_tdm_prepare(struct snd_pcm_substream *substream, sec_group_id); goto rtn; } sec_group_ref = &tdm_group_ref[sec_group_idx]; if (atomic_read(sec_group_ref) == 0) { rc = afe_port_group_enable( sec_group_id, Loading @@ -5687,6 +5690,10 @@ static int msm_dai_q6_tdm_prepare(struct snd_pcm_substream *substream, prim_port_id = dai->id; if (dai_data->sec_port_enable) { sec_port_id = AFE_PORT_ID_PRIMARY_TDM_RX; sec_group_ref = &tdm_group_ref[sec_group_idx]; } if ((dai_data->num_group_ports > 1) && (dai_data->sec_port_enable)) { sec_group_id = AFE_GROUP_DEVICE_ID_PRIMARY_TDM_RX; sec_group_idx = Loading @@ -5697,7 +5704,6 @@ static int msm_dai_q6_tdm_prepare(struct snd_pcm_substream *substream, sec_group_id); goto rtn; } sec_group_ref = &tdm_group_ref[sec_group_idx]; if (atomic_read(sec_group_ref) == 0) { rc = afe_port_group_enable( sec_group_id, Loading Loading @@ -5814,6 +5820,10 @@ static void msm_dai_q6_tdm_shutdown(struct snd_pcm_substream *substream, prim_port_id = dai->id; if (dai_data->sec_port_enable) { sec_port_id = AFE_PORT_ID_PRIMARY_TDM_TX; sec_group_ref = &tdm_group_ref[sec_group_idx]; } if ((dai_data->num_group_ports > 1) && (dai_data->sec_port_enable)) { sec_group_id = AFE_GROUP_DEVICE_ID_PRIMARY_TDM_TX; sec_group_idx = Loading @@ -5824,12 +5834,15 @@ static void msm_dai_q6_tdm_shutdown(struct snd_pcm_substream *substream, __func__, sec_group_id); return; } sec_group_ref = &tdm_group_ref[sec_group_idx]; } } else { prim_port_id = dai->id; if (dai_data->sec_port_enable) { sec_port_id = AFE_PORT_ID_PRIMARY_TDM_RX; sec_group_ref = &tdm_group_ref[sec_group_idx]; } if ((dai_data->num_group_ports > 1) && (dai_data->sec_port_enable)) { sec_group_id = AFE_GROUP_DEVICE_ID_PRIMARY_TDM_RX; sec_group_idx = Loading @@ -5840,7 +5853,6 @@ static void msm_dai_q6_tdm_shutdown(struct snd_pcm_substream *substream, __func__, sec_group_id); return; } sec_group_ref = &tdm_group_ref[sec_group_idx]; } } rc = afe_close(prim_port_id); Loading Loading @@ -5878,7 +5890,8 @@ static void msm_dai_q6_tdm_shutdown(struct snd_pcm_substream *substream, __func__, dai->id); } } if (dai_data->sec_port_enable) { if ((dai_data->num_group_ports > 1) && (dai_data->sec_port_enable)) { if (atomic_read(sec_group_ref) == 0) { rc = afe_port_group_enable(sec_group_id, NULL, false); Loading