mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
Fix 32/64bit problem with multi plugin
Fix the problems of multi plugin with 32bit apps on 64bit kernel. The forward/backward of hw plugin are fixed, too.
This commit is contained in:
parent
1128efc7d4
commit
a2ee8e20e8
2 changed files with 10 additions and 4 deletions
|
|
@ -624,6 +624,9 @@ static snd_pcm_sframes_t snd_pcm_hw_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t fra
|
||||||
SYSMSG("SNDRV_PCM_IOCTL_REWIND failed");
|
SYSMSG("SNDRV_PCM_IOCTL_REWIND failed");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
err = sync_ptr(hw, SNDRV_PCM_SYNC_PTR_APPL);
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
return frames;
|
return frames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -637,6 +640,9 @@ static snd_pcm_sframes_t snd_pcm_hw_forward(snd_pcm_t *pcm, snd_pcm_uframes_t fr
|
||||||
SYSMSG("SNDRV_PCM_IOCTL_FORWARD failed");
|
SYSMSG("SNDRV_PCM_IOCTL_FORWARD failed");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
err = sync_ptr(hw, SNDRV_PCM_SYNC_PTR_APPL);
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
return frames;
|
return frames;
|
||||||
} else {
|
} else {
|
||||||
snd_pcm_sframes_t avail;
|
snd_pcm_sframes_t avail;
|
||||||
|
|
|
||||||
|
|
@ -424,8 +424,9 @@ static int snd_pcm_multi_prepare(snd_pcm_t *pcm)
|
||||||
int err = 0;
|
int err = 0;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i = 0; i < multi->slaves_count; ++i) {
|
for (i = 0; i < multi->slaves_count; ++i) {
|
||||||
if (multi->slaves[i].linked)
|
/* We call prepare to each slave even if it's linked.
|
||||||
continue;
|
* This is to make sure to sync non-mmaped control/status.
|
||||||
|
*/
|
||||||
err = snd_pcm_prepare(multi->slaves[i].pcm);
|
err = snd_pcm_prepare(multi->slaves[i].pcm);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
@ -439,8 +440,7 @@ static int snd_pcm_multi_reset(snd_pcm_t *pcm)
|
||||||
int err = 0;
|
int err = 0;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i = 0; i < multi->slaves_count; ++i) {
|
for (i = 0; i < multi->slaves_count; ++i) {
|
||||||
if (multi->slaves[i].linked)
|
/* Reset each slave, as well as in prepare */
|
||||||
continue;
|
|
||||||
err = snd_pcm_reset(multi->slaves[i].pcm);
|
err = snd_pcm_reset(multi->slaves[i].pcm);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue