aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_native.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-10-10 05:49:49 -0400
committerJaroslav Kysela <perex@suse.cz>2005-11-04 07:17:47 -0500
commit07799e756c76ecd52cb01a812ba48b7d8ac67633 (patch)
tree5b6a006d90e631e6b70264aba355314a7cedbbe5 /sound/core/pcm_native.c
parent7c22f1aaa23370bf9ba2dd3abbccbed70dced216 (diff)
[ALSA] Use getnstimeofday()
Modules: Documentation,PCM Midlevel,Timer Midlevel,ALSA Core Use the standard getnstimeofday() function instead of ALSA's own one. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r--sound/core/pcm_native.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index e6e2b70314c0..a1924f12d8fc 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -565,9 +565,9 @@ int snd_pcm_status(snd_pcm_substream_t *substream,
565 if (runtime->tstamp_mode & SNDRV_PCM_TSTAMP_MMAP) 565 if (runtime->tstamp_mode & SNDRV_PCM_TSTAMP_MMAP)
566 status->tstamp = runtime->status->tstamp; 566 status->tstamp = runtime->status->tstamp;
567 else 567 else
568 snd_timestamp_now(&status->tstamp, runtime->tstamp_timespec); 568 getnstimeofday(&status->tstamp);
569 } else 569 } else
570 snd_timestamp_now(&status->tstamp, runtime->tstamp_timespec); 570 getnstimeofday(&status->tstamp);
571 status->appl_ptr = runtime->control->appl_ptr; 571 status->appl_ptr = runtime->control->appl_ptr;
572 status->hw_ptr = runtime->status->hw_ptr; 572 status->hw_ptr = runtime->status->hw_ptr;
573 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 573 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
@@ -652,7 +652,7 @@ static void snd_pcm_trigger_tstamp(snd_pcm_substream_t *substream)
652 if (runtime->trigger_master == NULL) 652 if (runtime->trigger_master == NULL)
653 return; 653 return;
654 if (runtime->trigger_master == substream) { 654 if (runtime->trigger_master == substream) {
655 snd_timestamp_now(&runtime->trigger_tstamp, runtime->tstamp_timespec); 655 getnstimeofday(&runtime->trigger_tstamp);
656 } else { 656 } else {
657 snd_pcm_trigger_tstamp(runtime->trigger_master); 657 snd_pcm_trigger_tstamp(runtime->trigger_master);
658 runtime->trigger_tstamp = runtime->trigger_master->runtime->trigger_tstamp; 658 runtime->trigger_tstamp = runtime->trigger_master->runtime->trigger_tstamp;
@@ -2446,14 +2446,8 @@ static int snd_pcm_common_ioctl1(snd_pcm_substream_t *substream,
2446 return put_user(SNDRV_PCM_VERSION, (int __user *)arg) ? -EFAULT : 0; 2446 return put_user(SNDRV_PCM_VERSION, (int __user *)arg) ? -EFAULT : 0;
2447 case SNDRV_PCM_IOCTL_INFO: 2447 case SNDRV_PCM_IOCTL_INFO:
2448 return snd_pcm_info_user(substream, arg); 2448 return snd_pcm_info_user(substream, arg);
2449 case SNDRV_PCM_IOCTL_TSTAMP: 2449 case SNDRV_PCM_IOCTL_TSTAMP: /* just for compatibility */
2450 {
2451 int xarg;
2452 if (get_user(xarg, (int __user *)arg))
2453 return -EFAULT;
2454 substream->runtime->tstamp_timespec = xarg ? 1 : 0;
2455 return 0; 2450 return 0;
2456 }
2457 case SNDRV_PCM_IOCTL_HW_REFINE: 2451 case SNDRV_PCM_IOCTL_HW_REFINE:
2458 return snd_pcm_hw_refine_user(substream, arg); 2452 return snd_pcm_hw_refine_user(substream, arg);
2459 case SNDRV_PCM_IOCTL_HW_PARAMS: 2453 case SNDRV_PCM_IOCTL_HW_PARAMS: