mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 22:08:33 -04:00
ASoC: imx-card: support playback or capture only
Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>: Be similar to audio graph card, support playback or capture only for imx-audio-card. imx-card can't directly refer to audio-graph-port.yaml, because it is not based on 'ports'. Add playback-only and capture-only property directly
This commit is contained in:
@@ -46,6 +46,14 @@ patternProperties:
|
||||
description: see tdm-slot.txt.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
playback-only:
|
||||
description: link is used only for playback
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
|
||||
capture-only:
|
||||
description: link is used only for capture
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
|
||||
cpu:
|
||||
description: Holds subnode which indicates cpu dai.
|
||||
type: object
|
||||
@@ -71,6 +79,12 @@ patternProperties:
|
||||
- link-name
|
||||
- cpu
|
||||
|
||||
allOf:
|
||||
- not:
|
||||
required:
|
||||
- playback-only
|
||||
- capture-only
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
|
||||
@@ -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