summaryrefslogtreecommitdiffstats
path: root/include/sound/pcm.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-03-27 18:29:20 +0100
committerMark Brown <broonie@kernel.org>2020-03-27 18:29:20 +0100
commit1c521d7e62262793789845989edca57dea24eb7d (patch)
treedd891362188494b9d665229696ffb72187998a00 /include/sound/pcm.h
parentMerge branch 'asoc-5.6' into asoc-linus (diff)
parentMerge series "ASoC: Intel: add SoundWire machine driver" from Pierre-Louis Bo... (diff)
downloadlinux-1c521d7e62262793789845989edca57dea24eb7d.tar.xz
linux-1c521d7e62262793789845989edca57dea24eb7d.zip
Merge branch 'asoc-5.7' into asoc-next
Diffstat (limited to 'include/sound/pcm.h')
-rw-r--r--include/sound/pcm.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index f657ff08f317..f7a95b711100 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -644,6 +644,11 @@ void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream,
#define snd_pcm_group_for_each_entry(s, substream) \
list_for_each_entry(s, &substream->group->substreams, link_list)
+#define for_each_pcm_streams(stream) \
+ for (stream = SNDRV_PCM_STREAM_PLAYBACK; \
+ stream <= SNDRV_PCM_STREAM_LAST; \
+ stream++)
+
/**
* snd_pcm_running - Check whether the substream is in a running state
* @substream: substream to check
@@ -1122,7 +1127,14 @@ snd_pcm_kernel_readv(struct snd_pcm_substream *substream,
return __snd_pcm_lib_xfer(substream, bufs, false, frames, true);
}
-int snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime);
+int snd_pcm_hw_limit_rates(struct snd_pcm_hardware *hw);
+
+static inline int
+snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime)
+{
+ return snd_pcm_hw_limit_rates(&runtime->hw);
+}
+
unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate);
unsigned int snd_pcm_rate_bit_to_rate(unsigned int rate_bit);
unsigned int snd_pcm_rate_mask_intersect(unsigned int rates_a,