sof icon indicating copy to clipboard operation
sof copied to clipboard

[skip ci, TEST,DO_NOT_REVIEW]topology2: add num_source/sink_pins tokens for widget

Open aiChaoSONG opened this issue 3 years ago • 3 comments

These two tokens will be used by the kernel to decide the supported number of source/sink pins, thus to allocate correct widget queue id in route setup.

Signed-off-by: Chao Song [email protected]

This sof PR is used to test https://github.com/thesofproject/linux/pull/3746, and can also be a demo for adding num_source_pins & num_sink_pins.

I'd like to make those two attributes mandatory, because it is very natural and intuitive to know how many input pins and output pins a widget can support.

aiChaoSONG avatar Jul 11 '22 08:07 aiChaoSONG

@ranj063 @bardliao In the submitted version, the pin_binding class has four fields: instance, bind_type, queue_id and wname, with instance in the constructor. this version compiles well, and I checked the pre-processed conf, everything is good.

I also have another version, where the pin_binding class has three fields: bind_type, queue_id, wname, with bind_type and queue_id in the constructor, somehow I have compilation failure with this version, Mandatory attribute wname not set for class pin_binding, I spend hours on this version, and I suspect there is a bug in alsa-utils, could you please help to take look at https://github.com/thesofproject/sof/tree/src_sink_pins_v1.

aiChaoSONG avatar Jul 12 '22 08:07 aiChaoSONG

@aiChaoSONG still draft ?

lgirdwood avatar Jul 18 '22 13:07 lgirdwood

@lgirdwood The widget queue support is supposed be used for widget with special pins, for example, smart_amp's feedback pin has to connect to a capture copier. This PR is used to test https://github.com/thesofproject/linux/pull/3757 for now.

As there are also some valid changes in the topology, I will resubmit a refined topology change after https://github.com/thesofproject/linux/pull/3757 merged.

aiChaoSONG avatar Jul 19 '22 02:07 aiChaoSONG

#6174 is merged, this draft is not used. close

aiChaoSONG avatar Aug 30 '22 07:08 aiChaoSONG