void map_tdm_mic_shutdown(struct snd_pcm_substream *substream) { #ifdef CONFIG_SND_TDM_STATIC_ALLOC struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *codec_dai = rtd->codec_dai; struct snd_soc_dai *cpu_dai = rtd->cpu_dai; int tx[1] = {0}; int tx_num = 1; #endif #ifdef CONFIG_SND_TDM_STATIC_ALLOC snd_soc_dai_set_channel_map(codec_dai, tx_num, tx, 0, NULL); snd_soc_dai_set_channel_map(cpu_dai, 0, NULL, tx_num, tx); mmp_tdm_static_slot_free(substream); #else mmp_tdm_free_slot(substream); #endif }
void mapasoc_tdm_hs_shutdown(struct snd_pcm_substream *substream) { #ifdef USE_STATIC_SLOT_ALLOC struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *codec_dai = rtd->codec_dai; struct snd_soc_dai *cpu_dai = rtd->cpu_dai; int tx[2] = {0, 0}; int tx_num = 2; #endif #ifdef USE_STATIC_SLOT_ALLOC snd_soc_dai_set_channel_map(codec_dai, 0, NULL, tx_num, tx); snd_soc_dai_set_channel_map(cpu_dai, tx_num, tx, 0, NULL); mmp_tdm_static_slot_free(substream); #else mmp_tdm_free_slot(substream); #endif }