mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
ASoC: simple-audio-card: add link-trigger-order support
Some Sound Card might need special trigger ordering which is based on CPU/Codec connection. It is already supported on ASoC, but Simple Audio Card still not yet support it. Let's support it. Cc: Maxim Kochetkov <fido_max@inbox.ru> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87plsmzojk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
5d9cacdccf
commit
8696d732f1
@ -176,6 +176,8 @@ static int simple_link_init(struct simple_util_priv *priv,
|
|||||||
struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
|
struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
|
||||||
struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link);
|
struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link);
|
||||||
struct device_node *node = of_get_parent(cpu);
|
struct device_node *node = of_get_parent(cpu);
|
||||||
|
enum snd_soc_trigger_order trigger_start = SND_SOC_TRIGGER_ORDER_DEFAULT;
|
||||||
|
enum snd_soc_trigger_order trigger_stop = SND_SOC_TRIGGER_ORDER_DEFAULT;
|
||||||
bool playback_only = 0, capture_only = 0;
|
bool playback_only = 0, capture_only = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -198,9 +200,17 @@ static int simple_link_init(struct simple_util_priv *priv,
|
|||||||
of_property_read_u32(codec, "mclk-fs", &dai_props->mclk_fs);
|
of_property_read_u32(codec, "mclk-fs", &dai_props->mclk_fs);
|
||||||
of_property_read_u32(codec, PREFIX "mclk-fs", &dai_props->mclk_fs);
|
of_property_read_u32(codec, PREFIX "mclk-fs", &dai_props->mclk_fs);
|
||||||
|
|
||||||
|
graph_util_parse_trigger_order(priv, top, &trigger_start, &trigger_stop);
|
||||||
|
graph_util_parse_trigger_order(priv, node, &trigger_start, &trigger_stop);
|
||||||
|
graph_util_parse_trigger_order(priv, cpu, &trigger_start, &trigger_stop);
|
||||||
|
graph_util_parse_trigger_order(priv, codec, &trigger_start, &trigger_stop);
|
||||||
|
|
||||||
dai_link->playback_only = playback_only;
|
dai_link->playback_only = playback_only;
|
||||||
dai_link->capture_only = capture_only;
|
dai_link->capture_only = capture_only;
|
||||||
|
|
||||||
|
dai_link->trigger_start = trigger_start;
|
||||||
|
dai_link->trigger_stop = trigger_stop;
|
||||||
|
|
||||||
dai_link->init = simple_util_dai_init;
|
dai_link->init = simple_util_dai_init;
|
||||||
dai_link->ops = &simple_ops;
|
dai_link->ops = &simple_ops;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user