mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
Fix hwptr update in rate plugin
Fixed the update of hwptr in rate plugin. This caused bad sounds on rate expansion and invalid memory access.
This commit is contained in:
parent
ae363f57be
commit
f9e0c56c46
1 changed files with 1 additions and 4 deletions
|
|
@ -603,7 +603,7 @@ static inline void snd_pcm_rate_sync_hwptr(snd_pcm_t *pcm)
|
||||||
*/
|
*/
|
||||||
rate->hw_ptr =
|
rate->hw_ptr =
|
||||||
(slave_hw_ptr / rate->gen.slave->period_size) * pcm->period_size +
|
(slave_hw_ptr / rate->gen.slave->period_size) * pcm->period_size +
|
||||||
rate->ops.output_frames(rate->obj, slave_hw_ptr % rate->gen.slave->period_size);
|
rate->ops.input_frames(rate->obj, slave_hw_ptr % rate->gen.slave->period_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_pcm_rate_hwsync(snd_pcm_t *pcm)
|
static int snd_pcm_rate_hwsync(snd_pcm_t *pcm)
|
||||||
|
|
@ -1437,9 +1437,6 @@ int _snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! type) {
|
|
||||||
}
|
|
||||||
|
|
||||||
err = snd_pcm_slave_conf(root, slave, &sconf, 2,
|
err = snd_pcm_slave_conf(root, slave, &sconf, 2,
|
||||||
SND_PCM_HW_PARAM_FORMAT, 0, &sformat,
|
SND_PCM_HW_PARAM_FORMAT, 0, &sformat,
|
||||||
SND_PCM_HW_PARAM_RATE, SCONF_MANDATORY, &srate);
|
SND_PCM_HW_PARAM_RATE, SCONF_MANDATORY, &srate);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue