Skip to content

Commit

Permalink
ASoC: dpcm: Explicitly set BE DAI link supported stream directions
Browse files Browse the repository at this point in the history
Some BE DAIs can be "dummy" (when the DSP is controlling the DAI) and as such
wont have set a minimum number of playback or capture channels required for BE
DAI registration (to establish supported stream directions).

Force machine drivers to explicitly set whether they support playback and capture
stream directions for every BE DAIs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Liam Girdwood authored and Mark Brown committed Jan 7, 2014
1 parent 6ce4eac commit 1e9de42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,10 @@ 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;

/* pmdown_time is ignored at stop */
unsigned int ignore_pmdown_time:1;

Expand Down
6 changes: 2 additions & 4 deletions sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2026,10 +2026,8 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
int ret = 0, playback = 0, capture = 0;

if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) {
if (cpu_dai->driver->playback.channels_min)
playback = 1;
if (cpu_dai->driver->capture.channels_min)
capture = 1;
playback = rtd->dai_link->dpcm_playback;
capture = rtd->dai_link->dpcm_capture;
} else {
if (codec_dai->driver->playback.channels_min &&
cpu_dai->driver->playback.channels_min)
Expand Down

0 comments on commit 1e9de42

Please sign in to comment.