[pulseaudio-discuss] [PATCH] modules: Disable timer scheduling for a2dp playback to reduce power consumption.

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Tue Aug 5 14:59:50 PDT 2014


On 8/5/14, 12:35 AM, Sajeesh Sidharthan wrote:
> ---
>   src/modules/bluetooth/module-bluez5-device.c |    8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
> index 57b2791..eda7a9d 100644
> --- a/src/modules/bluetooth/module-bluez5-device.c
> +++ b/src/modules/bluetooth/module-bluez5-device.c
> @@ -1170,10 +1170,10 @@ static void thread_func(void *userdata) {
>                                       a2dp_reduce_bitpool(u);
>                               }
>                           }
> -
> -                        do_write = 1;
> -                        pending_read_bytes = 0;
>                       }
> +
> +                    do_write = 1;
> +                    pending_read_bytes = 0;
>                   }
>
>                   if (writable && do_write > 0) {
> @@ -1208,7 +1208,7 @@ static void thread_func(void *userdata) {
>                           sleep_for = PA_USEC_PER_MSEC * 500;
>
>                       pa_rtpoll_set_timer_relative(u->rtpoll, sleep_for);
> -                    disable_timer = false;
> +                    /* disable_timer = false; *//* Disable timer to reduce power consumption */

Why would this reduce power consumption, one would think that you want 
to buffer up by specifying a large latency. If you disable timers you'll 
have to force a specific buffer size for this sink.
Thanks,
-Pierre



More information about the pulseaudio-discuss mailing list