diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index b44972ad1b93..46f71a3def2b 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -374,6 +374,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_usb_dev_resume); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ipv6_gen_linklocal_addr); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sound_usb_support_cpu_suspend); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_snd_compr_use_pause_in_drain); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_snd_soc_card_get_comp_chain); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_show_max_freq); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_tcp_sendmsg_locked); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_tcp_recvmsg); diff --git a/include/trace/hooks/sound.h b/include/trace/hooks/sound.h index 2bf018edf392..6eb8bc326cf8 100644 --- a/include/trace/hooks/sound.h +++ b/include/trace/hooks/sound.h @@ -15,6 +15,10 @@ DECLARE_HOOK(android_vh_sound_usb_support_cpu_suspend, bool *is_support), TP_ARGS(udev, direction, is_support)); +DECLARE_HOOK(android_vh_snd_soc_card_get_comp_chain, + TP_PROTO(bool *component_chaining), + TP_ARGS(component_chaining)); + #endif /* _TRACE_HOOK_SOUND_H */ /* This part must be outside protection */ #include diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 69c78fd59e41..f7aff87849fc 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -26,6 +26,7 @@ #include #include #include +#include #define DPCM_MAX_BE_USERS 8 @@ -1275,6 +1276,7 @@ int dpcm_path_get(struct snd_soc_pcm_runtime *fe, { struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0); int paths; + bool chaining = false; if (fe->num_cpus > 1) { dev_err(fe->dev, @@ -1282,9 +1284,11 @@ int dpcm_path_get(struct snd_soc_pcm_runtime *fe, return -EINVAL; } + trace_android_vh_snd_soc_card_get_comp_chain(&chaining); + /* get number of valid DAI paths and their widgets */ paths = snd_soc_dapm_dai_get_connected_widgets(cpu_dai, stream, list, - dpcm_end_walk_at_be); + chaining ? NULL : dpcm_end_walk_at_be); dev_dbg(fe->dev, "ASoC: found %d audio %s paths\n", paths, stream ? "capture" : "playback");