Re: [PATCH v5 2/3] ASoC: tegra: Unify ASoC machine drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



28.05.2021 20:28, Dmitry Osipenko пишет:
> -static int tegra_wm9712_driver_probe(struct platform_device *pdev)
> -{
> -	struct device_node *np = pdev->dev.of_node;
> -	struct snd_soc_card *card = &snd_soc_tegra_wm9712;
> -	struct tegra_wm9712 *machine;
> -	int ret;
> -
> -	machine = devm_kzalloc(&pdev->dev, sizeof(struct tegra_wm9712),
> -			       GFP_KERNEL);
> -	if (!machine)
> -		return -ENOMEM;
> -
> -	card->dev = &pdev->dev;
> -	snd_soc_card_set_drvdata(card, machine);
> -
> -	machine->codec = platform_device_alloc("wm9712-codec", -1);
> -	if (!machine->codec) {
> -		dev_err(&pdev->dev, "Can't allocate wm9712 platform device\n");
> -		return -ENOMEM;
> -	}
> -
> -	ret = platform_device_add(machine->codec);
> -	if (ret)
> -		goto codec_put;
> -
> -	ret = snd_soc_of_parse_card_name(card, "nvidia,model");
> -	if (ret)
> -		goto codec_unregister;
> -
> -	ret = snd_soc_of_parse_audio_routing(card, "nvidia,audio-routing");
> -	if (ret)
> -		goto codec_unregister;
> -
> -	tegra_wm9712_dai.cpus->of_node = of_parse_phandle(np,
> -				       "nvidia,ac97-controller", 0);
> -	if (!tegra_wm9712_dai.cpus->of_node) {
> -		dev_err(&pdev->dev,
> -			"Property 'nvidia,ac97-controller' missing or invalid\n");
> -		ret = -EINVAL;
> -		goto codec_unregister;
> -	}
> -
> -	tegra_wm9712_dai.platforms->of_node = tegra_wm9712_dai.cpus->of_node;
> -
> -	ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
> -	if (ret)
> -		goto codec_unregister;
> -
> -	ret = tegra_asoc_utils_set_ac97_rate(&machine->util_data);
> -	if (ret)
> -		goto codec_unregister;

I just noticed that this AC97 clk initialization is gone now for wm9712,
I'll fix it in v6.



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux