Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1738,13 +1738,21 @@ static void dpcm_runtime_setup_fe(struct snd_pcm_substream *substream)
struct snd_pcm_hardware *hw = &runtime->hw;
struct snd_soc_dai *dai;
int stream = substream->stream;
u64 formats = hw->formats;
int i;

soc_pcm_hw_init(hw);

if (formats)
hw->formats &= formats;
/*
* Initialize only pcm hardware patameters that has not been initialized
* and preserve the configuration which might have been provided by
* component drivers
*/
if (!hw->rates)
hw->rates = UINT_MAX;
if (!hw->rate_max)
hw->rate_max = UINT_MAX;
if (!hw->channels_max)
hw->channels_max = UINT_MAX;
if (!hw->formats)
hw->formats = ULLONG_MAX;

for_each_rtd_cpu_dais(fe, i, dai) {
const struct snd_soc_pcm_stream *cpu_stream;
Expand Down
Loading