Commit Graph

2 Commits

Author SHA1 Message Date
Bicycle Tsai
8d68a30fe1 ANDROID: ASoC: soc-pcm: Get all BEs along DAPM path
dpcm_end_walk_at_be() stops the graph walk when first BE is found for
the given FE component. In a component model we may want to connect
multiple DAIs from different components.

android_vh_snd_soc_card_get_comp_chain can be registered here
to allows DAI/component chaining.

Later PCM operations can be called for all these listed components for a
valid DAPM path.

ALSA machine driver can setup component_chaining like below code slice.

static void my_board_component_chaining_hook(void *data, bool *ret)
{
        *ret = true;
}

static int my_board_dev_probe(struct platform_device *pdev)
{

        register_trace_android_vh_snd_soc_card_get_comp_chain(
                my_board_component_chaining_hook, NULL);

        return 0;
}

static int my_board_dev_remove(struct platform_device *pdev)
{
        unregister_trace_android_vh_snd_soc_card_get_comp_chain(
                my_board_component_chaining_hook, NULL);

        return 0;
}

static struct platform_driver my_board_driver = {
        ...
        .probe = my_board_dev_probe,
        .remove = my_board_dev_remove,
        ...
};

Bug: 198732156
Signed-off-by: Bicycle Tsai <bicycle.tsai@mediatek.com>
Change-Id: Ife5df291d40af9ec83d57462b6a08aba95d9119d
2021-10-29 22:04:59 +08:00
JJ Lee
e8516fd3af ANDROID: sound: usb: add vendor hook for cpu suspend support
Add vendor hook android_vh_sound_check_support_cpu_suspend
to allow ACPU to suspend during USB playback/capture,
if this is supported.

Bug: 192206510
Change-Id: Ia8d4c335db27de5fcefab13cab653fd1ae34f691
Signed-off-by: JJ Lee <leejj@google.com>
2021-07-14 04:05:24 +00:00