diff options
author | Jie Yang | 2015-10-16 17:57:46 +0800 |
---|---|---|
committer | Takashi Iwai | 2015-10-16 14:31:38 +0200 |
commit | 90bbaf66ee7b946952f1e82a0069639dea5fd893 (patch) | |
tree | e3850c14dde524593c99cf0487a8694601376a22 /include/sound | |
parent | dab9981756dbc3c50c194811f176f0d658c171af (diff) |
ALSA: timer: add config item to export PCM timer disabling for expert
PCM timer is not always used. For embedded device, we need an interface
to disable it when it is not needed, to shrink the kernel size and
memory footprint, here add CONFIG_SND_PCM_TIMER for it.
When both CONFIG_SND_PCM_TIMER and CONFIG_SND_TIMER is unselected,
about 25KB saving bonus we can get.
Please be noted that when disabled, those stubs who using pcm timer
(e.g. dmix, dsnoop & co) may work incorrectlly.
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/pcm.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index a4fcc9456194..2882dddfc91c 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -1111,10 +1111,16 @@ static inline void snd_pcm_set_runtime_buffer(struct snd_pcm_substream *substrea * Timer interface */ +#ifdef CONFIG_SND_PCM_TIMER void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream); void snd_pcm_timer_init(struct snd_pcm_substream *substream); void snd_pcm_timer_done(struct snd_pcm_substream *substream); - +#else +static inline void +snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) {} +static inline void snd_pcm_timer_init(struct snd_pcm_substream *substream) {} +static inline void snd_pcm_timer_done(struct snd_pcm_substream *substream) {} +#endif /** * snd_pcm_gettime - Fill the timespec depending on the timestamp mode * @runtime: PCM runtime instance |