ALSA: hda - Build PCMs and controls at codec driver probe

This makes the code flow easier -- instead of the controller driver
calling snd_hda_build_pcms() and snd_hda_build_controls() explicitly,
the codec driver itself builds PCMs and controls at probe time.  Then
the controller driver only needs to call snd_card_register().

Also, this allows us the full bind/unbind control, too.  Even when a
codec driver is bound later, it automatically registers the new PCM
and controls by itself.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2015-02-27 20:44:54 +01:00
parent 9a6246ff78
commit bcd96557bd
5 ha cambiato i file con 17 aggiunte e 94 eliminazioni

Vedi File

@@ -497,16 +497,6 @@ static int hda_tegra_probe(struct platform_device *pdev)
if (err < 0)
goto out_free;
/* create PCM streams */
err = snd_hda_build_pcms(chip->bus);
if (err < 0)
goto out_free;
/* create mixer controls */
err = snd_hda_build_controls(chip->bus);
if (err < 0)
goto out_free;
err = snd_card_register(chip->card);
if (err < 0)
goto out_free;