Lines Matching full:memif

506 	struct mtk_base_afe_memif *memif = &afe->memif[memif_num];  in mt8365_afe_fe_startup()  local
509 memif->substream = substream; in mt8365_afe_fe_startup()
530 struct mtk_base_afe_memif *memif = &afe->memif[memif_num]; in mt8365_afe_fe_shutdown() local
532 memif->substream = NULL; in mt8365_afe_fe_shutdown()
546 struct mtk_base_afe_memif *memif = &afe->memif[dai_id]; in mt8365_afe_fe_hw_params() local
555 __func__, memif->data->name, params_period_size(params), in mt8365_afe_fe_hw_params()
585 __func__, memif->data->name, request_size, ret); in mt8365_afe_fe_hw_params()
605 memif->phys_buf_addr = lower_32_bits(substream->runtime->dma_addr); in mt8365_afe_fe_hw_params()
606 memif->buffer_size = substream->runtime->dma_bytes; in mt8365_afe_fe_hw_params()
609 regmap_write(afe->regmap, memif->data->reg_ofs_base, in mt8365_afe_fe_hw_params()
610 memif->phys_buf_addr); in mt8365_afe_fe_hw_params()
613 memif->data->reg_ofs_base + base_end_offset, in mt8365_afe_fe_hw_params()
614 memif->phys_buf_addr + memif->buffer_size - 1); in mt8365_afe_fe_hw_params()
617 if (memif->data->mono_shift >= 0) { in mt8365_afe_fe_hw_params()
620 if (memif->data->mono_reg < 0) in mt8365_afe_fe_hw_params()
623 regmap_update_bits(afe->regmap, memif->data->mono_reg, in mt8365_afe_fe_hw_params()
624 1 << memif->data->mono_shift, in mt8365_afe_fe_hw_params()
625 mono << memif->data->mono_shift); in mt8365_afe_fe_hw_params()
629 if (memif->data->fs_shift < 0) in mt8365_afe_fe_hw_params()
637 if (memif->data->fs_reg < 0) in mt8365_afe_fe_hw_params()
640 regmap_update_bits(afe->regmap, memif->data->fs_reg, in mt8365_afe_fe_hw_params()
641 memif->data->fs_maskbit << memif->data->fs_shift, in mt8365_afe_fe_hw_params()
642 fs << memif->data->fs_shift); in mt8365_afe_fe_hw_params()
674 struct mtk_base_afe_memif *memif = &afe->memif[dai_id]; in mt8365_afe_fe_prepare() local
677 if (memif->data->hd_reg >= 0) { in mt8365_afe_fe_prepare()
680 regmap_update_bits(afe->regmap, memif->data->hd_reg, in mt8365_afe_fe_prepare()
681 3 << memif->data->hd_shift, in mt8365_afe_fe_prepare()
682 0 << memif->data->hd_shift); in mt8365_afe_fe_prepare()
685 regmap_update_bits(afe->regmap, memif->data->hd_reg, in mt8365_afe_fe_prepare()
686 3 << memif->data->hd_shift, in mt8365_afe_fe_prepare()
687 3 << memif->data->hd_shift); in mt8365_afe_fe_prepare()
691 memif->data->hd_reg, in mt8365_afe_fe_prepare()
692 3 << memif->data->hd_shift, in mt8365_afe_fe_prepare()
693 1 << memif->data->hd_shift); in mt8365_afe_fe_prepare()
695 memif->data->hd_reg, in mt8365_afe_fe_prepare()
696 1 << memif->data->hd_align_mshift, in mt8365_afe_fe_prepare()
697 1 << memif->data->hd_align_mshift); in mt8365_afe_fe_prepare()
701 regmap_update_bits(afe->regmap, memif->data->hd_reg, in mt8365_afe_fe_prepare()
702 3 << memif->data->hd_shift, in mt8365_afe_fe_prepare()
703 1 << memif->data->hd_shift); in mt8365_afe_fe_prepare()
710 mt8365_afe_irq_direction_enable(afe, memif->irq_usage, in mt8365_afe_fe_prepare()
1938 struct mtk_base_afe_memif *memif = &afe->memif[i]; in mt8365_afe_irq_handler() local
1941 if (memif->irq_usage < 0) in mt8365_afe_irq_handler()
1944 mcu_irq = &afe->irqs[memif->irq_usage]; in mt8365_afe_irq_handler()
1949 snd_pcm_period_elapsed(memif->substream); in mt8365_afe_irq_handler()
2141 /* memif % irq initialize*/ in mt8365_afe_pcm_dev_probe()
2143 afe->memif = devm_kcalloc(afe->dev, afe->memif_size, in mt8365_afe_pcm_dev_probe()
2144 sizeof(*afe->memif), GFP_KERNEL); in mt8365_afe_pcm_dev_probe()
2145 if (!afe->memif) in mt8365_afe_pcm_dev_probe()
2188 afe->memif[i].data = &memif_data[i]; in mt8365_afe_pcm_dev_probe()
2191 afe->memif[i].irq_usage = sel_irq; in mt8365_afe_pcm_dev_probe()
2192 afe->memif[i].const_irq = 1; in mt8365_afe_pcm_dev_probe()
2195 afe->memif[i].irq_usage = -1; in mt8365_afe_pcm_dev_probe()