diff options
author | Jaroslav Kysela <perex@perex.cz> | 2010-01-05 17:19:34 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2010-01-07 15:47:38 +0100 |
commit | f240406babfe1526998e10583ea5eccc2676a433 (patch) | |
tree | 311f0dd33f0ec87bd0ac48d4871f67ad78b9ee36 /include/sound | |
parent | 4d96eb255c53ab5e39b37fd4d484ea3dc39ab456 (diff) | |
download | kernel_samsung_smdk4412-f240406babfe1526998e10583ea5eccc2676a433.tar.gz kernel_samsung_smdk4412-f240406babfe1526998e10583ea5eccc2676a433.tar.bz2 kernel_samsung_smdk4412-f240406babfe1526998e10583ea5eccc2676a433.zip |
ALSA: pcm_lib - cleanup & merge hw_ptr update functions
Do general cleanup in snd_pcm_update_hw_ptr*() routines and merge them.
The main change is hw_ptr_interrupt variable removal to simplify code
logic. This variable can be computed directly from hw_ptr.
Ensure that updated hw_ptr is not lower than previous one (it was possible
with old code in some obscure situations when interrupt was delayed or
the lowlevel driver returns wrong ring buffer position value).
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/pcm.h | 1 | ||||
-rw-r--r-- | include/sound/pcm_oss.h | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 4e18a6dbe69..fe1b131842b 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -271,7 +271,6 @@ struct snd_pcm_runtime { int overrange; snd_pcm_uframes_t avail_max; snd_pcm_uframes_t hw_ptr_base; /* Position at buffer restart */ - snd_pcm_uframes_t hw_ptr_interrupt; /* Position at interrupt time */ unsigned long hw_ptr_jiffies; /* Time when hw_ptr is updated */ snd_pcm_sframes_t delay; /* extra delay; typically FIFO size */ diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h index cc4e226f35f..760c969d885 100644 --- a/include/sound/pcm_oss.h +++ b/include/sound/pcm_oss.h @@ -61,7 +61,7 @@ struct snd_pcm_oss_runtime { struct snd_pcm_plugin *plugin_first; struct snd_pcm_plugin *plugin_last; #endif - unsigned int prev_hw_ptr_interrupt; + unsigned int prev_hw_ptr_period; }; struct snd_pcm_oss_file { |