[alsa-devel] defaults.pcm.minperiodtime 5000
It seem that there is a bug in the patch which remove "if ( err < 0 )"
- if (err < 0) return err; + if (pcm->minperiodtime > 0) {
http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=09879a4bb58199f64...
BTW , it seem this patch change the behaviour of alsa-lib too.
all sound cards will now have a minperiodtime 5000
On Thu, 12 Aug 2010, Raymond Yau wrote:
It seem that there is a bug in the patch which remove "if ( err < 0 )"
if (err < 0) return err;
if (pcm->minperiodtime > 0) {
Thanks. It's usuall typo. Fixed now.
http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=09879a4bb58199f64...
BTW , it seem this patch change the behaviour of alsa-lib too.
all sound cards will now have a minperiodtime 5000
Nope. If application settles the period time/size, the behaviour is unchanged (see the min/max condition). We just want to limit the period sizes for applications which do not know what they are doing and allow any period time/sizes. It's better to limit the minimal period size to avoid generation of many interrupts per second in this case.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
2010/8/12 Jaroslav Kysela perex@perex.cz
On Thu, 12 Aug 2010, Raymond Yau wrote:
BTW , it seem this patch change the behaviour of alsa-lib too.
all sound cards will now have a minperiodtime 5000
Nope. If application settles the period time/size, the behaviour is unchanged (see the min/max condition). We just want to limit the period sizes for applications which do not know what they are doing and allow any period time/sizes. It's better to limit the minimal period size to avoid generation of many interrupts per second in this case.
This mean that if application did not set sample rate by using snd_pcm_hw_params_set_rate_near() , alsa-lib will select default rate (minimum rate of 1 Hz for alsa-pulse plugin )
err = snd_pcm_ioplug_set_param_minmax(io, SND_PCM_IOPLUG_HW_RATE, 1, PA_RATE_MAX);
This kind of application cause PA server aborted immediately in Fedora 10 and Fedora 13
On Thu, 2 Sep 2010, Raymond Yau wrote:
2010/8/12 Jaroslav Kysela perex@perex.cz
On Thu, 12 Aug 2010, Raymond Yau wrote:
BTW , it seem this patch change the behaviour of alsa-lib too.
all sound cards will now have a minperiodtime 5000
Nope. If application settles the period time/size, the behaviour is unchanged (see the min/max condition). We just want to limit the period sizes for applications which do not know what they are doing and allow any period time/sizes. It's better to limit the minimal period size to avoid generation of many interrupts per second in this case.
This mean that if application did not set sample rate by using snd_pcm_hw_params_set_rate_near() , alsa-lib will select default rate (minimum rate of 1 Hz for alsa-pulse plugin )
err = snd_pcm_ioplug_set_param_minmax(io, SND_PCM_IOPLUG_HW_RATE, 1, PA_RATE_MAX);
This kind of application cause PA server aborted immediately in Fedora 10 and Fedora 13
The alsa-pulse plugin should provide valid accepted rate range. It's not issue in alsa-lib. I would set the low limit to something like 5000Hz.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
participants (2)
-
Jaroslav Kysela
-
Raymond Yau