Skip to content

Commit

Permalink
ASoC: soc-pcm: remove dpcm_playback/capture and playback/capture_only
Browse files Browse the repository at this point in the history
No driver is using dpcm_playback/capture and playback/capture_only flag,
let's remove these.

Signed-off-by: Kuninori Morimoto <[email protected]>
  • Loading branch information
morimoto authored and plbossart committed Apr 25, 2024
1 parent c0c3798 commit b6b4e68
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 33 deletions.
8 changes: 0 additions & 8 deletions include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -787,10 +787,6 @@ struct snd_soc_dai_link {
/* Mark this pcm with non atomic ops */
unsigned int nonatomic:1;

/* For unidirectional dai links */
unsigned int playback_only:1;
unsigned int capture_only:1;

/* Keep DAI active over suspend */
unsigned int ignore_suspend:1;

Expand All @@ -805,10 +801,6 @@ struct snd_soc_dai_link {
/* This DAI link can route to other DAI links at runtime (Frontend)*/
unsigned int dynamic:1;

/* DPCM capture and Playback support */
unsigned int dpcm_capture:1;
unsigned int dpcm_playback:1;

/*
* Capture / Playback support assertion. Having assertion flag is not mandatory.
* In case of having assertion flag, non specific side will be disabled.
Expand Down
7 changes: 0 additions & 7 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2011,13 +2011,6 @@ static void soc_check_tplg_fes(struct snd_soc_card *card)
dev_warn(card->dev,
"invalid configuration, dailink %s has flags no_pcm=0 and capture_assertion=1\n",
dai_link->name);

/* convert normal link into DPCM one */
if (!(dai_link->playback_assertion ||
dai_link->capture_assertion)) {
dai_link->playback_assertion = !dai_link->capture_only;
dai_link->capture_assertion = !dai_link->playback_only;
}
}

/*
Expand Down
18 changes: 0 additions & 18 deletions sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2808,24 +2808,6 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd,
return -EINVAL;
}

/*
* REMOVE ME
*
* dpcm_playback/capture will be used as playback/capture_assertion
*/
if (dai_link->playback_only && dai_link->capture_only) {
dev_err(rtd->dev, "both playback_only / capture_only are set\n");
return -EINVAL;
}
if (dai_link->playback_only)
dai_link->playback_assertion = 1;
if (dai_link->capture_only)
dai_link->capture_assertion = 1;
if (dai_link->dpcm_playback)
dai_link->playback_assertion = 1;
if (dai_link->dpcm_capture)
dai_link->capture_assertion = 1;

/* Adapt stream for codec2codec links */
cpu_playback = snd_soc_get_stream_cpu(dai_link, SNDRV_PCM_STREAM_PLAYBACK);
cpu_capture = snd_soc_get_stream_cpu(dai_link, SNDRV_PCM_STREAM_CAPTURE);
Expand Down

0 comments on commit b6b4e68

Please sign in to comment.