diff options
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 3fc33deabe35..3c22d78ee8f4 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -435,7 +435,6 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream, | |||
435 | runtime->period_step = 1; | 435 | runtime->period_step = 1; |
436 | runtime->sleep_min = 0; | 436 | runtime->sleep_min = 0; |
437 | runtime->control->avail_min = runtime->period_size; | 437 | runtime->control->avail_min = runtime->period_size; |
438 | runtime->xfer_align = runtime->period_size; | ||
439 | runtime->start_threshold = 1; | 438 | runtime->start_threshold = 1; |
440 | runtime->stop_threshold = runtime->buffer_size; | 439 | runtime->stop_threshold = runtime->buffer_size; |
441 | runtime->silence_threshold = 0; | 440 | runtime->silence_threshold = 0; |
@@ -532,9 +531,6 @@ static int snd_pcm_sw_params(struct snd_pcm_substream *substream, | |||
532 | return -EINVAL; | 531 | return -EINVAL; |
533 | if (params->avail_min == 0) | 532 | if (params->avail_min == 0) |
534 | return -EINVAL; | 533 | return -EINVAL; |
535 | if (params->xfer_align == 0 || | ||
536 | params->xfer_align % runtime->min_align != 0) | ||
537 | return -EINVAL; | ||
538 | if (params->silence_size >= runtime->boundary) { | 534 | if (params->silence_size >= runtime->boundary) { |
539 | if (params->silence_threshold != 0) | 535 | if (params->silence_threshold != 0) |
540 | return -EINVAL; | 536 | return -EINVAL; |
@@ -553,7 +549,6 @@ static int snd_pcm_sw_params(struct snd_pcm_substream *substream, | |||
553 | runtime->stop_threshold = params->stop_threshold; | 549 | runtime->stop_threshold = params->stop_threshold; |
554 | runtime->silence_threshold = params->silence_threshold; | 550 | runtime->silence_threshold = params->silence_threshold; |
555 | runtime->silence_size = params->silence_size; | 551 | runtime->silence_size = params->silence_size; |
556 | runtime->xfer_align = params->xfer_align; | ||
557 | params->boundary = runtime->boundary; | 552 | params->boundary = runtime->boundary; |
558 | if (snd_pcm_running(substream)) { | 553 | if (snd_pcm_running(substream)) { |
559 | if (runtime->sleep_min) | 554 | if (runtime->sleep_min) |
@@ -2239,8 +2234,6 @@ static snd_pcm_sframes_t snd_pcm_playback_rewind(struct snd_pcm_substream *subst | |||
2239 | } | 2234 | } |
2240 | if (frames > (snd_pcm_uframes_t)hw_avail) | 2235 | if (frames > (snd_pcm_uframes_t)hw_avail) |
2241 | frames = hw_avail; | 2236 | frames = hw_avail; |
2242 | else | ||
2243 | frames -= frames % runtime->xfer_align; | ||
2244 | appl_ptr = runtime->control->appl_ptr - frames; | 2237 | appl_ptr = runtime->control->appl_ptr - frames; |
2245 | if (appl_ptr < 0) | 2238 | if (appl_ptr < 0) |
2246 | appl_ptr += runtime->boundary; | 2239 | appl_ptr += runtime->boundary; |
@@ -2289,8 +2282,6 @@ static snd_pcm_sframes_t snd_pcm_capture_rewind(struct snd_pcm_substream *substr | |||
2289 | } | 2282 | } |
2290 | if (frames > (snd_pcm_uframes_t)hw_avail) | 2283 | if (frames > (snd_pcm_uframes_t)hw_avail) |
2291 | frames = hw_avail; | 2284 | frames = hw_avail; |
2292 | else | ||
2293 | frames -= frames % runtime->xfer_align; | ||
2294 | appl_ptr = runtime->control->appl_ptr - frames; | 2285 | appl_ptr = runtime->control->appl_ptr - frames; |
2295 | if (appl_ptr < 0) | 2286 | if (appl_ptr < 0) |
2296 | appl_ptr += runtime->boundary; | 2287 | appl_ptr += runtime->boundary; |
@@ -2340,8 +2331,6 @@ static snd_pcm_sframes_t snd_pcm_playback_forward(struct snd_pcm_substream *subs | |||
2340 | } | 2331 | } |
2341 | if (frames > (snd_pcm_uframes_t)avail) | 2332 | if (frames > (snd_pcm_uframes_t)avail) |
2342 | frames = avail; | 2333 | frames = avail; |
2343 | else | ||
2344 | frames -= frames % runtime->xfer_align; | ||
2345 | appl_ptr = runtime->control->appl_ptr + frames; | 2334 | appl_ptr = runtime->control->appl_ptr + frames; |
2346 | if (appl_ptr >= (snd_pcm_sframes_t)runtime->boundary) | 2335 | if (appl_ptr >= (snd_pcm_sframes_t)runtime->boundary) |
2347 | appl_ptr -= runtime->boundary; | 2336 | appl_ptr -= runtime->boundary; |
@@ -2391,8 +2380,6 @@ static snd_pcm_sframes_t snd_pcm_capture_forward(struct snd_pcm_substream *subst | |||
2391 | } | 2380 | } |
2392 | if (frames > (snd_pcm_uframes_t)avail) | 2381 | if (frames > (snd_pcm_uframes_t)avail) |
2393 | frames = avail; | 2382 | frames = avail; |
2394 | else | ||
2395 | frames -= frames % runtime->xfer_align; | ||
2396 | appl_ptr = runtime->control->appl_ptr + frames; | 2383 | appl_ptr = runtime->control->appl_ptr + frames; |
2397 | if (appl_ptr >= (snd_pcm_sframes_t)runtime->boundary) | 2384 | if (appl_ptr >= (snd_pcm_sframes_t)runtime->boundary) |
2398 | appl_ptr -= runtime->boundary; | 2385 | appl_ptr -= runtime->boundary; |