[PATCH] sink, source: Rework reconfiguration logic to apply to more than rate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2017-10-16 at 14:33 +0530, Arun Raghavan wrote:
> This rejigs the update_rate() logic to encompass changes to the sample
> spec as a whole, as well as passthrough status. As a result,
> sinks/sources provide a reconfigure() method which allows
> reconfiguration as required.
> 
> The behaviour itself is currently unchanged -- alsa-sink/-source do not
> actually implement anything other than rate updates for now (nor are
> they ever requested to). This can be modified in the future, to allow,
> for example 24-bit output when incoming media supports it, as well as
> channel count changes for passthrough sinks.
> 
> Another related change is that passthrough status is now part of
> sink/source reconfiguration, and we can stop doing a suspend/unsuspend
> when entering/leaving passthrough state. So that part is now divided
> in two -- pa_sink_reconfigure() sets the sink in passthrough mode if
> required, and pa_sink_enter_passthrough() sets up everything else
> (this currently means only volumes, but could disable other processing)
> for passthrough mode.
> ---
>  src/modules/alsa/alsa-sink.c   | 16 ++++++----
>  src/modules/alsa/alsa-source.c | 14 +++++----
>  src/pulsecore/sink-input.c     |  6 ++--
>  src/pulsecore/sink.c           | 71 +++++++++++++++++-------------------------
>  src/pulsecore/sink.h           |  7 ++---
>  src/pulsecore/source-output.c  |  6 ++--
>  src/pulsecore/source.c         | 58 ++++++++++++++++++----------------
>  src/pulsecore/source.h         |  6 ++--
>  8 files changed, 90 insertions(+), 94 deletions(-)

Looks good to me.

-- 
Tanu

https://www.patreon.com/tanuk


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux