Re: [PATCH v2 2/2] ASoC: qcom: audioreach: only disconnect the route a mixer control owns

From: Srinivas Kandagatla

Date: Tue Nov 17 2026 - 10:11:55 EST


On 11/16/26 8:16 PM, Marc Herrero via B4 Relay wrote:
> From: Marc Herrero <marcht@xxxxxxxxx>
>
> Each AudioReach virtual mixer route control ("<BE> Audio Mixer <FE>")
> connects a front-end stream graph to a back-end device graph by storing
> the source module in the device graph's audioreach_graph_info. Writing 0
> to any of these controls clears that link unconditionally, even when the
> device graph is connected to a different front end.
>
> When two front ends can feed the same back end the result therefore
> depends on write order. On QCS6490 (Radxa Dragon Q6A):
>
> - alsactl restore writes 'DISPLAY_PORT_RX_0 Audio Mixer MultiMedia2' = 1
> and then 'DISPLAY_PORT_RX_0 Audio Mixer MultiMedia1' = 0, which leaves
> DisplayPort disconnected although the saved state has it connected;
> - the UCM HDMI enable sequence writes
> 'RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' = 0, which disconnects
> MultiMedia1 from the headphones. A PCM started on MultiMedia1 after
> that never advances (hw_ptr stays at 0).
>
> Make audioreach_connect_sub_graphs() only clear the link when it belongs
> to the control being cleared, using the same test as
> audioreach_is_vmixer_connected() does for get(). The DAPM mixer state is
> still updated for every write, so DAPM keeps tracking each route control
> as before.
>
> Fixes: e4977b91cff8 ("ASoC: qdsp6: audioreach: Simplify handing FE and BE graph connections")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Marc Herrero <marcht@xxxxxxxxx>
> ---

lgtm

Reviewed-by: Srinivas Kandagatla<srinivas.kandagatla@xxxxxxxxxxxxxxxx>

--Srini
> sound/soc/qcom/qdsp6/topology.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c
> index 612d8f03e6e9..aa2ab2b058d0 100644
> --- a/sound/soc/qcom/qdsp6/topology.c
> +++ b/sound/soc/qcom/qdsp6/topology.c
> @@ -1240,7 +1240,9 @@ static void audioreach_connect_sub_graphs(struct q6apm *apm,
> info->dst_mod_inst_id = m2->module_instance_id;
> info->dst_mod_ip_port_id = 2;
>
> - } else {
> + } else if (info->src_mod_inst_id == m1->module_instance_id &&
> + info->dst_mod_inst_id == m2->module_instance_id) {
> + /* only drop the link this control made, not another FE's */
> info->src_mod_inst_id = 0;
> info->src_mod_op_port_id = 0;
> info->dst_mod_inst_id = 0;
>