aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/pcm_params.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-02-24ALSA: Add params_set_format helperFang, Yang A1-0/+7
Add a helper to set pcm format directly from params Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-30ALSA: pcm: Replace custom ld2 function with __flsLars-Peter Clausen1-26/+1
__fls has the same semantics as ld2, so there is no need to re-implement it. Furthermore a lot of architectures have custom implementations of __fls that are able to use special hardware instructions to compute the result. This makes the code slightly shorter and faster. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-30ALSA: pcm: Use __ffs() instead of ffs() in snd_mask_min()Lars-Peter Clausen1-1/+1
The difference between __ffs and ffs is that ffs will return a one based index whereas __ffs will return a zero based index. Furthermore ffs will check if the passed value is zero and return zero in that case, whereas __ffs behavior is undefined if the passed parameter is 0. Since we already check if the mask is 0 before calling ffs and also subtract 1 from the result __ffs is the better choice. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-30ALSA: pcm: Simplify params_period_bytes()Lars-Peter Clausen1-3/+1
The hw_params struct has a parameter that contains the period size in bytes. This can be used instead of deriving the value from other parameters. This is similar to e.g. params_buffer_bytes() Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-30ALSA: pcm: Add kernel doc for params_*() functionsLars-Peter Clausen1-4/+33
Add kernel doc for the remaining undocumented params_*() functions. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-30ALSA: pcm: Convert params_* mask helpers to static inline functionsLars-Peter Clausen1-6/+18
Use static inline functions instead of macros for the remaining params_*() helpers that have not been converted yet. This is slightly cleaner and offers better type safety. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-30ALSA: pcm_params: Remove unused add/sub functionsLars-Peter Clausen1-14/+0
Those two functions are not used anywhere and also their name is a bit to generic to be in a global header, so remove them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-30ALSA: Add params_width() helpersMark Brown1-0/+12
Add helpers for obtaining the width of a format directly from params since this is expected to become a common operation in ASoC. Signed-off-by: Mark Brown <broonie@linaro.org> Reviewed-by: Takashi Iwai <tiwai@suse.de>
2012-06-20ALSA: Add missing include of pcm.h to pcm_params.hMark Brown1-0/+2
There's a dependency but no #include. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-26ALSA: Make pcm.h self-containedTakashi Iwai1-1/+15
Move the macros depending on snd_mask_min() and co out of pcm.h into pcm_params.h. Otherwise using some params_*() macros will give comiple errors without inclusion of pcm_params.h. Also use hw_param_interval_c() and hw_param_mask_c() for const pointer. Reported-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22[ALSA] Move OSS-specific hw_params helper to snd-pcm-oss moduleTakashi Iwai1-12/+8
Move EXPORT_SYMBOL()s to places adjacent to functions/variables. Also move OSS-specific hw_params helper functions to pcm_oss.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22[ALSA] Clean up ugly hacks in pcm_params.hTakashi Iwai1-63/+42
Clean up ugly hacks for sync with alsa-lib in pcm_params.h. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: PCMTakashi Iwai1-43/+43
Modules: PCM Midlevel Remove xxx_t typedefs from the core PCM codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+366
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!