Skip to content

Commit

Permalink
ASoC: generic: Replace playback/capture_only to playback/capture_asse…
Browse files Browse the repository at this point in the history
…rtion

soc_get_playback_capture() is now handling DPCM and normal
comprehensively for playback/capture stream in same code.
This patch converts xxx_only flag to xxx_assertion.

Signed-off-by: Kuninori Morimoto <[email protected]>
  • Loading branch information
morimoto authored and plbossart committed Apr 25, 2024
1 parent 315e2cc commit c0c3798
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/sound/simple_card_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ int graph_util_parse_dai(struct device *dev, struct device_node *ep,
struct snd_soc_dai_link_component *dlc, int *is_single_link);

int graph_util_parse_link_direction(struct device_node *np,
bool *is_playback_only, bool *is_capture_only);
bool *playback_assertion, bool *capture_assertion);

#ifdef DEBUG
static inline void simple_util_debug_dai(struct simple_util_priv *priv,
Expand Down
8 changes: 4 additions & 4 deletions sound/soc/generic/audio-graph-card2.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ static void graph_link_init(struct simple_util_priv *priv,
struct device_node *ep;
struct device_node *ports;
unsigned int daifmt = 0, daiclk = 0;
bool playback_only = 0, capture_only = 0;
bool playback_assertion = 0, capture_assertion = 0;
unsigned int bit_frame = 0;

if (graph_lnk_is_multi(port)) {
Expand Down Expand Up @@ -798,10 +798,10 @@ static void graph_link_init(struct simple_util_priv *priv,
if (is_cpu_node)
daiclk = snd_soc_daifmt_clock_provider_flipped(daiclk);

graph_util_parse_link_direction(port, &playback_only, &capture_only);
graph_util_parse_link_direction(port, &playback_assertion, &capture_assertion);

dai_link->playback_only = playback_only;
dai_link->capture_only = capture_only;
dai_link->playback_assertion = playback_assertion;
dai_link->capture_assertion = capture_assertion;

dai_link->dai_fmt = daifmt | daiclk;
dai_link->init = simple_util_dai_init;
Expand Down
6 changes: 3 additions & 3 deletions sound/soc/generic/simple-card-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ int graph_util_parse_dai(struct device *dev, struct device_node *ep,
EXPORT_SYMBOL_GPL(graph_util_parse_dai);

int graph_util_parse_link_direction(struct device_node *np,
bool *playback_only, bool *capture_only)
bool *playback_assertion, bool *capture_assertion)
{
bool is_playback_only = false;
bool is_capture_only = false;
Expand All @@ -1138,8 +1138,8 @@ int graph_util_parse_link_direction(struct device_node *np,
if (is_playback_only && is_capture_only)
return -EINVAL;

*playback_only = is_playback_only;
*capture_only = is_capture_only;
*playback_assertion = is_playback_only;
*capture_assertion = is_capture_only;

return 0;
}
Expand Down

0 comments on commit c0c3798

Please sign in to comment.