mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-06 08:47:40 -04:00
ASoC: imx-card: Add playback_only or capture_only support
With the DPCM case, the backend only support capture or playback, then the linked frontend can only support capture or playback, but frontend can't automatically enable only capture or playback, it needs the input from dt-binding. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com> Link: https://patch.msgid.link/20250217021715.284951-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
8c6ede5cc4
commit
1877c3e793
@@ -518,6 +518,7 @@ static int imx_card_parse_of(struct imx_card_data *data)
|
||||
struct snd_soc_dai_link *link;
|
||||
struct dai_link_data *link_data;
|
||||
struct of_phandle_args args;
|
||||
bool playback_only, capture_only;
|
||||
int ret, num_links;
|
||||
u32 asrc_fmt = 0;
|
||||
u32 width;
|
||||
@@ -679,6 +680,10 @@ static int imx_card_parse_of(struct imx_card_data *data)
|
||||
link->ops = &imx_aif_ops;
|
||||
}
|
||||
|
||||
graph_util_parse_link_direction(np, &playback_only, &capture_only);
|
||||
link->playback_only = playback_only;
|
||||
link->capture_only = capture_only;
|
||||
|
||||
/* Get dai fmt */
|
||||
ret = simple_util_parse_daifmt(dev, np, codec,
|
||||
NULL, &link->dai_fmt);
|
||||
|
||||
Reference in New Issue
Block a user