aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_lib.c
diff options
context:
space:
mode:
authorJie Yang <yang.jie@intel.com>2015-10-16 05:57:46 -0400
committerTakashi Iwai <tiwai@suse.de>2015-10-16 08:31:38 -0400
commit90bbaf66ee7b946952f1e82a0069639dea5fd893 (patch)
treee3850c14dde524593c99cf0487a8694601376a22 /sound/core/pcm_lib.c
parentdab9981756dbc3c50c194811f176f0d658c171af (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 'sound/core/pcm_lib.c')
-rw-r--r--sound/core/pcm_lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 7d45645f10ba..6dc4277937b8 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -1883,8 +1883,10 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)
1883 snd_pcm_update_hw_ptr0(substream, 1) < 0) 1883 snd_pcm_update_hw_ptr0(substream, 1) < 0)
1884 goto _end; 1884 goto _end;
1885 1885
1886#ifdef CONFIG_SND_PCM_TIMER
1886 if (substream->timer_running) 1887 if (substream->timer_running)
1887 snd_timer_interrupt(substream->timer, 1); 1888 snd_timer_interrupt(substream->timer, 1);
1889#endif
1888 _end: 1890 _end:
1889 snd_pcm_stream_unlock_irqrestore(substream, flags); 1891 snd_pcm_stream_unlock_irqrestore(substream, flags);
1890 if (runtime->transfer_ack_end) 1892 if (runtime->transfer_ack_end)