summaryrefslogtreecommitdiff
path: root/include/sound/pcm.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-03-27 17:29:20 +0000
committerMark Brown <broonie@kernel.org>2020-03-27 17:29:20 +0000
commit1c521d7e62262793789845989edca57dea24eb7d (patch)
treedd891362188494b9d665229696ffb72187998a00 /include/sound/pcm.h
parent8e3bb8ec11ed60963dbb70e69cf1a6806489dce3 (diff)
parent3d2cdb854659851d991f5b8e97e847e3fd240625 (diff)
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,