diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-05-06 16:14:09 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-05-06 16:14:34 +0200 |
commit | d81645510ce2a140816c4cb37c45b78d810ca63f (patch) | |
tree | edd9464900904d22a23da362bb152669480c5d26 /sound/soc/soc-pcm.c | |
parent | 2854cd34fbab5f28a356d3667c26b7856a7b73e2 (diff) | |
parent | 378d590c494551a68a824b939c711bb9a280e9ef (diff) | |
download | linux-d81645510ce2a140816c4cb37c45b78d810ca63f.tar.gz linux-d81645510ce2a140816c4cb37c45b78d810ca63f.tar.bz2 linux-d81645510ce2a140816c4cb37c45b78d810ca63f.zip |
Merge tag 'asoc-v5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v5.2
This is a pretty huge set of changes, it's been a pretty active release
all round but the big thing with this release is the Sound Open Firmware
changes from Intel, providing another DSP framework for use with the
DSPs in their SoCs. This one works with the firmware of the same name
which is free software (unlike the previous DSP firmwares and framework)
and there has been some interest in adoption by other systems already so
hopefully we will see adoption by other vendors in the future.
Other highlights include:
- Support for MCLK/sample rate ratio setting in the generic cards.
- Support for pin switches in the generic cards.
- A big set of improvements to the TLV320AIC32x4 drivers from Annaliese
McDermond.
- New drivers for Freescale audio mixers, several Intel machines,
several Mediatek machines, Meson G12A, Sound Open Firmware and
Spreadtrum compressed audio and DMA devices.
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r-- | sound/soc/soc-pcm.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index be80a12fba27..0a4f60c7a188 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -43,8 +43,8 @@ static bool snd_soc_dai_stream_valid(struct snd_soc_dai *dai, int stream) else codec_stream = &dai->driver->capture; - /* If the codec specifies any rate at all, it supports the stream. */ - return codec_stream->rates; + /* If the codec specifies any channels at all, it supports the stream */ + return codec_stream->channels_min; } /** @@ -1033,6 +1033,9 @@ interface_err: codec_err: for_each_rtd_codec_dai_rollback(rtd, i, codec_dai) { + if (!snd_soc_dai_stream_valid(codec_dai, substream->stream)) + continue; + if (codec_dai->driver->ops->hw_free) codec_dai->driver->ops->hw_free(substream, codec_dai); codec_dai->rate = 0; @@ -1090,6 +1093,9 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream) /* now free hw params for the DAIs */ for_each_rtd_codec_dai(rtd, i, codec_dai) { + if (!snd_soc_dai_stream_valid(codec_dai, substream->stream)) + continue; + if (codec_dai->driver->ops->hw_free) codec_dai->driver->ops->hw_free(substream, codec_dai); } @@ -2166,6 +2172,10 @@ int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int stream) } } + /* copy the fixed-up hw params for BE dai */ + memcpy(&be->dpcm[stream].hw_params, &dpcm->hw_params, + sizeof(struct snd_pcm_hw_params)); + /* only allow hw_params() if no connected FEs are running */ if (!snd_soc_dpcm_can_be_params(fe, be, stream)) continue; |