aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_native.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-01-12 03:40:08 -0500
committerTakashi Iwai <tiwai@suse.de>2010-01-12 03:40:08 -0500
commita29fb94ff48cba620e1ac1317f5eef5920ead3ff (patch)
tree2fb8e026712bdf7848ea400e25118f6a58824a02 /sound/core/pcm_native.c
parent52a7a5835173af61b9f6c3038212370d9717526f (diff)
parentdd3533eca859a6debb1565503ec03e68354e08e0 (diff)
Merge commit alsa/devel into topic/misc
Conflicts: include/sound/version.h
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r--sound/core/pcm_native.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 25b0641e6b8c..a870fe696578 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -516,6 +516,7 @@ static int snd_pcm_sw_params(struct snd_pcm_substream *substream,
516 struct snd_pcm_sw_params *params) 516 struct snd_pcm_sw_params *params)
517{ 517{
518 struct snd_pcm_runtime *runtime; 518 struct snd_pcm_runtime *runtime;
519 int err;
519 520
520 if (PCM_RUNTIME_CHECK(substream)) 521 if (PCM_RUNTIME_CHECK(substream))
521 return -ENXIO; 522 return -ENXIO;
@@ -540,6 +541,7 @@ static int snd_pcm_sw_params(struct snd_pcm_substream *substream,
540 if (params->silence_threshold > runtime->buffer_size) 541 if (params->silence_threshold > runtime->buffer_size)
541 return -EINVAL; 542 return -EINVAL;
542 } 543 }
544 err = 0;
543 snd_pcm_stream_lock_irq(substream); 545 snd_pcm_stream_lock_irq(substream);
544 runtime->tstamp_mode = params->tstamp_mode; 546 runtime->tstamp_mode = params->tstamp_mode;
545 runtime->period_step = params->period_step; 547 runtime->period_step = params->period_step;
@@ -553,10 +555,10 @@ static int snd_pcm_sw_params(struct snd_pcm_substream *substream,
553 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && 555 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
554 runtime->silence_size > 0) 556 runtime->silence_size > 0)
555 snd_pcm_playback_silence(substream, ULONG_MAX); 557 snd_pcm_playback_silence(substream, ULONG_MAX);
556 wake_up(&runtime->sleep); 558 err = snd_pcm_update_state(substream, runtime);
557 } 559 }
558 snd_pcm_stream_unlock_irq(substream); 560 snd_pcm_stream_unlock_irq(substream);
559 return 0; 561 return err;
560} 562}
561 563
562static int snd_pcm_sw_params_user(struct snd_pcm_substream *substream, 564static int snd_pcm_sw_params_user(struct snd_pcm_substream *substream,
@@ -1247,8 +1249,6 @@ static int snd_pcm_do_reset(struct snd_pcm_substream *substream, int state)
1247 if (err < 0) 1249 if (err < 0)
1248 return err; 1250 return err;
1249 runtime->hw_ptr_base = 0; 1251 runtime->hw_ptr_base = 0;
1250 runtime->hw_ptr_interrupt = runtime->status->hw_ptr -
1251 runtime->status->hw_ptr % runtime->period_size;
1252 runtime->silence_start = runtime->status->hw_ptr; 1252 runtime->silence_start = runtime->status->hw_ptr;
1253 runtime->silence_filled = 0; 1253 runtime->silence_filled = 0;
1254 return 0; 1254 return 0;