[Sound-open-firmware] [PATCH v2 1/2] MUX component added

Liam Girdwood liam.r.girdwood at intel.com
Wed Sep 13 13:47:25 CEST 2017


On Tue, 2017-09-05 at 12:58 +0100, Ranjani Sridharan wrote:
> This patch adds a 1:N or N:1 MUX/DEMUX component. Only one source
> and one sink buffer can be active at run-time. The MUX component is
> configured using the COMP_CMD_MUX_SWITCH command passed along with
> the chosen source and sink buffer configuration. It performs no
> processing on the input samples, but simply copies the input frames
> from the source to the sink buffer.
> 
> Signed-off-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
> ---
>  src/audio/mux.c                    | 293 +++++++++++++++++++++++++++++++++++--
>  src/include/reef/audio/Makefile.am |   3 +-
>  src/include/reef/audio/component.h |   1 -
>  src/include/reef/audio/mux.h       |  50 +++++++
>  src/include/uapi/ipc.h             |   1 -
>  5 files changed, 335 insertions(+), 13 deletions(-)
>  create mode 100644 src/include/reef/audio/mux.h

Sorry, just had a thought that would improve the MUX a lot :)

Currently we have  (C is comp, B is buffer) :-

C0 -> B0 -> MUX -> B1 -> C1

but, with MUX we really want to be clever and save a buffer and a copy,
so we should really have

C0 -> (MUX) -> B1 -> C1

Meaning the mux does not actually do any copying, but just updates the
source and sink buffer of C0 and C1 to use B1.

Liam

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


More information about the Sound-open-firmware mailing list