mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
Fix errors in partial reads/writes with rate plugin
Fix errors in partial reads/writes (e.g. draining) with rate plugin.
This commit is contained in:
parent
18a6132a66
commit
d9dc944a75
1 changed files with 4 additions and 0 deletions
|
|
@ -1060,10 +1060,12 @@ static int snd_pcm_rate_commit_area(snd_pcm_t *pcm, snd_pcm_rate_t *rate,
|
||||||
result = snd_pcm_mmap_begin(rate->gen.slave, &slave_areas, &slave_offset, &slave_frames);
|
result = snd_pcm_mmap_begin(rate->gen.slave, &slave_areas, &slave_offset, &slave_frames);
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
return result;
|
return result;
|
||||||
|
#if 0
|
||||||
if (slave_offset) {
|
if (slave_offset) {
|
||||||
SNDERR("non-zero slave_offset %ld", slave_offset);
|
SNDERR("non-zero slave_offset %ld", slave_offset);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
snd_pcm_areas_copy(slave_areas, slave_offset,
|
snd_pcm_areas_copy(slave_areas, slave_offset,
|
||||||
rate->sareas, xfer,
|
rate->sareas, xfer,
|
||||||
pcm->channels, cont,
|
pcm->channels, cont,
|
||||||
|
|
@ -1151,10 +1153,12 @@ static int snd_pcm_rate_grab_next_period(snd_pcm_t *pcm, snd_pcm_uframes_t hw_of
|
||||||
result = snd_pcm_mmap_begin(rate->gen.slave, &slave_areas, &slave_offset, &slave_frames);
|
result = snd_pcm_mmap_begin(rate->gen.slave, &slave_areas, &slave_offset, &slave_frames);
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
return result;
|
return result;
|
||||||
|
#if 0
|
||||||
if (slave_offset) {
|
if (slave_offset) {
|
||||||
SNDERR("non-zero slave_offset %ld", slave_offset);
|
SNDERR("non-zero slave_offset %ld", slave_offset);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
snd_pcm_areas_copy(rate->sareas, xfer,
|
snd_pcm_areas_copy(rate->sareas, xfer,
|
||||||
slave_areas, slave_offset,
|
slave_areas, slave_offset,
|
||||||
pcm->channels, cont,
|
pcm->channels, cont,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue