Commit graph

6 commits

Author SHA1 Message Date
Kuninori Morimoto
f6fcc820e0
ASoC: audio-graph: move audio_graph_remove() to simple-card-utils.c
audio-graph-card2 can reuse  audio_graph_remove() / asoc_simple_remove().
This patch moves it to simple-card-utils.c.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y2df3uby.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-20 17:25:45 +01:00
Kuninori Morimoto
1a456b1c6b
ASoC: audio-graph: move audio_graph_card_probe() to simple-card-utils.c
audio-graph-card2 can reuse audio_graph_card_probe().
This patch moves it to simple-card-utils.c.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zgxv3uc4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-20 17:25:44 +01:00
Thierry Reding
868d5c6340
ASoC: tegra: Set driver name explicitly
The SoC sound core will generate a driver name by normalizing the card
name. However, most of the time that name does not tell anything about
the driver and is therefore useless for this purpose.

Make the driver name more useful by setting it explicitly during card
initialization.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20210330180657.1867971-1-thierry.reding@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-31 13:52:48 +01:00
Sameer Pujar
0d7475d2a5
ASoC: tegra: Add driver remove() callback
There is cleanup required, related to release of phandles, during driver
removal and hence point remove callback to audio_graph_remove().

Fixes: 202e2f7745 ("ASoC: tegra: Add audio graph based card driver")
Depends-on: "ASoC: audio-graph: Rename functions needed for export"
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1612719418-5858-3-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08 11:39:51 +00:00
Sameer Pujar
6e4ea8aace
ASoC: audio-graph: Rename functions needed for export
Following functions are renamed for a better global visibility.
  graph_card_probe() --> audio_graph_card_probe()
  graph_parse_of()   --> audio_graph_parse_of()
  graph_remove()     --> audio_graph_remove() [exported as well]

The references of these are updated in audio graph and Tegra audio
graph card drivers.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1612719418-5858-2-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08 11:39:50 +00:00
Sameer Pujar
202e2f7745
ASoC: tegra: Add audio graph based card driver
Add Tegra audio machine driver which is based on generic audio graph card
driver. It re-uses most of the common stuff from audio graph driver and
uses the same DT binding. Required Tegra specific customizations are done
in the driver and additional DT bindings are required for clock handling.

Details on the customizations done:

 - Update PLL rates at runtime: Tegra HW supports multiple sample rates
   (multiples of 8x and 11.025x) and both of these groups require different
   PLL rates. Hence there is a requirement to update this at runtime.
   This is achieved by providing a custom 'snd_soc_ops' and in hw_param()
   callback PLL rate is updated as per the sample rate.

 - Internal structure 'tegra_audio_graph_data' is used to maintain clock
   handles of PLL.

 - The 'force_dpcm' flag is set to use DPCM for all DAI links.

 - The 'component_chaining' flag is set to use DPCM with component model.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/1611048496-24650-4-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-19 14:09:21 +00:00