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()
608 qmc_dai->qmc_chan = devm_qmc_chan_get_byphandle(qmc_audio->dev, np, in qmc_audio_dai_parse()
612 return dev_err_probe(qmc_audio->dev, ret, in qmc_audio_dai_parse()
621 dev_err(qmc_audio->dev, "dai %d get QMC channel info failed %d\n", in qmc_audio_dai_parse()
625 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()
629 dev_err(qmc_audio->dev, "dai %d QMC chan mode %d is not QMC_TRANSPARENT\n", in qmc_audio_dai_parse()
667 struct qmc_audio *qmc_audio; in qmc_audio_probe() local
672 qmc_audio = devm_kzalloc(&pdev->dev, sizeof(*qmc_audio), GFP_KERNEL); in qmc_audio_probe()
673 if (!qmc_audio) in qmc_audio_probe()
676 qmc_audio->dev = &pdev->dev; in qmc_audio_probe()
678 qmc_audio->num_dais = of_get_available_child_count(np); in qmc_audio_probe()
679 if (qmc_audio->num_dais) { in qmc_audio_probe()
680 qmc_audio->dais = devm_kcalloc(&pdev->dev, qmc_audio->num_dais, in qmc_audio_probe()
681 sizeof(*qmc_audio->dais), in qmc_audio_probe()
683 if (!qmc_audio->dais) in qmc_audio_probe()
686 qmc_audio->dai_drivers = devm_kcalloc(&pdev->dev, qmc_audio->num_dais, in qmc_audio_probe()
687 sizeof(*qmc_audio->dai_drivers), in qmc_audio_probe()
689 if (!qmc_audio->dai_drivers) in qmc_audio_probe()
695 ret = qmc_audio_dai_parse(qmc_audio, child, in qmc_audio_probe()
696 qmc_audio->dais + i, in qmc_audio_probe()
697 qmc_audio->dai_drivers + i); in qmc_audio_probe()
706 platform_set_drvdata(pdev, qmc_audio); in qmc_audio_probe()
708 ret = devm_snd_soc_register_component(qmc_audio->dev, in qmc_audio_probe()
710 qmc_audio->dai_drivers, in qmc_audio_probe()
711 qmc_audio->num_dais); in qmc_audio_probe()