Lines Matching refs:qmc_audio
29 struct qmc_audio { struct
226 struct qmc_audio *qmc_audio = dev_get_drvdata(component->dev); in qmc_audio_of_xlate_dai_name() local
231 for (i = 0; i < qmc_audio->num_dais; i++) { in qmc_audio_of_xlate_dai_name()
232 dai_driver = qmc_audio->dai_drivers + i; in qmc_audio_of_xlate_dai_name()
298 struct qmc_audio *qmc_audio = snd_soc_dai_get_drvdata(dai); in qmc_dai_get_index() local
300 return dai->driver - qmc_audio->dai_drivers; in qmc_dai_get_index()
305 struct qmc_audio *qmc_audio = snd_soc_dai_get_drvdata(dai); in qmc_dai_get_data() local
309 if (index > qmc_audio->num_dais) in qmc_dai_get_data()
312 return qmc_audio->dais + index; in qmc_dai_get_data()
589 static int qmc_audio_dai_parse(struct qmc_audio *qmc_audio, struct device_node *np, in qmc_audio_dai_parse() argument
596 qmc_dai->dev = qmc_audio->dev; in qmc_audio_dai_parse()
600 dev_err(qmc_audio->dev, "%pOF: failed to read reg\n", np); in qmc_audio_dai_parse()
605 qmc_dai->name = devm_kasprintf(qmc_audio->dev, GFP_KERNEL, "%s.%d", in qmc_audio_dai_parse()
610 qmc_dai->qmc_chan = devm_qmc_chan_get_byphandle(qmc_audio->dev, np, in qmc_audio_dai_parse()
614 return dev_err_probe(qmc_audio->dev, ret, in qmc_audio_dai_parse()
623 dev_err(qmc_audio->dev, "dai %d get QMC channel info failed %d\n", in qmc_audio_dai_parse()
627 dev_info(qmc_audio->dev, "dai %d QMC channel mode %d, nb_tx_ts %u, nb_rx_ts %u\n", in qmc_audio_dai_parse()
631 dev_err(qmc_audio->dev, "dai %d QMC chan mode %d is not QMC_TRANSPARENT\n", in qmc_audio_dai_parse()
669 struct qmc_audio *qmc_audio; in qmc_audio_probe() local
674 qmc_audio = devm_kzalloc(&pdev->dev, sizeof(*qmc_audio), GFP_KERNEL); in qmc_audio_probe()
675 if (!qmc_audio) in qmc_audio_probe()
678 qmc_audio->dev = &pdev->dev; in qmc_audio_probe()
680 qmc_audio->num_dais = of_get_available_child_count(np); in qmc_audio_probe()
681 if (qmc_audio->num_dais) { in qmc_audio_probe()
682 qmc_audio->dais = devm_kcalloc(&pdev->dev, qmc_audio->num_dais, in qmc_audio_probe()
683 sizeof(*qmc_audio->dais), in qmc_audio_probe()
685 if (!qmc_audio->dais) in qmc_audio_probe()
688 qmc_audio->dai_drivers = devm_kcalloc(&pdev->dev, qmc_audio->num_dais, in qmc_audio_probe()
689 sizeof(*qmc_audio->dai_drivers), in qmc_audio_probe()
691 if (!qmc_audio->dai_drivers) in qmc_audio_probe()
697 ret = qmc_audio_dai_parse(qmc_audio, child, in qmc_audio_probe()
698 qmc_audio->dais + i, in qmc_audio_probe()
699 qmc_audio->dai_drivers + i); in qmc_audio_probe()
708 platform_set_drvdata(pdev, qmc_audio); in qmc_audio_probe()
710 ret = devm_snd_soc_register_component(qmc_audio->dev, in qmc_audio_probe()
712 qmc_audio->dai_drivers, in qmc_audio_probe()
713 qmc_audio->num_dais); in qmc_audio_probe()